Why Are Screen Space Reflections Unique?
SSR is one of the best methods to accurately reflect your digital environment, but what makes it special and worth using?
Today’s Objective: Look at Screen Space Reflections in Unity, and how and why they are a great high-quality solution for accurate reflections.
What are Screen Space Reflections (SSR)?
Screen Space Reflections are a technique for reusing screen space data to calculate reflections.
— Unity Documentation
SSR uses ray-marching techniques and reflection points to calculate the reflection vector for each reflection point in the depth buffer. This vector is then “marched” until the vector intersects with another point on the depth buffer, at which time the 2nd point is drawn to the original point as a reflection.
Since SSR uses screen space data to calculate reflections, it is limited to what the screen/camera can see:
This is potentially a significant limitation to SSR, but considering how it is designed it is an unavoidable limitation.
SSR is also a very intensive/expensive method to use, so it’s cost must be weighed against the benefits for each situation, and it should be avoided when accurate reflections are not a vital point of the situation. It is not recommended to use SSR on mobile devices, given the processing costs.
When it is needed, it’s cost can be reduced by lowering to quality of reflections, such as reducing the iteration count (reduce the depth buffer distance tested), prerequisites for reflection (when reflections can occur), or increasing the step size (increase distance, reduce quality). Material properties are also a part of the reflection calculations, and can be an expensive modification to each reflection point’s result.
The other options:
While SSR is an option for high quality reflections, sometimes it is not needed or too costly to use.
Reflection Probes can be used without SSR to give reasonable reflections, when placed correctly:
There is also the option to not use Reflection Probes, resulting in only the Skybox being reflected (depending on your settings), which while very limited, is also suitable for many situations.