-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Visibility Range "Fade Self" option hides shadows unexpectedly in Depth Pre-Pass #91671
Comments
Materials with alpha transparency never cast shadows. If you want them to cast shadows, you need to duplicate the MeshInstance, give the duplicate an opaque material and set its shadow casting mode to Shadows Only. GeometryInstance3D transparency allows materials that are made transparent this way to cast shadows, but only if the material is originally opaque (or alpha scissor/alpha hash). |
I should clarify, the "blend" objects in the project are using the Depth Pre-Pass model, not actual alpha blending. The three other objects using this mode do cast shadows. I'll clarify the title. |
According to material.cpp:788, using pre-pass should add this
which should then trigger
The material I'm using seems to pass this test (depth draw is OPAQUE and "no depth test" is not enabled). Am I understanding correctly? It seems this should still be considered to cast a shadow. |
Yes, that makes sense. I recall this bug being reported elsewhere already, but I can't find an issue right now. Perhaps #73158 is related. |
Tested versions
System information
Godot v4.3.dev (32339a8c3) - Debian GNU/Linux trixie/sid trixie - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 Ti (nvidia) - AMD Ryzen 7 5800X 8-Core Processor (16 Threads)
Issue description
When using this combination:
-- then no shadows are ever rendered.
I assume the intention is to have shadows disappear when the object is actually invisible, as it does for an opaque material under the same circumstances.
Steps to reproduce
See MRP. Move camera back and forth.
Close up, one shadow missing on "GeoDistanceFadeSelf + Blend":
At a distance, all shadows for fadeable objects gone as expected:
Minimal reproduction project (MRP)
fade-shadow-test.zip
The text was updated successfully, but these errors were encountered: