Search Issue Tracker
By Design
Votes
0
Found in
2018.1.0a1
2018.3.0a1
2018.3.0f2
2019.1.0a1
Issue ID
1137860
Regression
No
Using mesh uv's for calculating clip space position in shader breaks Dynamic batching
How to reproduce:
1. Open the attached project
2. Open the "BatchingTest - NOT_WORKING.unity" scene
3. Check the statistics
Actual result: Dynamic batching doesn't batch the meshes. (Batches:2, Saved by batching:0)
Expected result: Dynamic batching should batch the meshes. (Batches:1, Saved by batching:1)
Reproducible with: 2019.2.0a10, 2019.1.0b8, 2018.3.11f1, 2018.1.9f2, 2017.4.24f1.
Notes:
Dynamic batching works with: output.pos = UnityObjectToClipPos(input.pos);
Dynamic batching doesn't work with: output.pos = UnityObjectToClipPos(float4(input.uv,1,0));
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note:
Once dynamic batching is enabled, the object matrix will be identity. (object matrix is the transform component's matrix)
And the shader expects that there is some non-identity matrix set as the object matrix, that's why it wont work.