I'm coding simple raytracer on c++ using sfml to draw output images. The problem on CPU was speed, so I decided to use shaders to speed up everything a bit
I am new to GLSL. In the tutorial, it's written, that you can pass some variables to your shader, using shader.setParameter("myvar", 5.f). Then it's written that "setParameter's overloads support all the types provided by SFML"
Okay, so I can pass float, vec2, vec3, vec4, etc.
The question is: can I somehow pass my own class in shader's uniforms?
The problem is that for now, I have to load Scene (class, that represents objects' positions and over things for raytracing) in each pixel's shadering process, and I suppose it can severely slow down everything.