批處理不合并的情況有哪些?
# Batch Breaking Cause
This project demonstrates different cases when Unity has to break a batch while rendering. ?
Best used with Unity 5.6b4+ where the Frame Debugger window shows why Unity had to start a new batch.
# Causes
- **Additional Vertex Streams** — the object has additional vertex streams set using MeshRenderer.additionalVertexStreams. 該對(duì)象使用MeshRenderer.additionalVertexStreams設(shè)置額外的頂點(diǎn)流
- **Deferred Objects on Different Lighting Layers** — the object is on a different light layer.不同物體使用不同的燈光層
- **Deferred Objects Split by Shadow Distance** — one of the objects is within shadow distance, the other one is not.--一個(gè)物體在陰影范圍內(nèi),另一個(gè)不在陰影范圍內(nèi)
- **Different Combined Meshes** — the object belongs to another combined static mesh. --該對(duì)象屬于另一個(gè)組合靜態(tài)網(wǎng)格
- **Different Custom Properties** — the object has a different MaterialProperyBlock set.--這兩個(gè)物體有著不同的材質(zhì)屬性
- **Different Lights** — the object is affected by a different forward light. ?--收到不同的光照
- **Different Materials** — the object has a different material.--這兩個(gè)物體有不同的材質(zhì)
- **Different Reflection Probes** — the object is affected by a different reflection probe.--這兩個(gè)物體受到不同的反射球的影響
- **Different Shadow Caster Hash** — the objects either have different shadow caster shaders, or have different shader properties / keywords that affect the output of the shadow caster pass.--這些對(duì)象要么有不同的陰影施法者著色器,要么有不同的影響陰影施法者通道輸出的著色器屬性/關(guān)鍵字
- **Different Shadow Receiving Settings** — the objects either have different "Receive Shadows" settings, or some objects are within the shadow distance, while some other objects are not. --這兩個(gè)物體有不同的是否接受陰影的設(shè)置,或者一些物體在陰影距離內(nèi),一些不在陰影距離內(nèi)。
- **Different Static Batching Flags** — the object has different static batching settings.--這兩個(gè)物體有不同的靜態(tài)批次設(shè)置
- **Dynamic Batching Disabled to Avoid Z-Fighting** — dynamic batching is turned off in Player Settings or disabled temporarily in the current context to avoid z-fighting.--動(dòng)態(tài)批處理在玩家設(shè)置中被關(guān)閉,或者在當(dāng)前上下文中暫時(shí)禁用,以避免z戰(zhàn)斗。
- **Instancing Different Geometries** — rendering different meshes or sub-meshes with GPU instancing.--通過不同的主副網(wǎng)格并且勾選了GPUInstanceing
- **Lightmapped Objects** — the object uses a different light map or has different light map uv transformations within the same light map.--這兩個(gè)物體使用不動(dòng)的燈光貼圖或者有不動(dòng)的燈光UV變化使用同一張燈光貼圖
- **Lightprobe Affected Objects** — the object is affected by different light probes.--受到不同的燈光探照的物體
- **Mixed Sided Mode Shadow Casters** — objects have different "Cast Shadows" settings.--物體包含不同的接受陰影設(shè)置
- **Multipass** — the object is using a multi-pass shader.--當(dāng)前物體使用多通道shader
- **Multiple Forward Lights** — the object is affected by multiple forward lights.--該物件收到多個(gè)向前光線印象
- **Non-instanceable Property Set** — non-instanced properties are set for an instanced shader.--非實(shí)例屬性是為實(shí)例著色器設(shè)置的
- **Odd Negative Scaling** — the object has odd negative scaling (e.g. (1, -1, 1)).--該對(duì)象具有奇負(fù)標(biāo)度
- **Shader Disables Batching** — the shader explicitly disables batching with the "DisableBatching" tag.--著色器顯式地使用“DisableBatching”標(biāo)簽禁用批處理
- **Too Many Indices in Dynamic Batch** — there are too many indices (more than 32k) in a dynamic batch.--在動(dòng)態(tài)批處理合并中,太多的索引超過32K
- **Too Many Indices in Static Batch** — there are too many indices in the combined mesh of a static batch. The limit is 48k indices on OpenGL ES, 32k on OSX and 64k on other platforms.--靜態(tài)批處理中的組合網(wǎng)格索引過多。對(duì)于OpenGL ES來說是48k,OSX是32k,其他平臺(tái)是64k。
- **Too Many Vertex Attributes for Dynamic Batching** — a submesh we are trying to dynamically batch has more than 900 vertex attributes.--太多的節(jié)點(diǎn)屬性在動(dòng)態(tài)批處理合并中,當(dāng)我們嘗試動(dòng)態(tài)批處理合并一個(gè)超過900個(gè)頂點(diǎn)的子網(wǎng)格
- **Too Many Vertices for Dynamic Batching** — a submesh we are trying to dynamically batch has more than 300 vertices.--太多的節(jié)點(diǎn)屬性在動(dòng)態(tài)批處理合并中,當(dāng)我們嘗試動(dòng)態(tài)批處理合并一個(gè)超過300個(gè)頂點(diǎn)的子網(wǎng)格
?