Search Issue Tracker
By Design
By Design in 2023.1.X
Votes
0
Found in
2020.3.36f1
2021.3.5f1
2022.1.8f1
2022.2.0a18
2023.1.0a2
Issue ID
UUM-8737
Regression
No
URP Custom Render Pass renders black in build when using OpenGLCore Graphics API
How to reproduce:
1. Open project "1423625_opengl-2021.3 (2).zip"
2. Press Edit -> Project Settings -> Player -> Other Settings
3. Disable "Auto Graphics API for Windows"
4. Choose OpenGlCore as Graphics API
5. Press File -> Build And Run
Expected result: the screen is rendered red
Actual result: the screen is rendered black
Reproducible with: 2020.3.36f1, 2021.3.5f1, 2022.1.8f1, 2022.2.0a18, 2023.1.0a2
Reproducible on: Windows 10 Pro
Note: issue doesn't appear when using Direct3D11 Graphics API
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
In the custom render pass a Temporary RT is used and never cleared: https://docs.unity3d.com/ScriptReference/RenderTexture.GetTemporary.html
As the documentation says you can't rely on the previous contents of the RT. And because a custom shader is used for the blit (that has depth testing enabled) it does not pass the depth test only on OpenGL. https://docs.unity3d.com/Manual/SL-PlatformDifferences.html
I would recommend disabling depth testing in the custom shader or clearing the temporary RT.
Resolution Note (2023.1.X):
In the custom render pass a Temporary RT is used and never cleared: https://docs.unity3d.com/ScriptReference/RenderTexture.GetTemporary.html
As the documentation says you can't rely on the previous contents of the RT. And because a custom shader is used for the blit (that has depth testing enabled) it does not pass the depth test only on OpenGL. https://docs.unity3d.com/Manual/SL-PlatformDifferences.html
I would recommend disabling depth testing in the custom shader or clearing the temporary RT.