(一)一次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的主要使用範圍
最近飄了,好好反思!!!!!!!