Batch optimization strategy-

Original: https://answer.uwa4d.com/question/5ae1eef932493548fbd32ba1

Original English: https://github.com/Unity-Technologies/BatchBreakingCause/blob/master/README.md

 

Reason for batch failure

1. Additional Vertex Streams — The object specifies additional streams of vertex information using MeshRenderer.additionalVertexStreams.
2. Deferred Objects on Different Lighting Layers — The object is in a different lighting layer.
3. Deferred Objects Split by Shadow Distance — One of the two objects is within the shadow distance and the other is not.
4. Different Combined Meshes — This object belongs to another static mesh that has been merged.
5. Different Custom Properties — This object sets a different MaterialProperyBlock.
6. Different Lights - The object is affected by a different Forward Light.
7. Different Materials - The object uses a different material.
8. Different Reflection Probes — This object is affected by different Reflection Probes.
9. Different Shadow Caster Hash - This object uses other shadow casting shaders, or sets different shader parameters/keywords, and these parameters/keywords will affect the output of shadow casting Pass.
10. Different Shadow Receiving Settings — This object has different "Receive Shadows" parameters set, or some objects are within the shadow distance and others are outside.
11. Different Static Batching Flags — This object uses different static batching settings.
12. Dynamic Batching Disabled to Avoid Z-Fighting - Dynamic Batching is turned off in Player Settings, or temporarily turned off in the current environment to avoid Z-Fighting.
13. Instancing Different Geometries — Render different meshes or sub-mesh using GPU Instancing.
14. Lightmapped Objects — Objects use different lightmaps, or have different lightmap UV conversion relationships in the same lightmap.
15. Lightprobe Affected Objects - Objects are affected by other Light Probes.
16. Mixed Sided Mode Shadow Casters - Objects have different "Cast Shadows" settings.
17. Multipass — The object uses a shader with multiple passes.
18. Multiple Forward Lights - This object is affected by multiple forward lights rendering.
19. Non-instanceable Property Set — Sets non-instanced properties for instanced shaders.
20. Odd Negative Scaling — The object is scaled to an oddly negative value such as (1,-1,1).
21. Shader Disables Batching - The shader explicitly disables batching using the "DisableBatching" tag.
22. Too Many Indices in Dynamic Batch — Too many dynamic batch indexes (over 32k).
23. Too Many Indices in Static Batch — Too many combined grid indices in Static Batch. 48k for OpenGL ES, 32k for OSX, and 64k for other platforms.
24. Too Many Vertex Attributes for Dynamic Batching — The sub-mesh to be dynamically batched has over 900 vertex attributes.
25. Too Many Vertices for Dynamic Batching — The number of sub-mesh vertices to be dynamically batched exceeds 300.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325867584&siteId=291194637