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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
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.