[Unity优化]批处理02:动态批处理

参考链接:

https://docs.unity3d.com/Manual/DrawCallBatching.html

1.

要求mesh不能超过900个顶点属性,同时不能超过300个顶点

如果shader用到了Vertex Position, Normal and single UV,那么不能超过300个顶点

如果shader用到了Vertex Position, Normal, UV0, UV1 and Tangent,那么不能超过180个顶点

如下,Cube可以被批处理,Sphere不可以被批处理(单个Sphere顶点数>500)

扫描二维码关注公众号,回复: 6036753 查看本文章

2.

transform的scale属性不能有负值

如下,图一均为(1,1,1),图二将其中一个改为(1,-0.1,1)

3.

使用不同的材质会破坏批处理

4.

多个pass的shader会破坏批处理

猜你喜欢

转载自www.cnblogs.com/lyh916/p/10779688.html
今日推荐