Fixed an issue where changing the surface type of a material from opaque to transparent doesn't correctly update the batch when using the GPU Resident Drawer.
Reproduction steps:
1. Open the “ReproProject“ project
2. Open the “Assets/Scene/New Scene“ scene
3. Select the “Assets/Materials/Lit“ Material in the Project window
4. Change the Surface Type to “Transparent“ in the Inspector window
5. Select the “Assets/Materials/SimpleLit“ Material in the Project window
6. Repeat step 4
7. Open the Frame Debugger window (Window > Analysis > Frame Debugger)
8. Enable the Frame Debugger by clicking the “Enable” button in the Frame Debugger window
9. Observe the “DrawTransparentObjects” rendering event
Expected result: There are 3 Draw Calls in the “DrawTransparentObjects” rendering event
Actual result: There are only 2 Draw Calls
Reproducible with: 6000.0.8f1
Couldn’t test with: 2021.3.40f1, 2022.3.35f1 (due to feature not existing)
Reproducible on: Windows 11 Pro (22H2)
Not reproducible on: No other environment tested
Notes:
1. The issue does not reproduce with the GPU Resident Drawer disabled
2. Disabling the GPU Resident Drawer and then enabling it fixes the issue
Prioritise and Follow this issue
Have a workaround or additional info about this issue?