Working with UI in the High Definition Render Pipeline | High Definition RP | 10.2.2
docs.unity3d.com
    Show / Hide Table of Contents

    Working with UI in the High Definition Render Pipeline

    Almost every Project uses some form of user interface (UI). This could be: in a menu system, to indicate a point of interest in your application, or to display valuable information to users. This guide explains how to use Unity UI in your High Definition Render Pipeline (HDRP) Project as well as provide best practice information to keep in mind when working with it.

    HDRP supports all the Canvas Render Modes, however, it only supports Unlit UI shaders for Canvas UI.

    Working in a linear color space

    HDRP Projects require you to work in linear color space. When you create UI in the Editor, ensure the sprite textures are in linear color space to make sure the UI renders correctly. This is especially important for transparent sprites. For more information, see Linear or gamma workflow and Working with linear Textures.

    Multiple camera setup

    HDRP only supports a single camera setup by default. If you need to use more than one camera at the same time, it is best practice to use one the following alternatives:

    • Custom Passes: Allows you to inject shader code and C# at certain points inside the render loop. This gives you the ability to draw GameObjects and process full-screen passes.

    • Graphics Compositor: Allows you to render multiple cameras to the same render target.

    Post-processing effects on UI

    HDRP renders UI during the transparent pass, before post-processing. This means that you need to create Custom Passes and custom Post Processes to achieve typical visual effects for UI.

    For example, if you want to blur the scene background when a UI menu is active, you should:

    1. Render your menu in a Canvas with its Render Mode set to Screen Space - Overlay. Using this render mode means HDRP does not apply post-processing to the canvas.
    2. Add a Custom Pass, injected After Post Process, to blur your scene. For examples on how to create custom passes, see HDRP Custom Passes.

    Known limitations

    Here is a list of known issues between Unity UI and HDRP:

    • HDRP only supports Unlit UI.
    • On VR platforms, HDRP only supports the World Space Canvas Render Mode.
    Back to top
    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