Search Issue Tracker
Won't Fix
Won't Fix in 2023.3.X
Votes
0
Found in
2021.3.33f1
2022.3.16f1
2023.2.4f1
2023.3.0b1
Issue ID
UUM-59243
Regression
No
CommandBuffer.DrawMeshInstanced does not set unity_BaseInstanceID and decals flicker when splitting batches
How to reproduce:
1. Open the attached “RenderingCommandBuffers50b22.zip“ project
2. Open the “_DeferredDecals“ Scene (Assets/DefferedDecals)
3. Enter Play Mode
Expected result: Decals don’t flicker
Actual result: Decals are flickering
Reproducible with: 2021.3.33f1, 2022.3.16f1, 2023.2.4f1, 2023.3.0b1
Reproducible on: macOS 14.0 Sonoma (Intel)
Not reproducible on: No other environment tested
Notes:
- Also reproducible in Player
- The user noted that his goal was to add per-instance data to command buffer drawn deferred decals. A maximum of 1023 items per call can be drawn to DrawMeshInstanced, but if the data is too large it will split the call into multiple batches, in the user’s case, it does batches of 511, 511, and 1. The user used the instanceID property to look up data in an array that is set on the MaterialPropertyBlock, but the subsequent batches started to flicker
- Selecting the "LevelManager" GameObject in the Hierarchy and changing the "Max Batch Size" to around 500 or below (may vary on the machine) in the Inspector will cause the issue to stop from happening
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
Issue seems to be from incorrect instance property setup from the user's side. Modified shader file sent to customer. Please reopen if that did not fix it.
Resolution Note (2023.3.X):
Issue seems to be from incorrect instance property setup from the user's side. Modified shader file sent to customer. Please reopen if that did not fix it.