Search Issue Tracker
Won't Fix
Votes
2
Found in
2019.4
2020.2
2020.2.1f1
2021.1
2021.2
Issue ID
1316016
Regression
No
Clipped parts of a Surface make parts of an overlapping Surface black when using the HDRP\Lit Shader and Surface Type is Opaque
How to reproduce:
1. Open the user-attached project "Z Fighting Bug Test.zip"
2. Open the Scene "OutdoorsScene.unity"
3. Select the "Alpha Clipping Material" from the Assets folder
4. Make sure that the Shader is set to "HDRP\Lit", the Surface Type is set to "Opaque" and "Alpha Clipping" is checked in the Inspector window
5. Open the Game view
Expected result: No part of any Surface is blacked out
Actual result: Cutout parts of the left plane "Plane" when Alpha Clipping is checked cause the corresponding parts of the right plane "Plane (1)" to appear black
Reproducible with: 2019.4.21f1, 2020.2.6f1, 2021.1.0b8, 2021.2.0a7
Notes:
- Tested in builds and Editor with Direct3D11, Direct3D12, Vulkan and Metal Graphics APIs
- Changing the Transform Position of the "Main Camera" GameObject on the X-axis to approx. -2.3 or less, will render the right plane "Plane (1)" on top of the left plane "Plane" in the Game view and make parts of the left plane appear black
- Changing the Shader of the "Alpha Clipping Material" to "HDRP\LitTessellation" or changing the Surface Type of the "Alpha Clipping Material" to "Transparent" make the issue disappear
- The issue is also apparent in the Scene view but moving the Viewport camera makes the texture glitch through the black parts
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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
Resolution Note:
The underlying issue here is the z-fighting between the objects. Alpha clipping is not done during the gbuffer pass for performance reasons