-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Shadows are sometimes cast by not visible objects and always cast by cull_masked objects #43827
Comments
Also #32475 was merged after 3.2.3. May affect your project (haven't tested). |
Apologies for not doing an adequate bug database search before drafting this. Must do better. Hope I've not wasted too much time. Please mark as duplicate, archive as appropriate. I don't want to further mess up the system. |
@goatchurchprime No worry, it's not expected of users to know the bug tracker by heart :) A potential duplicate issue does not disrupt anything, at most it confirms the validity of a bug in the currently supported release. |
@goatchurchprime can you try this in 3.2.4 and confirm or say whether any of these bugs are still present so we can either close or action? |
Changing the visible flag does now update shadows in the next frame for 3.2.4 Changing the cull_mask in the camera still leaves the shadows in place. To be fair, this is different to the issue #19438 which is the cull_mask applied to the light and looks like it will be a won't fix. This bug/feature could be handled in the documents at https://docs.godotengine.org/en/stable/classes/class_camera.html?highlight=cull_mask#class-camera-property-cull-mask with a note that it doesn't apply to shadows. So if you're applying it to non-shadowed objects it will look just fine. |
Confirmed, just ran across this in v3.4.3.rc1.official [894b6d5] Sample project: Lighting appears to be working, but shadows are still cast. |
Due to godotengine/godot#43827 I was unable to implement my light cookie as I wanted. The shadow from the directional light (sun) caused the light cookie to be visible from different angles 😢
Fixed by #61841. |
Your example probably points to an open issue different from the one mentioned above and fixed in my PR. Indeed the docs say:
which (in my opinion) suggests that the non-affected objects (caused by mismatching light_cull_mask and visual instance layer) neither cast shadows. Should we create a new issue for that or is that wanted behavior? |
Godot version:
3.2.3.stable
OS/device including version:
Windows
Issue description:
I have been using layers and camera culling to turn on and off large sections of my scene instead of controlling the visibility flag on each one individually. It also allows me to make some objects big enough to see in the overhead plan camera but not appear in the main game play window. Unfortunately even though they are invisible, they still cast shadows.
When making this minimal reproduction project I discovered the second problem that the shadows do not always respect the visibility flag.
Steps to reproduce:
Run the example. The camera has a cull_mask against layer 2.
Use the H and S key to toggle visibility on CubeLeft and layer on CubeRight.
Both cubes disappear but their shadows remain.
If you "touch" the cubes by using the 1 key to rotate them by 10 degrees the CubeLeft shadow disappears, but the CubeRight always remains.
Minimal reproduction project:
layershadow.zip
The text was updated successfully, but these errors were encountered: