Skip to content
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

Open
marstaik opened this issue Nov 24, 2023 · 5 comments
Open

Comments

@marstaik
Copy link

marstaik commented Nov 24, 2023

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.

@cwfitzgerald
Copy link
Member

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 cwfitzgerald closed this as not planned Won't fix, can't repro, duplicate, stale Nov 27, 2023
@marstaik
Copy link
Author

@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.

@marstaik
Copy link
Author

image

@cwfitzgerald cwfitzgerald reopened this Nov 27, 2023
@marstaik
Copy link
Author

As a note, I am using a right-handed coordinate system with z-up. In case that might be messing with the math somewhere.

@cwfitzgerald
Copy link
Member

@marstaik do you have a reproduction case I can play with? It's hard to debug these things outside of renderdoc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants