Jump to content
  • Advertisement
Sign in to follow this  
Calefaction

Strange lighting problem...

This topic is 5021 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am working on getting try dynamic lighting rigged up in our engine, and I am getting a wierd issue. I thought I had covered all the basis (proper light model settings, proper GL_LIGHT0 settings, GL_LIGHTING and GL_LIGHT0 are enabled, proper material settings, normals are being passed), but I guess I haven't. The wierdest part is, anything drawn during the alpha blending step of a render pass (i.e. those objects drawn with alpha blending enabled) draw correctly. To see the problem, look at the screenshot here: http://www.wildfiregames.com/~matthew/lightprob.jpg Anyone have any idea what causes this?

Share this post


Link to post
Share on other sites
Advertisement
This is just a shot in the dark, but perhaps your lights aren't set up properly, and when you disable lighting to render the alpha-blended objects, it would appear as normal...

Double-check your lighting settings, make sure the normals are unit-normals, and that they're facing the right way.

Share this post


Link to post
Share on other sites
Perhaps your normals are flipped. One way to test this out would be to invert the light vector ( assuming a directional light )...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!