I’m working on some kind of effect that needs to use one texture on all the different materials in the scene, it takes 20ms for the main thread to run, but after lowering the resolution of that texture it only takes 13ms for the main thread to run, yielding higher fps. So I’m wondering if:
When we have a lot of objects with different materials in the scene, but the materials all use the same 2D texture(to be more clear, the materials have a lot of different properties, and one of the properties is a texture, and all the objects in the scene uses the same texture for that property), does unity re-upload the same texture each time it renders a different mesh?(assuming no batching is performed)
I tried to set the property with a single Shader.setGlobalTexture() call and see if it will run faster, but unfortunately not…
so I’m thinking even properties set with the Shader.setGlobal functions will still be re-uploaded for every different material that uses the same texture for that property?
if so, is there anyway I can tell unity not to re-upload the texture every single time?