- Home /
many mesh filters vs many materials
I am going through my game and making it more efficient. I have a small custom implementation of a 3d gui system made of a single plane mesh made of 2 triangles.
Up until now I have been setting the Material's Texture offsets to set the tile on texture atlas grids. Doing this creates a new instance of the material thus more draw calls.
I am switching to use UV coordinates instead. That way, no material instances are created but the Mesh Filter has now become the instances (since each mesh will use different UV coords).
This is ok right? Are instances of Mesh Filters better than instances of Materials? Can I still do batching?
If you're concerned, try both approaches, review the results in the Profiler window, and see which has better performance/memory characterisics. (Then come back here and tell us what you found out :-)
Wouldn't you be better off just updating the mesh? Changing the uvs to fit - that's what I'd do.
@yoyo yes i will eventually have to do that if I can't get an answer here. However, its difficult to allot time to tests like these when you have to create a business and a product all by yourself ;)
I mean just write to the UVs in the mesh and dynamically update it rather than making a mesh for each setting.
Your answer
![](https://koobas.hobune.stream/wayback/20220613090934im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Draw Calls and Batching changing as I move the object in the camera view - why is this? 1 Answer
Why does the frame debugger say node uses different shader when it isn't? 0 Answers
Dynamic Batching Question 1 Answer
How should I handle masses of bullets? 1 Answer
Why does applying a material to a object break batching? 2 Answers