docs.unity3d.com
    Show / Hide Table of Contents

    Screen Space Refraction override

    Screen space refraction uses the color buffer or Reflection Probes to produce a refraction effect.

    HDRP uses screen space refraction by default if you set a Material's Surface Type to Transparent. For information about how screen space refraction works in HDRP, or to turn refraction off, see Refraction in HDRP.

    The Screen Space Refraction override controls Screen Weight Distance, which sets how quickly screen space refractions fades from sampling colors from the color buffer to sampling colors from the next level of the reflection and refraction hierarchy.

    Increase Screen Weight Distance to reduce visible seams on an object between refracted colors from the screen, and refracted colors from probes or the Skybox.

    Using Screen Weight Distance

    To use this setting, you must enable it on a Volume, as follows:

    1. In the Scene or Hierarchy view, select a GameObject that contains a Volume component.
    2. In the Inspector for this object, select Add Override > Lighting > Screen Space Refraction.


    In the refractive cube on the left of the screen, Screen Weight Distance affects the edges of the screen where HDRP fades from using the color buffer to using Reflection Probes.

    Properties

    Property Description
    Screen Weight Distance Adjust this value to set how quickly HDRP fades from sampling colors from the color buffer to sampling colors from the next level of the reflection and refraction hierarchy. Use Screen Weight Distance to reduce visible seams between refracted colors from the screen, and refracted colors from probes or the Skybox.

    You can also use the Volume Scripting API to change Screen Weight Distance.

    Additional resources

    • Refraction in HDRP
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023