Search Issue Tracker

Fixed in 2022.1.X

Votes

0

Found in

2021.2

2021.2.0b4

Issue ID

1355311

Regression

No

SRP Batcher Batches Materials together when using different Integer Stencil Ref and Comp values

Graphics - LowLevel

-

How to reproduce:
1. Open user-submitted project
2. Select "Far - Toggle this" Game Object in the Hierarchy and deactivate it
3. Inspect the rendering of "Near" GameObject
4. Select "Far - Toggle this" Game Object in the Hierarchy and activate it
5. Inspect the rendering of "Near" GameObject

Expected result: "Near" GameObject is always rendered on top of the stencil
Actual result: Rendering of the "Near" GameObject changes as we toggle "Far - Toggle this" GameObject

Reproducible with: 2021.2.0b4
Could not test with: 2019.4.30f1, 2020.3.19f1, 2021.1.22f1, 2021.2.0b12, 2022.1.0a9 (Shader Errors)

Notes:
- Assigning "Unlit Integer" Shader to either "Near Mat" or "Far Mat" Materials fixes the problem
- Disabling SRP Batcher in "Custom RP" Asset fixes the problem
- Changing Blend Source Factor (Src Blend Property) or Destination Factor (Dst Blend Property) of "Near Mat" or "Far Mat" fixes the problem
- Changing the ZWrite value (Z Write Property) of "Near Mat" or "Far Mat" fixes the problem

  1. Resolution Note (fix version 2022.1):

    Fixed in: 2022.1.0b1

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.