Search Issue Tracker
By Design
Votes
0
Found in [Package]
13.1.5
Issue ID
1396814
Regression
No
[HDRP] Visual rendering glitch when using some Passes in the Custom Pass Volume Component
How to reproduce:
1. Open the user's attached "hdrp camera error" project
2. Open the "SampleScene" Scene
3. Select the "Custom Pass" GameObject in the Hierarchy
4. Set the "Custom Pass Volume (Component) -> Custom Passes -> Overrides -> Pass Name" to "ScenePickingPass" in the Inspector
Expected result: The GameObjects are rendered without any glitches
Actual result: The appearance of the GameObjects in the Scene is glitch-rendered
Reproducible with: 7.7.1 (2019.4.35f1), 10.8.1 (2020.3.27f1), 12.1.4 (2021.2.9f1), 13.1.2 - 13.1.5 (2022.1.0b5, 2022.2.0a2)
Note: The issue is reproducible when the Pass is "ScenePickingPass", "SceneSelectionPass", "META", "MotionVectors", "TransparentBackface"
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Silent crash when clicking in Scene View in a specific project
- The Player renders black on a Quest headset when MSAA, Post Processing, and Spacewarm depth submission are enabled
- Graphics Compositor breaks Unity rendering when the "Output Camera" is changed to a scene Camera and one Camera SubLayer is active
- The Editor freezes on RenderGraphViewer.Repaint when entering too many characters in search fields without character limits
- Adding a new SubLayer in Graphics Compositor renders BaseLayer darker and makes it flicker
Resolution Note:
Hello,
The behavior you're seeing is completely normal. The DrawRenderers custom pass renders objects in the scene and allows you to do that with custom material and a pass. In HDRP we use material passes to output material information at different places in our pipeline thus unless you set up the custom pass to correctly use this specific information, the result will be undefined.
This is what happens when you try to render the "ScenePickingPass, SceneSelectionPass or META" passes directly in the color buffer. These passes are not designed to be used like that so the result is undefined. To use them properly, they have to be rendered in a separate buffer so their information can be used.
We want to keep this flexibility even if you can end up in a situation that doesn't make sense because restraining the system would hurt its versatility.
If you want examples on how to use custom passes, I recommend checking this repository: https://github.com/alelievr/HDRP-custom-passes.
Also note that in Unity when you change settings related to a shader it goes completely cyan, this indicates that the shader is compiling asynchronously and it's perfectly normal.