(一)一次Drawcall 的产生都经历了哪些过程:
(二)Static Batching
(三)SRP Batching
(四) GPU Instancing
(五)GPU Instancing的介绍
(1)直接勾选 Material.enableInstancing
由unity自动排序,裁剪
(2)用Graphic.DrawInstancedIndirect( 此接口每一帧都会调用 ,但是消耗很小)
用 CommandBuffer.DrawInstancedIndirect( 用CommandBuffer,只调用一次就够用)
请注意此接口: DrawMeshInstancedIndirect,
此接口中的mesh: 不会被视锥体裁剪, 如果是Transparent类型也不会被排序
(3)相同Instanced DrawCall数量下 , DrawMeshInstanced形式的额外开销更小
(4)对于不透明物体: 建议直接使用“打勾”
以上总结了 static Batch , SRP, GpuInstancing的主要使用范围
最近飘了,好好反思!!!!!!!