-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
LightManager.Builder.castLight=false not disabling emitted light #8427
Comments
Minor correction: setting castLight to false DOES appear to fully disable lighting for some light types (point light), but does not show shadows as the documentation suggests. For the directional light type, setting the bool doesn't appear to affect anything. |
If Directional lights are always assumed to be visible (ie castLight doesn't affect them) @pixelflinger We should apply this feature to directional lights or have the docs explain what's going on |
Yes, a light doesn't cast shadows... It casts light, except where there is an object that blocks it out -- it's the object that casts shadows. If a light doesn't produce light, it cannot be blocked by an object; everything is in shadow in the first place. As Romain suggested you can use a shadow multiplier to artificially darken an area, but that's not PBR anymore at this point. The problem with the directional light is probably an oversight, I will take a look. |
Thank you for the explanation - that makes sense, I was curious how a shadow could exist without there being light to occlude. I think the wording of the code comment for castLight is a little confusing in this regard. Thanks for the quick response. I look forward to working with Filament more. |
Describe the bug
LightManager.Builder.castLight functionally does nothing as far as I can tell. I've tried this with DIRECTIONAL, POINT, and SUN lights.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
As the code documentation suggests, I expect to see shadows, but no light emitted.
"In some situations it can be useful to have a light in the scene that doesn't actually emit light, but does cast shadows."
Smartphone (please complete the following information):
Additional context
This can also be seen on an emulated Android 14 device in Android Studio with an OpenGL pipeline on a RTX 2080
The text was updated successfully, but these errors were encountered: