-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Add maximum roughness cutoff to SSR to improve performance #56804
Add maximum roughness cutoff to SSR to improve performance #56804
Conversation
I made a pr in the same area of roughness #56822. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the changes listed here this could be merged after #69828
servers/rendering/renderer_rd/shaders/screen_space_reflection.glsl
Outdated
Show resolved
Hide resolved
servers/rendering/renderer_rd/shaders/screen_space_reflection.glsl
Outdated
Show resolved
Hide resolved
4826d79
to
1886bcd
Compare
In a test scene with mixed rough and non-rough materials, this saves upwards of 0.15 ms of GPU time with very little visual artifacting (GTX 1080, 2560×1440).
1886bcd
to
7745bd4
Compare
Benchmark with the new roughness cutoff of 0.6 in 3840×2160 on a AMD Radeon RX 6900 XT (Fedora 36, RADV), using the same test scene as before:
|
Thanks! |
Despite the comment in the shader, I noticed the roughness cutoff in godot/servers/rendering/renderer_rd/shaders/effects/screen_space_reflection.glsl Lines 71 to 72 in 950f4c3
godot/servers/rendering/renderer_rd/shaders/effects/screen_space_reflection.glsl Lines 226 to 228 in 950f4c3
In practice, this appears to have no visual impact, but restoring the "correct" cutoff value of
|
master
version of #56815.In a test scene with mixed rough and non-rough materials, this saves upwards of 0.15 ms of GPU time with very little visual artifacting (GTX 1080, 2560×1440). This improves performance the most in scenes that have mostly rough materials. The optimization works regardless of the SSR roughness quality selected in the Project Settings.
The roughness cutoff was empirically chosen – it seems to strike a good balance between improving performance and avoiding obvious visual artifacts. The roughness cutoff could be exposed to a project setting if needed, but the Params push constant is already full (128 bytes).
Testing project: test_ssr_performance.zip
Preview
Some more comparisons: Trying to find a good roughness cutoff, High-quality settings
SSR Roughness Low quality (default)
Before
After
SSR Roughness Disabled
Before
After