Again, this is a problem that occurs when DOF is applied.
When DOF is applied to a Spine object with Skeleton-OutlineOnly applied, the outline disappears and is output. The outline is probably not being printed because there is no depth value.
Is there a way to write depth?
Or is there another way to print an outline when DOF is applied?
urp spine Skeleton-OutlineOnly is not applyed using DOF
When using the Skeleton-OutlineOnly
shader in URP with Depth of Field (DOF), the outline may not appear because the shader does not write to the depth buffer. This is a known limitation, as most shaders in the spine-unity package do not write to the depth buffer by default to allow for better alpha blending. To address this, you can modify the shader to include depth writing by adding ZWrite On
and appropriate alpha clipping lines. Alternatively, you can use a render texture approach, where you render the skeleton to a texture and then apply the outline effect, which can be more complex but avoids depth-related issues.
@thcha I've added an issue ticket to support this feature:
EsotericSoftware/spine-runtimes2676
We'll let you know here on the forum once it's implemented.
@thcha We've just released a new Spine URP Shaders UPM package supporting this feature:
https://esotericsoftware.com/spine-unity-download
It can be found under the name Universal Render Pipeline/Spine/Outline/Skeleton-OutlineOnly ZWrite
.
Note: we added it as a separate shader instead of a property since additional passes (DepthOnly
and DepthNormals
) which are not required on the normal outline shader.
Note that you will need to change Render Queue
to Alpha Test
for use with a DoF effect.