最有可能的问题是您的后处理雾效果正在读取深度缓冲区(或深度渲染目标缓冲区)。 因此,您需要骨架写入深度缓冲区,您可以尝试写入深度的 Spine 着色器之一(例如 Spine/Sprite/Unlit
并启用 Write to Depth
参数)。 然后,您还需要将 SkeletonAnimation
组件中的 Advanced - Z Spacing
设置为 0 以外的某个值。
另一种解决方案是创建自己的所需 Spine 着色器副本并添加“仅深度”渲染通道。
您还可以在您的骨架上使用与此后期处理效果一起使用的非 Spine 着色器。 然后,您可能希望从 [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]PMA 更改为直接 alpha[/url] 工作流程。
这是假设您没有使用“通用渲染管道”(URP),这是正确的吗?
Most likely the problem is that your post processing fog effect is reading the depth buffer (or a depth render target buffer). So you need the skeleton to write to the depth buffer, you could either try one of the Spine shaders that write to depth (e.g. Spine/Sprite/Unlit
and enable the Write to Depth
parameter). You would then also need to set Advanced - Z Spacing
at the SkeletonAnimation
component to some value other than 0.
Another solution is to create your own copy of the desired Spine shader and add a Depth Only
render pass.
You could also use a non-Spine shader at your skeleton that works with this post processing effect. You might then want to change from PMA to straight alpha workflow.
This is under the assumption that you are not using Universal Render Pipeline
(URP), is this correct?