一些脊柱统一着色器提供了一个“ZWrite”变体或写入深度缓冲区的选项。 例如。 Spine/Skeleton Lit ZWrite
总是写入深度缓冲区,而 Spine/Sprite
着色器提供了一个参数 Write to Depth
,可以启用它来写入 Z 缓冲区。
请注意,您还可以将任何非 Spine 着色器与 Spine 骨架一起使用。 默认情况下,Spine 使用预乘 alpha (PMA) 而不是标准的直接 alpha 导出(有关详细信息,请参阅 [url=http://zh.esotericsoftware.com/spine-unity#%E9%AB%98%E7%BA%A7-%20
Premultiplied-%E5%92%8C-Straight-Alpha-%E5%AF%BC%E5%85%A5]here[/url]),所以如果你的非Spine shader不提供PMA支持,请导出 您的图集使用直接 Alpha 工作流程并在 Unity 的“SkeletonRenderer”组件中禁用“高级 - PMA 顶点颜色”。
Some of the spine-unity shaders provide a ZWrite
variant or an option to write to the depth buffer. E.g. Spine/Skeleton Lit ZWrite
always writes to the depth buffer, while the Spine/Sprite
shaders provide a parameter Write to Depth
which can be enabled to write to the Z buffer.
Please note that you can also use any non-Spine shader with a Spine skeleton. Be default, Spine exports using premultiplied alpha (PMA) instead of standard straight alpha (for details see [url=http://zh.esotericsoftware.com/spine-unity#%E9%AB%98%E7%BA%A7
Premultiplied-%E5%92%8C-Straight-Alpha-%E5%AF%BC%E5%85%A5]here[/url]), so if your non-Spine shader does not provide PMA support, please export your atlas using straight alpha workflow and disable Advanced - PMA Vertex Color
at the SkeletonRenderer
component in Unity.