Sign in to follow this  

double shadowing

This topic is 4357 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

Hi, I implemented shadowing, but the sides of objects facing away from the light get darkened twice. First they are dark from the basic lighting equation...they face away from the light source and so receive no diffuse/specular light. However, they are also flagged as in shadow by the shadow map test. So they get multiplied by a shadow coefficient which darkens then further. How is this suppose to be handled? One way I thought of is to check if the pixel receives no light, and if not then don't apply any shadowing to the pixel--the lighting equation will automatically darken it.

Share this post


Link to post
Share on other sites
I think alot of games (and 3D engines) don't allow self-shadowing. This would avoid this kind of problem.

What kind of shadowing method are you using? Is it possible to just exclude rear facing triangles from the shadowing pass?

Share this post


Link to post
Share on other sites
never done shadow mapping before, but you said that they are flagged as in shadow by the shadow map test and therefore are multiplied by a shadow coefficient to darken them?
If so, why don´t you do it the other way round:
Every point / pixel that is flagged as in shadow will only receive ambient lighting, if there is such a thing in your scene. Every pixel not flagged as in shadow will receive the normal diffuse / specular whatever lighting you may have?
So, instead of darkening the scene afterwards, you don´t light up a point that shouldn´t be lit.

Share this post


Link to post
Share on other sites

This topic is 4357 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.

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