Search Issue Tracker

By Design

By Design in 2023.2.X

Votes

0

Found in

2021.3.29f1

2022.3.6f1

2023.1.7f1

2023.2.0b3

Issue ID

UUM-45386

Regression

No

_CameraDepthNormalsTexture ignores material cutout when in Player

Shader System

-

Reproduction steps:
1. Open the “DepthNormalWebGL“ project
2. Open the “SampleScene“ scene
3. Build And Run
4. Observe the rightmost quad

Expected result: The quad uses the texture’s alpha and displays a green x
Actual result: The quad is fully green

Reproduced in: 2021.3.29f1, 2022.3.6f1, 2023.1.7f1, 2023.2.0b3

Reproduced using: macOS 13.4.1 (Intel), Windows 10

Notes:
1. Reproduced in StandaloneOSX and WebGL
2. Not reproduced in Editor and Play Mode
3. The reporter uses _CameraDepthNormalsTexture in their post effect for opaque materials with cutouts (leaves)

  1. Resolution Note:

    For the depth normals rendering to work as intended here, the material must also have float _Cutoff property as the replacement shader doing the work relies on this value. As there is no cutoff set, the rendering will treat it as zero and thus will not cut out anything. Adding this property to the shader graph and setting a positive value on it fixes the issue.

  2. Resolution Note (2023.2.X):

    For the depth normals rendering to work as intended here, the material must also have float _Cutoff property as the replacement shader doing the work relies on this value. As there is no cutoff set, the rendering will treat it as zero and thus will not cut out anything. Adding this property to the shader graph and setting a positive value on it fixes the issue.

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.