1
\$\begingroup\$

I've constructed a scene using OpenGL/GLUT with a spot light but I'm getting troubles with light shining some of the walls

enter image description here

what is going on and how to solve?

\$\endgroup\$
4
\$\begingroup\$

Without seeing any shader code and vertex setup, this is difficult to answer. But I suspect that you have winded the quads of the left wall clockwise instead of counterclockwise, or vise versa. Or you didn't specify the normals correctly.

\$\endgroup\$
  • \$\begingroup\$ Thank you! You gave me a hint to solve it and in fact I was drawing clockwise and the normal was inverted, giving me odd results. Thanks you! \$\endgroup\$ – andrepcg Jun 10 '13 at 14:10
  • 2
    \$\begingroup\$ GLUT doesn't support shaders. Just saying \$\endgroup\$ – stas Jun 11 '13 at 3:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.