Search Issue Tracker

By Design

Votes

0

Found in

2020.3.44f1

Issue ID

UUM-22909

Regression

No

HDRP Custom Pass Renderer Selection only works with GameObjects using HDRP/Lit Shaders in Builds

--

-

Reproduction steps:
1. Open the attached “BackgroundSeparationTest.zip“ project
2. Open “OutdoorsScene” scene
3. Enter Play mode and observe the Game window
4. Exit Play mode and Build and Run the project
5. Observe the Build window

Expected result: GameObjects are colored regardless of the Shader used
Actual result: Only GameObjects that use the HDRP/Lit Shader are colored

Reproducible with: 2020.3.44f1
Not reproducible with: 2021.3.16f1, 2022.2.2f1, 2023.1.0a25

Reproduced on: macOS Monterey 12.6 (Intel)

Note:
- Cannot test on WebGL due to errors: “BuildFailedException: Platform WebGL with graphics API OpenGLES3 is not supported with HDRP”
- Couldn’t find the fixing version due to obsolete code being used that prevents reproduction

  1. Resolution Note:

    Hello,

    The objects disappear in the build because you're using the "Deferred" rendering path in your HDRP asset. Selecting this rendering path will cause all the "Forward" shader variants to be stripped during the build. These variants are necessary for your custom pass, for more information you can see this section of the documentation: https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@15.0/manual/Custom-Pass-Troubleshooting.html#opaque-objects-disappear-during-build

    To fix the issue you can either use "Both" in the rendering path settings or use another replacement shader to render your mask. The replacement shader can be created from the "HDRP Custom Renderers Pass" menu in Create > Shaders.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.