Search Issue Tracker
Won't Fix
Votes
0
Found in
2022.2.4f1
2023.1.0a26
2023.2.0a8
Issue ID
UUM-31545
Regression
Yes
The GameObject is not transparent when setting CameraDepthTexture as a depth render target
Reproduction steps:
1. Open the attached project “RenderProject”
2. Open the “Assets/Scenes/SampleScene.unity” scene
3. Observe the “Sphere” GameObject transparency in the Game View
Expected result: Some part of the “Sphere” GameObject is transparent (Invisible cube is drawn to CameraDepthTexture directly)
Actual result: The “Sphere” GameObject is not transparent
Reproducible with: 2022.1.0a16, 2022.2.4f1, 2023.1.0a26, 2023.2.0a8
Not Reproducible with: 2021.3.22f1, 2022.1.0a15
Could not test with: 2020.3.44f1 (“Assets\Scripts\MyRendererFeature.cs(31,74): error CS0246: The type or namespace name 'UniversalRenderer' could not be found (are you missing a using directive or an assembly reference?)”), 2022.2.12f1, 2023.1.0b10(“Assertion failed: UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)”)
Reproducible on: Intel macOS 13.0.1, Windows 10
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
- Sahder errors in Player when "Strict shader variant matching" is enabled and the rendering path is set to "Deferred"
- NullReferenceExceptions are being thrown when saving a ScriptableObject with an array of a type with a CustomPropertyDrawer that uses TrackPropertyValue
- Applied velocity is inconsistent when using Rigidbody AddForce() with ForceMode.VelocityChange
- Crash on AudioUtil_CUSTOM_HasAudioCallback when exiting Play Mode while the Inspector is displaying a GameObject with an empty script attached
- Scroll offset is framerate-dependent when scrolling with velocity in the Device Simulator
Resolution Note:
We currently do not support CameraDepthTexture as an actual render target and everything that should be in there should be rendered before CopyDepthPass.
However, in this case this can be worked around fairly easy by modifying user's shader to use ColorMask R instead of ColorMask 0. The issue happened when we changed depth copy texture to be a R32 color texture, so the shader in this project doesn't write anything as it's not writing to the R channel