Hey guys, I’ve looked around, but couldn’t find a clear answer to this:
-Is Unity sending 3D objects into the GPU optimized for instanced rendering?
Let me elaborate a bit:
-Suppose I have a 3D model “Car”, which has Texture, Mesh, Scale, Position and Rotation. That model is a prefab.
-Now, on my scene I have Car1, Car2, Car3 … Car30, which are editor instances of that prefab.
My question is:
When Unity sends these objects to the GPU, does he tell the GPU:
A) Get the Car object (Mesh + Texture) and render it on the position + rotation of Car1, Car2, Car3…Car30 instances?
OR
B) render Car1 (Mesh+Texture+Position, etc.), then Car2, then Car3, etc.?
I’m asking because I have some GFX optimizations that need to be done and I’m under the impression that the situation on case A, would actually allow me to render a whole bunch of identical objects in 1 draw call, while B would take 30 draw calls (one per object), since each one would be treated like a different entity.
I’m asking this, because while it seems that Unity does apply some layer of optimization on it’s primitives, I get the impression that when it comes to imported models, he treats each prefab instance as “complete” object and not like a repositioning of a existing one.
Is this assumption correct, or does Unity optimizes everything pre-render? I’m asking this to avoid doing redundant work e.g re-inventing the wheel
Thanks in advance for the time and for the help!