• Bugs
  • Artifacts using straight alpha with bleed in URP 2D Lit

  • Изменено
Related Discussions
...

Hello everyone,

I'm currently setting up our Spine 3.8 workflow in Unity 2019.4.7f1.
We're using:
Universal Render Pipeline 7.3.1 with Unity's 2D Lightning
Linear Color Space
Spine assets with straight alpha and bleed enabled
Spine URP 2D Sprite shader from com.esotericsoftware.spine.urp-shaders-3.8-2019.3

I was following the export and import guidelines as described here: http://esotericsoftware.com/spine-unity

As shown in the screenshot the bleed from the texture is rendered in a light transparency.
When changing the shader to Unity's Sprite-Lit-Default or setting the lightning mode to Unlit in the Spine shader it's rendered correctly.

What am I doing wrong? Is this a bug?
I uploaded a repro project. Just open the example scene in it.

Thanks a lot!


Looks like the alpha blending doesn't happen at all when using straight alpha. (I think) We could fix this by adding the following to Shaders/2D/Include/Spine-Sprite-StandardPass-URP-2D.hlsl after line 106 (APPLY_EMISSION...) :

#if defined(_ALPHABLEND_ON)
   pixel.rgb *= texureColor.a;
#endif

Sorry for the inconvenience, thanks for reporting! Actually the Additive and Multiply blend modes were also off at the URP 2D Sprite shader.

We have fixed the issue, a new URP shaders extension package can be downloaded here as usual:
Spine Unity Download: Download

For reference: the issue has been tracked under this ticket id:
https://github.com/EsotericSoftware/spine-runtimes/issues/1755

Awesome, thanks a lot for taking care of this Harald!

You're welcome. Thanks for reporting!