Working with Screen Space Reflections in Unity’s HDRP
What makes Screen Space Reflections unique? For starters, they are accurate reflections. If you have ever worked with reflection probes, you know that while they can add general reflectivity to the scene, they are far from accurate. Screen Space Reflections provide those mirror like reflections that you would expect from a real environment. Another thing that makes these reflections unique is the cost associated with them. If you are making a mobile game, reflection probes are the inexpensive but inaccurate way to go. If you have the processing power that come with PC and console gaming, enjoy the beautiful mirrors that come with the expensive Screen Space Reflections.
To start using Screen Space Reflections, you need to make sure they are enabled on the HDRP Assets. Open the Project Settings and Then navigate to Quality>HDRP. Here you can toggle between the different HDRP assets and enable the Screen Space Reflections under Lighting>Reflections.
You should be able to find the HDRP Default Asset in Project>Assets>HDRP Default Resources.
Selecting the HDRP Asset will bring up it’s additional options in the inspector.
If you want to find the asset currently assigned to your project, go to the HDRP Default Settings in Project Settings. Clicking on the Asset in Asset with the default settings, will highlight it for you in the Assets folder.
I have a Global Volume in the scene to use for the post processing.
Screen Space Reflections can be added as an override. If you see this error, then you still need to enable the reflections in the HDRP Assets. I actually had to do this for the low, normal, high quality and default assets before it worked.
Enable the Screen Space Reflections by checking the override box, the Enable box, and the box to the right above the PBR Accumulation. If your reflections are grainy or pixelated, increase the Quality to High.
You can see in this gif the reflections turning on and off as I toggle the check box in the inspector. Having the lights from the reactor perfectly mirrored into the floor really enhances the game scene.
Again I toggle the reflections on and off, showing walls reflecting into the floors.
Let’s get closer to the floor to check out these dynamic reflections!
If at some point you begin to see any tearing or bad pixelation in the dark shadows, you might have too many dynamic lights in your scene. Unity’s HDRP has a limit of 24 dynamic lights in a scene. If you have too many, you might start to see the tearing I mentioned. You should absolutely remove some of those lights, or consider baking some or using reflection probes. If you really want to keep going otherwise, you can go back to project settings and disable the Deferred Tile option under Light Loop Debug to lift the 24 light limit.
The main thing to ask yourself before using Screen Space Reflections, is if you need to. They are beautiful, but expensive. If your game scene isn’t very glossy to begin with, there is a good chance that these pricey reflections might not be the best solution for your scene. Otherwise if these reflections are what you need, enjoy!