Asset guides
URP / HDRP

Universal Reflections

On this page

Universal Reflections traces mirror rays from smooth surfaces and filters the hits to make glossy reflections. The rays can hit objects outside the camera view. The filter uses the current frame's depth, normals, and smoothness. It keeps no frame history.

Requirements#

  • Unity 6.0 with URP or HDRP 17.0, Unity 6.3 with 17.3, or Unity 6.6 with 17.6.
  • An active render pipeline asset for the pipeline you use.
  • The built-in Terrain module. If the module is disabled, enable it in Package Manager before you import the asset.
  • A Windows 64-bit Editor or player, Direct3D 12, and a GPU and driver that support DXR ray tracing shaders.
  • A perspective game or Scene view camera. URP requires a base camera and the Universal Renderer. HDRP requires Custom Passes and a camera without MSAA. The effect skips XR cameras.

In Project Settings > Player, turn off Auto Graphics API for Windows. Put Direct3D12 first in the list. If Unity asks you to restart the Editor, restart it.

Install the package#

  1. Install the URP or HDRP version that matches your Editor.
  2. In Package Manager, open My Assets, then download and import Universal Reflections. For a local file, choose Assets > Import Package > Custom Package and select the .unitypackage.
  3. If the project has HDRP only, clear the URP folder in the import dialog before you select Import. Keep the shared files and Pipeline Support selected.
  4. To add HDRP support, choose Tools > UniversalReflections > Import HDRP support. Confirm the import.

Unity imports the files into Assets/Truss/UniversalReflections. If you installed an earlier UPM preview, remove that preview through Package Manager before importing this release.

Configure URP#

Open the scene and choose Tools > UniversalReflections > Set Up Scene. The command adds the renderer feature to the active URP asset's Universal Renderers. It enables an existing reflection volume or creates one.

To set up URP manually, follow these steps.

  1. Open the Universal Renderer Data asset that your camera uses.
  2. Select Add Renderer Feature > Universal Reflection Feature.
  3. Select GameObject > Rendering > UniversalReflections Volume (URP).
  4. If you already have a Volume Profile, you can add Lighting > UniversalReflections to it instead. Select the override checkbox for Enable, then set its value to on.

Use Render Graph in the URP project. If the Graphics settings show Compatibility Mode (Render Graph Disabled), turn it off.

The compatibility pass works in Unity 6.0 and 6.3. Unity 6.6 also uses it until you enable the native reflection input. Use a Forward or Forward+ renderer with MSAA off. The pass reads the material's scalar _Smoothness property and adds a reflection to opaque camera color. Set Intensity to control the added reflection. URP handles the original scene lighting and transparent surfaces.

On Unity 6.6, choose Tools > UniversalReflections > URP > Enable Unity 6.6 reflection input. Wait for Unity to compile the standalone player variants. The renderer feature then supplies the reflection input to URP Lit and compatible Lit Shader Graph materials. A ray miss leaves URP to use its probe and sky lighting.

To add glass reflections on Unity 6.6, enable Transparent Receivers in the volume. In URP Lit glass, enable Screen Space Reflections and Contribute Screen Space Reflections. A Lit Shader Graph needs a depth-normal pass that writes smoothness. The package traces the frontmost eligible transparent surface. Blended glass lets secondary rays pass through it.

Configure HDRP#

Open the scene and choose Tools > UniversalReflections > Set Up Scene. The command enables Custom Pass on the active HDRP asset. It sets up the reflection volume and the Custom Pass Volume.

To set up HDRP manually, follow these steps.

  1. Enable Custom Pass in your HDRP Asset and the camera's Frame Settings.
  2. Select GameObject > Rendering > UniversalReflections Volume (HDRP).
  3. In the new volume, adjust Intensity to set how much reflected light the pass adds.

HDRP requires Linear color space in Project Settings > Player.

If you use an existing Volume Profile, add and enable Lighting > UniversalReflections. Add a global Custom Pass Volume to the scene. Set Injection Point to Before Pre Refraction. Add Universal Reflection Pass to that volume. Use one active instance of the pass per camera.

The pass adds reflections to opaque camera color. It uses HDRP's depth and roughness data to find receivers. It shades reflected hits with the package's hit shader. HDRP handles its usual probe and sky lighting. If you also enable HDRP's Screen Space Reflection override, both effects can add reflections to the same opaque surface.

HDRP glass and water use HDRP's own reflection settings. The package's HDRP pass does not use native material ray-tracing passes. It approximates hit shading with base color, emission, lightmaps, ambient light, and realtime directional, point, and spot lights. Native material effects, adaptive probe lighting, and realtime shadows at the reflected hit are outside this pass.

If you upgrade from a version that replaced HDRP's reflection pass, add the new Custom Pass Volume. Existing UniversalReflections volume settings still control sampling and smoothness. Check the old Screen Space Reflection override before using the two effects together.

Try the galleries#

  1. Open ReflectionGallery.unity from the URP/Gallery or HDRP/Gallery folder under Assets/Truss/UniversalReflections.
  2. Enter Play mode. The reflections are active as the camera and sphere move.

Each gallery comes with an enabled reflection volume and its own pipeline settings. The URP gallery includes the renderer feature. The HDRP gallery includes the Custom Pass Volume. While the gallery is active in Play mode, it uses the included settings. When you leave the gallery, Unity restores the previous pipeline.

Tune the effect#

Setting What it controls
Sampling Full traces each pixel. Half Height traces every other row. Quarter Height traces one row in four. Half Width And Height traces every other column and row. URP starts at Half Height. HDRP starts at Quarter Height.
Minimum Smoothness Raise it to restrict tracing to smoother surfaces.
Ray Length The maximum distance from the receiver to a hit in metres. Both pipelines start at 80 m. HDRP allows up to 1,000 m.
Blur Scale Changes the size of the roughness filter.
Radiance Limit Limits very bright hits while keeping their hue.
Adaptive Probes (URP) Uses baked Adaptive Probe Volumes when the URP asset enables them.
Transparent Receivers (URP 6.6) Traces an extra layer for eligible transparent materials when the Unity 6.6 reflection input is enabled.
Intensity Scales the added reflection in HDRP and the URP compatibility pass. It starts at 0.35.

Start with the default sampling mode. If thin reflections break up, increase sampling. If GPU time is too high, lower sampling or shorten Ray Length. In URP, turn off Transparent Receivers if the scene does not need them. Render cost also depends on how much of the screen receives the effect and how often scene geometry changes.

Check materials and debug views#

For a reflected Shader Graph material with custom property names, add Reflection Material Binding to its renderer. Enter the shader property reference names for base texture, base color, emission texture, emission color, or alpha cutoff as needed. Use Unlit for hits that should use unlit shading. The hit shader reads the mapped inputs. Complex graph logic and vertex displacement need a material approximation.

Select the override checkbox for Debug View. With the Unity 6.6 URP reflection input enabled, use Debug Surface to show Opaque, Transparent, or Both. The transparent view needs Transparent Receivers. In HDRP and earlier URP versions, the opaque diagnostic appears before the pipeline draws transparent objects.

View What you see
Reflection Radiance Filtered hit color before it reaches the camera color. Bright values use a compressed display range.
Ray Hits And Misses Green indicates a hit. Magenta indicates a miss. Black indicates a pixel that received no ray.
Hit Distance A logarithmic grayscale view up to Ray Length.
Receiver Smoothness Darker pixels have less smoothness.
Filter Confidence White indicates the strongest traced result.
Off The camera shows the regular image.

If there is no effect, check Direct3D 12, the active renderer or Custom Pass, and the volume's Enable checkbox and value. Check that the camera can see the volume's layer. If an object is absent from a reflection, check Ray Length, the camera's culling mask, and the object's ray tracing mode. Use Reflection Material Binding if a reflected material uses custom property names.

Unity warnings in HDRP#

A fresh import or Windows build can report these messages in Unity 6000.6.10f1 with HDRP 17.6.0. The gallery builds successfully with them.

  • Unity can report floating-point division by zero in its HDRP/Eye shader. To avoid that shader in the gallery, assign an HDRP Lit material to the eye object.
  • Unity can treat #include_with_pragmas as #include when it imports the Particle Lit and Particle Unlit templates from Shader Graph.
  • Unity can report a partial-class filename warning in Render Pipelines Core's Editor/Deprecated.cs.

Remove the package#

  1. Remove Universal Reflection Feature from your URP Renderer Data, or Universal Reflection Pass from your HDRP Custom Pass Volume.
  2. Remove the UniversalReflections overrides from your Volume Profiles.
  3. Delete Assets/Truss/UniversalReflections through the Project window.