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

时间:2019-04-27 19:13:57   收藏:0   阅读:159

参考链接:

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)

技术分享图片

技术分享图片

 

2.

transform的scale属性不能有负值

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

技术分享图片

技术分享图片

 

3.

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

 

4.

多个pass的shader会破坏批处理

原文:https://www.cnblogs.com/lyh916/p/10779688.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!