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
- Specular lighting visible in a camera with Path Tracing when Preserve specular lighting is disabled in observed material
- Cinemachine package throws CS1061 errors in the Console when installed in a project that has HDRP and URP installed
- Editor.log file size grows rapidly when a scene exceeds the "Maximum Shadow on Screen" limit setting in the HDRP Asset
- Player build freezes after calling Application.Quit() when the scripting backend is set to IL2CPP
- Texture is not applied on a Custom Render Texture when a Cubemap is selected as the texture
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.