-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Improve Directional Shadow Auto LOD #4479
Comments
Related to #2600. |
Simplified Proposal, as the Added logic would both add complexity, and would not be very useful, as it'd partly keep a part of the issue this Proposal is aiming at dealing with, due to still partially tying the Shadow LOD with the Player Camera |
There are two things to consider when choosing LODs for shadows:
Using a different LOD between the shadow mesh and the rendered mesh can lead to bad shadow acne issues. I beleive our LODs are designed to never have a larger outline than the base mesh, so as long as shadow LOD's are kept equal to or higher than the mesh being rendered, we should be able to tweak them. Adjusting automatically based on the resolution of the shadow map makes sense to me. So does having a shadow_lod_bias parameter so users can choose to sacrifice some quality if they want. |
#4517 deals really, REALLY well with low LODs, so changing the default pipeline to this method of rendering (which you can actually do right now, it's just not default) I've been able to go super aggressive on cutting Polygon counts for the Shadow Meshes, and with Manually created LODs I've managed to cut 90% of the Triangles in the Shadow Rendering Pipeline for virtually the exact same shadow.. Now ALOD isn't as efficient as the Method I've used and of worse quality, but with the inverted shadow rendering, it's much less likely to glitch shadows in any way. |
Potentially we could actually make an option of how ALOD works for Shadows, based on camera distance or based on what the Shadows detect (aka this proposal) and have that be a Project Setting.. It'd have the side benefit of allowing for easy side by side comparisons of the two methods, and would allow for a fall back to the old ways should there be an edge case with this method, much like there are edge cases with the current method. |
Was this implemented in beta 6? it seems like Directional Shadow LODs now do follow the splits in their LOD choices... |
Closing as this seems to be in effect already, not to mention godotengine/godot#76291 significantly improves shadow performance by only rendering 2 splits at a time, making the impact of wasteful shadow geometry much less significant, especially should the triangle processing regression (godotengine/godot#68959) be successfully resolved. |
Describe the project you are working on
Open World Game
Describe the problem or limitation you are having in your project
Directional Shadows currently Use the same Auto LOD level as the Player Camera, even for Meshes set to Shadows Only
This has Two Problems:
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Directional Shadows Render in Orthogonal Perspective, as such, using the LOD quality as determined by the Directional Shadow's Orthogonal View are going to be the best suited to Minimize Shadow Processing required and Maximize Shadow Quality and Consistency
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Treat Directional Shadows as Orthogonal Cameras in ALOD logic.
For Each Split Determine ALOD Shadow LOD (same logic as Orthogonal Cameras use)
If this enhancement will not be used often, can it be worked around with a few lines of script?
No, as ALOD is not exposed to the user.
Is there a reason why this should be core and not an add-on in the asset library?
ALOD and Directional Shadows are core.
The text was updated successfully, but these errors were encountered: