Skip to content
View Categories

How to add reflections to your scenes

Built-In

Shiny SSRR can be run in forward or deferred mode depending on your camera rendering path setting.

In forward, in addition to add Shiny SSRR to your camera, you need to add a Reflections script to any object or group of objects that will receive reflections. Each group of objects can use different settings bringing lot of flexibility.

In deferred, only global settings on the camera script (Shiny SSRR script) are used and Reflections scripts are ignored because Shiny SSRR will work with the g-buffers which are independent of the scene geometry.

URP

Depending on the URP version you have installed in your project, Shiny SSRR can be run in forward or deferred modes:

  • In URP versions <12.0, this pipeline only supports forward rendering path. In this case, just jump to the next section (Forward rendering configuration).
  • In URP 12.0 and up, the pipeline supports both forward and deferred. This rendering path can be configured from the renderer asset:

Two different workflows in URP

In URP, Shiny SSRR 2 let you choose between two workflows: the previous workflow in which reflections were driven by the smoothness property of the material alone, and the new “Metallic and Smoothness” workflow, which fully respects both properties, providing more flexibility and physically correctness at material level. This setting can be found in the Volume component.

By default, when importing Shiny SSRR on your project, the workflow will automatically be set on “Smoothness Only” which means only smoothness of the materials will be used to control the intensity of the reflection. The sharpness of the reflection is driven by the other options at the volume level, like minimum blur. Now, when activating the second option “Metallic and Smoothness”, the Metallic value of materials will be the intensity of the reflection on that object, while Smoothness defines the sharpness of the reflection.

Forward rendering configuration

In this mode, add the Reflections script to any game object that you want to receive reflections. A single Reflections script can cover many game objects thanks to the “Scope” options shown in the inspector below:

When you add this script to the game object, it will start receiving reflections (assuming you have the Screen Space Reflections render feature correctly installed as described in the previous page).

The rest of options are:

  • Ignore: enable this option to exclude this game object from getting any reflection. This is useful if you assign the Reflections script to the root of a group of objects, but you don’t want reflections on some of them.
  • Scope: in addition to add reflections to this object, you can specify that reflections should also be added to the children of the object. And you can also specify some filters, like the layer, a name pattern or specific sub-meshes.
  • Use Material Smoothness: if the game object uses a PBR material with _Smoothness property, the asset can use that value so changing the smoothness of the material will affect the reflections as well.
  • Smothness Map: the smoothness map is an optional texture that can be assigned to the material or used with the option Smoothness Source = “Custom”. The Alpha value of the texture is used as the source of the smoothness.
  • Per Sub Mesh Smoothness: let you specify a different smoothness value per submesh.
  • Smothness: if the “Use Material Smoothness” is not enabled or the material doesn’t have a smoothness property, this value will be used instead.
  • Use Material Normal Map: if the game object uses a material with a normal map, use it. If the material has no normal texture, this option will be ignored.
  • Material Property Names: this are the default names for usual smoothness map textures, normal map and smoothness intensity values used in standard shader. Feel free to specify custom shader property names if required. The smoothness value is encoded in the alpha channel of the smoothness map so make sure that texture preserves the alpha value in Import settings.
  • Override Global Settings: let you use different raytracing settings only for this object.

Why is necessary to add a Reflections script on the objects?

Because forward renderer doesn’t store (by default) normals and smoothness into a dedicated buffer which are required to compute reflections. The asset needs to compute the normal per object in order to produce correct reflections. In deferred rendering path, Shiny SSRR can leverage the g-buffers to automate the effect on the entire scene without requiring you to add the Reflections scripts.

However, there’s a bonus for using this method: by adding and customizing Reflections per group of objects you have total control of how the effect renders on the screen. In order to make this process faster, there’re global settings that are automatically applied to all reflections (see next section).

Also, because you’re specifying which objects will require reflections, the overall result can render faster because the system doesn’t need to process the entire screen – only those pixels of the objects that will receive reflections.

Deferred rendering configuration

If your camera is set to deferred rendering path, Shiny SSRR will detect this and automatically work in that mode.

Benefits of deferred include a unified approach to reflections and more physically based results since smoothness is read per pixel. Also, you don’t need to add the Reflections script to the objects that will receive reflections.

On the other hand, you lose a bit of flexibility since you can no longer customize the raytracing settings per object but globally. This can be tricky as sometimes you prefer to use less or more samples or different decay or jitter settings for example. Also, because deferred applies to entire screen, it can be a bit more expensive.

Mixed Mode

In version 6.1, when rendering in deferred mode, Shiny SSRR allows you to also use the Reflections script on certain gameobjects. This is useful to add reflections to puddles for example, which are objects that commonly render in forward rendering path (because they’re transparent objects) and ignore g-buffers. To enable this feature, select the Shiny SSRR global settings or volume and scroll down in the inspector until you see the option “Use Reflections Scripts”.

Global settings

The global settings are located in the Shiny SSRR render feature itself and provide options that affect all reflections. These settings are shown in the screenshot below:

General settings

  • Reflections Style: Choose the reflection style between “Shiny Reflections” to render the reflections with normal visual appearance and “Dark Reflections” to add a dark tone to the reflection, resulting in a faster optimized performance while obtaining a beautiful look!
  • Reflections Style: Choose between Shiny default reflections and Dark Reflections Feature.
  • Workflow:
    • Smoothness Only Workflow: Uses a single value to control both reflection intensity and surface roughness. It’s a simplified approach that doesn’t fully represent physical material behavior.
    • Metallic and Smoothness Workflow: Follows a physically based rendering (PBR) model. The metallic property defines how reflective a surface is (based on whether it’s metal or non-metal), while smoothness controls how sharp or blurry the reflections appear. This workflow offers more realistic and accurate material representation.
  • Show In Scene View: Show reflections in Scene View Window
  • Use Custom Bounds: Specify a volume where reflections can be rendered.

Quality Settings

  • Sample Count: the number of steps used in the raytracer. The more samples, the more quality and extensive the reflections result.
  • Max Ray Length: the maximum distance of reflections.
  • Thickness: when the ray passes behind an object, it needs to figure if it’s hitting the object or passing behind it. Since the back faces of objects are not rendered, the asset uses a fixed value. Increase this value to ensure all reflections are captured.
  • Binary Search Iterations: increase to refine the hit position detected by the raytracer. Usually a value of 6 or 8 is enough in most situations.
  • Compute Back Faces: enables a depth pre-pass to calculate true surface thickness by rendering the back-facing geometry of opaque objects within the view frustum. This improves reflection accuracy, especially for thin or complex meshes, but may increase rendering cost and require higher sample counts for optimal results.
  • Max Thickness: Assumed thickness of geometry in the depth buffer before binary search.
  • Thickness Fine: when this option is enabled, after the binary search has refined the reflection hit position, the algorithm will discard the reflection hit if the distance from the ray to the surface is greater than this value. Therefore, this is the actual thickness value used after binary search. Keep it as low as possible as long as reflections look bright and sharp.
  • Jitter: reduces banding artefacts by adding a random offset to the starting position of the rays.
  • Animated jitter: this option changes the jitter amount per pixel every frame redistributing the noise.
  • Temporal Filter: Enables temporal filter, which reduces flickering.
    • Response Speed: Temporal filter response speed determines how fast the history buffer is discarded.
  • Downsampling: Downsampling multiplier applied to the final blurred reflections.
  • Depth Bias: Bias applied to depth checking. Increase if reflections disappear at the distance.

Reflection Intensity

  • Intensity: this is a global multiplier to all reflections intensity and let you tune down the effect globally.
  • Min Intensity: determines the minimum reflection intensity on all surfaces. Can be used to force a very shiny environment.
  • Max Intensity: caps the maximum reflection intensity on any surface.
  • Smoothness Threshold: Minimum smoothness to receive reflections.
  • Fresnel: this setting reduces the reflection intensity based on the view angle to the surface. A value of 1 gives more realistic results.
  • Decay: this setting reduces the reflection intensity based on the distance to the reflected point.
  • Metal Boost: Improves appearance of metallic surfaces in deferred.
  • Specular Control: reduces intensity of specular in the reflections. This will produce less flickering/shimmering in the scene caused by certain materials.
  • Skybox Intensity: Skybox reflection intensity. Use only if you wish the sky or camera background to be reflected on the surfaces.
  • Start Distance: Attenuates reflections near camera (attenuation start in meters).
  • Far Fade Start Distance: Attenuates reflections far from camera (distance in meters).
    • Range: Attenuates reflections far from camera (distance in meters).
  • Vignette Size: reflections are tuned down around the screen borders. This setting controls the intensity of this reduction.
  • Vignette Power: Controls the attenuation gradient of effect on screen borders.

Reflection Sharpness

  • Fuzzyness: a blur multiplier which is also based on the distance to the reflected point so distant reflections look blurrier than contact reflections.
  • Contact Hardening: increases the sharpness of contact (short distance) reflections.
  • Minimum Blur: defines the minimum blur intensity for all reflections.
  • Blur Downsampling: size of the blur buffers. Increasing only if you want to improve performance a bit.
  • Blur Strength: let you control the blur spread along the x and y axis.

Advanced Options

  • Output Mode: let you visualize (for debugging purposes) the different buffers generated by Shiny.
  • Low Precision: uses regular 32 bit texture format (RGBA32) for internal buffers instead of 16 bit per channel/HDR (ARGBHalf) which might improve performance on certain devices but will reduce accuracy.
  • Stop NaN: clamps input pixel values to valid color range values. Use this option only if needed, for example if the image is not rendered at all, you visualize black patches or other rendering artifacts.
  • Stencil Check: allows you to mask reflections on screen based on the contents of the stencil buffer.
  • Transparency Support: enable this option to run a custom depth-prepass on certain transparent objects such as sprites or other transparents (not UI). Those objects will also cast reflections on other surfaces. You can choose which transparent objects can cast reflections by layer or by adding a “Shiny Transparent Support” script to them.
  • Use Reflections Scripts: Uses any reflection script when rendering in deferred rendering path.
  • Layer Mask: Which reflection scripts can be used.
Back To Top
Mostrar formularion