Sign in to follow this  
Calefaction

Strange lighting problem...

Recommended Posts

Calefaction    174
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
James Trotter    432
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
SimmerD    1210
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this