-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
[3.x] Add maximum roughness cutoff to SSR to improve performance #56815
base: 3.x
Are you sure you want to change the base?
Conversation
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.
I'm not sure if adding this to 3.x makes sense. This will add a sharp cutoff point where SSR will just disappear. In 4.0 the equivalent code was added after we added a smooth falloff to the SSR rough reflections so that SSR could gradually fade out on materials with a varying amount of roughness. A similar fade-out could be added here and then I guess it would be fine
Yes, I agree backporting both the fade-out and roughness cutoff makes sense. SSR looking too sharp and too present in 3.x is a common complaint after all, so better make it more subtle when it makes sense (and also faster at the same time). |
In a test scene with mixed rough and non-rough materials, this saves 0.15-0.3 ms of GPU time with very little visual artifacting (GTX 1080, 2560×1440). The roughness cutoff can be adjusted in the Environment properties.
04c27bc
to
73bbc73
Compare
Rebased and tested again, it works as expected. I've implemented @clayjohn's roughness cutoff from 4.x. However, this poses a challenge for the Screenshots in OP were updated to show the new visual and performance results. |
3.x
version of #56804.In a test scene with mixed rough and non-rough materials, this saves 0.2 ms of GPU time with very little visual artifacting (GeForce RTX 4090, 3840×2160). This also incorporates the roughness fadeout from #69828, which can help hide visual artifacts on rough surfaces and generally make SSR look more stable.
The roughness cutoff can be adjusted in the Environment properties. Setting it to1.0
will result in the previous behavior being used.Edit (June 2023): This is no longer present for now. We need to discuss whether we should add this setting, as it's not in 4.x and probably won't be added there.
Testing project (
3.x
): test_ssr_performance-3.x.zipPreview
No roughness cutoff (previous behavior)
Roughness cutoff = 0.7 (new default)