TSL: Add blurred mipmaps and honor roughness for ssr().
#31649
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue: #31576, #28752
Description
The PR adds support for blurred SSR reflections by generating a mipmap chain of blurred versions of the reflection buffer. A mip is selected based on the fragment's roughness value. I'm currently using the same number of mips like the Unity SSR mentioned in #31576. Rough materials looks now considerably better when using SSR 🚀 .
Using blurred mipmaps is optional and adds additional overhead to the SSR. In a performance stress test with a 5K resolution the performance went down from 52 FPS to 43 FPS. That is not substantial but still worth having in mind when using this technique. When using blurred SSR reflections with very rough surfaces, it's possible to reduce the
qualitya bit (e.g. from0.5to0.3) which compensates the performance lost.