-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Change Shadow Rendering Pipeline #4517
Comments
I have found a rather, unusual benefit of this approach... it seems this approach doubly improves shadow rendering performance, both because you can significantly simplify meshes without causing shadow quality degradation (aside from a very slight shrinking of the shadows), and Shadow Casters such as Terrains face cull most of their triangles |
Closing as users can already do this, and would be a fairly big compatibility breakage that's probably not worth it for most users, especially if/when newer shadowing techniques become available |
Inspired by Godot (see godotengine/godot-proposals#4517)
Will this approach improve quality of self-shadow (mean it by object casting shadows on it self) and shadows that casted by close distance object? |
if you mean deal with shadow acne, yes, though you will have to shrink the shadow geometry a little to avoid light leaking (similar to peter panning but with it acting as more of a halo around shadow casting geometry) |
Describe the project you are working on
Open World Game
Describe the problem or limitation you are having in your project
Having to tweak settings around a lot to balance out Shadow Acne and Peter Panning
Describe the feature / enhancement and how it helps to overcome the problem or limitation
By Default Render Shadows with Reverse Face culling, and ignore all Biasing (so as if bias and normal bias were both at 0, for all shadows), instead, Shrink the Shadow Meshes by some user defined value (Default of 0.0025 seems to do the trick really well)
Pros:
Cons:
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Have Two Shadow Rendering Modes:
Using this Method Do the following:
Normal Biasvalues to 0 - Normal Bias is actually still useful for really low Res Shadows, so a Value of 1 still makes sense, but nothing higherIf this enhancement will not be used often, can it be worked around with a few lines of script?
Yes, you can set Lights to Reverse Face Cull and Shrink them a little in Blender or using only Base/Standard Material 3D with separate Meshes for Shadows and Normal Rendering.
Is there a reason why this should be core and not an add-on in the asset library?
It turns the Shadow Rendering (which is core) into "It just Works"
NOTES
Flip Mesh Triangles can be Done by Changing Cull Mode to Front in Base/Standard Material 3D
Shrink can be done using Base/Standard Material 3D Grow
The text was updated successfully, but these errors were encountered: