Search Issue Tracker
Not Reproducible
Votes
1
Found in
2018.3.0b5
Issue ID
1090093
Regression
No
Graphics.DrawMeshInstanced merges incompatible batches when overriding material properties using MaterialPropertyBlock
Steps to reproduce:
1. Open the attached project
2. Make sure that Assets/material is using TestShader and that GPU Instancing is enabled
3. Enter Play mode
Expected result: Spheres on the right are white
Actual result: Spheres on the right are red
Reproducible with: 5.6.3f1, 2017.4.13f1, 2018.2.12f1 2018.3.0b5, 2019.1.0a4
Notes:
- The expected behavior is reached only when the color property is explicitly overwritten in the second block.
- "It happens too when the block is recreated instead of cleared or if the call is done without a MaterialPropertyBlock."
Comments (1)
-
GilCat
Feb 04, 2019 12:18
What are the plans for solving this?
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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Resolution Note:
block.SetColor(property, Color.red);
Graphics.DrawMeshInstanced(mesh, 0, material, transforms, transforms.Length, block);
block.SetColor(property, Color.white);
Graphics.DrawMeshInstanced(mesh, 0, material, transforms, transforms.Length, block);
works