My nothing-to-write-home-about OpenGL webpage. (please pardon the popups!)
Spotlight problem
Greetings ever helpful forumites,
I''m working on a simple modelling tool and I''m experiencing something unexpected when shining a spotlight at a sphere.
I have a sphere of radius 5 at the origin with a light at (0, 20, 0) whose Spot Direction is (0, -1, 0), spotcutoff 22, two-sided lighting off etc.
I get the bright white light on top of the sphere like I expect, but I also get a gray light effect on the BOTTOM of the sphere which I DON''T expect - any idea what could be causing that less-bright light on the BOTTOM of the sphere?
There is a screenshot and a little of the code on my site. Click on my sig, click the second demo from the top, and at the bottom is a link to download the code (it requires MFC) and a screenshot with a little bit of the code.
I''d appreciate any ideas!
Thanks
Joe
Love means nothing to a tennis player
Love means nothing to a tennis player
My nothing-to-write-home-about OpenGL webpage. (please pardon the popups!)
make sure the ambient of the light is zero, along with the global ambient...
Setting the ambient light of the individual light to 0 solved the problem! (The global ambient light did what I expected it to do).
Thank you.
Do you have any idea why the "direction" of the ambient light would be the opposite of the diffuse and specular? Are the vertex calculations different maybe?
I''ll re-read the MSDN documentation again, but thanks!
Love means nothing to a tennis player
Thank you.
Do you have any idea why the "direction" of the ambient light would be the opposite of the diffuse and specular? Are the vertex calculations different maybe?
I''ll re-read the MSDN documentation again, but thanks!
Love means nothing to a tennis player
My nothing-to-write-home-about OpenGL webpage. (please pardon the popups!)
Love means nothing to a tennis player
My nothing-to-write-home-about OpenGL webpage. (please pardon the popups!)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement