-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange lighting issues with directional light + overlapping geometry #529
Comments
You're seeing shadows! The directional light shadow map is only so big (it's configurable in the light descriptor) so what you're seeing is there being no shadows if you're too far away from the shadow map (centered at the camera) and shadows being introduced as you get closer. |
@cwfitzgerald that makes sense, but the shadows are still appearing in the wrong spots it seems. It looks like the shadow map is backwards for some reason on those overlapping portions, IE shadow is being applied on the geometry on top and not the geometry on bottom if you look at the video. There is no geometry occluding from above for there to be shadows on the mesh on the top side. |
As a note, I am using a right-handed coordinate system with z-up. In case that might be messing with the math somewhere. |
@marstaik do you have a reproduction case I can play with? It's hard to debug these things outside of renderdoc |
Video demonstration
There seems to be a square "plane" following the cameras position, that when it hits overlapping geometry causes the lighting to turn black. When you zoom out far enough, the lighting goes to normal. Note that the geometry underneath has no lighting issues.
The text was updated successfully, but these errors were encountered: