The project impl SSR shader that works on Unity 6 and Unity 2022.
It provide 3 methods to perform SSR tracing, mostly for my own references.
-
(has oversampling and undersampling issue due to perspetive nature)
-
(based on Morgan McGuire's fast Screen Space Ray Tracing paper )
-
(based on GPU Pro 5' SSR, also heavly modified from JoshuaLim007's impl, see references)
for rougher surface pixel, the Hi-Z method will fallback to use screen space trace, which imporves performance.
When using the forward path, it creates a "thin" G-buffer that contains the scene's metallic and smoothness properties from each renderer's standard lit shader.
It also proivide option to trace the reflection in half scale (0.25 scale has aliasing issue, I should fix it in the future)
In Unity 6, I also make it support render graph API. So the shader can run either on compatible mode or the new render graph. With render graph enable, we can also use the STP (Spatial-Temporal Postprocessing) to downscale the native render scale. This way it imporve performance by a lot.
Somtimes the depth texture used by the SSR will act in undefiend behaviour if you swtich between different reder scale, turn on/off STP.
Remove the SSR renderer feature and re-add it can solve it. I plan to solve the issue in the future.
bitsquid: development blog: Notes On Screen Space HIZ Tracing