Lightparameter via uniforms

sometimes ago I got aware of the error with gl_LightSource array on ATI cards. Someone told me to pass the attributes as uniforms.

So, now is my question:
What is the best way to pass the attributes from the OpenGL state via Uniform to my shader?

Thanks in advance

The problem with gl_LightSource on ATI was when indirect indexing was used, if I’m used the term correctly. Example, gl_LightSource[some_variable]

If you hard code it, gl_LightSource[0], it works.

Put the light properties into vec4 uniforms or build a struct with the uniforms.

Thanks, I didn’t see what is so easy.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.