A problem to multiple lights

I am a beginner.I want to write a shader about multiple lights.
But whenever I use gl_LightSource[2], the frag color turn out to be black. And if I don’t use the shader, I can use the light2.
What the problem is?

:o
I find the problem now.
The reason is thar I put the gl_LightSource[2] in the fragment shader. When I put it in vertex shader, the problem will be solved.
So I think we’d better put the light computation in vertex shader.

Sounds like a driver bug. Using your own uniforms would be another solution.

You are probably using an ATI card with old drivers.

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