Search Issue Tracker
By Design
Votes
0
Found in
2017.4
2018.4
2019.2
2019.2.6f1
2019.3
2020.1
Issue ID
1186136
Regression
No
Materials do not get batched when GPU Instancing is enabled and Texture2dArray is used
How to reproduce:
1. Open attached project "GPUInstancing.zip" and scene "SampleScene"
2. Enter Playmode
3. Observe Scene view -> Stats -> Batches
Expected result: the Batches is low (due to materials getting batched)
Actual result: the Batches number is around 680-750 (the number is inconsistent)
Reproducible with: 2017.4.33f1, 2018.4.12f1, 2019.2.10f1, 2019.3.0b9, 2020.1.0a9
Forum thread:
https://forum.unity.com/threads/gpuinstancing-texture2darray-issue.746006/#post-4975037
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
- Package Manager lets some packages to be imported when everything in the package is deselected while other packages have the “Import” button greyed out
- The Blackboard scrolls up and selecting Items breaks when Duplicating Items in a scrolled down List
- "Curve" window workspace doesn't update the scale to match the selected curve preset unless reopened
- StackOverflowException occurs and tests fail to load when the Test Runner window is opened while System.Windows.Forms.dll and System.Deployment.dll are present in the project
- Some UXML Template Asset foldouts appear enabled when all fields inside are disabled
Resolution Note (2020.2.X):
Automatic instancing doesn't allow having non-instanced properties in the MaterialPropertyBlock object, including textures. To set a shared texture property for all instances, you can set it on the material directly, or use Graphics.DrawMeshInstanced instead.