Github: JoshuaLim007/Unity-ScreenSpaceReflections-URP: SSR solution for Unity URP (github.com)
I finished a screen space reflection shader a little while ago and thought I should share it on the Unity Forums. It works on Unity URP 12 and newer. So, Unity 2021 LTS and above. It runs reasonably well around 2 ms for both the Hi-Z buffer generation and the multi-pass reflection shader on a rtx 3070 at 1440p. Built it specifically for desktop and haven’t tested it on mobile or xr devices.
I believe this is the only screen space reflection solution other than Shiny-SSR. Most what I’ve seen are either planar shaders or material bound reflections shaders.
Screenshots:
10 Likes
Looks great, amazed no one else has replied. Looking forward to giving it a go. Well done 
1 Like
How can this be used with custom lighting models? That is, to access the SSR result like the URP Lit shader would?
Sorry for the late reply.
I store the results of the SSR within the following render target name:
uniform sampler2D _ReflectedColorMap;
You can sample this texture like any other texture like this:
float4 reflectedUv = tex2D(_ReflectedColorMap, i.uv);
Despite the name, this texture contains only the reflected normalized screen space position in the r and g channels. The b channel contains the smoothness value and the alpha channel contains the reflection mask value. I haven’t designed this solution around custom lighting models so this is just a workaround…
This looks spectacular. Any chance on a Forward+ version of this?
2 Likes
I wouldn’t mind seeing a Forward+ version of this!
1 Like