划过的痕迹灬

unity 2020.3版本
spine3.8版本
Urp

为什么spine会出现蓝色预乘的部分。感觉很奇怪,试了很多方法不知道是什么原因,谢谢大佬帮忙解决下。感谢!
您没有权限查看这个主题的附件。
划过的痕迹灬
  • 帖子: 2

Harald

恐怕我们需要更多信息才能提供帮助,我们无法重现您的问题。 我们不知道您的实际着色器和场景设置。 您能否向我们发送一个仍然显示此问题的最小 Unity 项目? 您可以将下载链接附加到论坛帖子,也可以将其作为 zip 包发送到 contact@esotericsoftware.com,简要提及此论坛主题的 URL,以便我们了解上下文。
-----
I'm afraid we need more info to be able to help, we could not reproduce your issue. We don't know your actual shader and scene setup. Could you please send us a minimal Unity project that still shows this problem? You can send either a download link attached to a forum post or you can send it as a zip package to contact@esotericsoftware.com, briefly mentioning the URL of this forum thread so that we know the context.
头像
Harald

Harri
  • 帖子: 3589

划过的痕迹灬

Urp HDR 选项勾选后就没有蓝变得问题,项目中需要使用到HDR的话如何解决蓝边的问题?
unity项目和Spine动画源文件已发送邮箱
期待您的回复
划过的痕迹灬
  • 帖子: 2

Harald

感谢您的报告,这个与轮廓渲染和启用“HDR”设置有关的问题刚刚在 4.0 和 4.1-beta 分支上得到修复。新的spine-unity和URP着色器UPM包在这里像往常一样可用:
Spine Unity Download: Download

发票供以后参考:
https://github.com/EsotericSoftware/spine-runtimes/issues/2001

如果要将其集成到 3.8,则需要更新 Spine-Outline-Common.cginc 中的以下行:
替换这一行:
float outlineAlpha = saturate((average - thresholdStart) / (ThresholdEnd - thresholdStart)) - pixelCenter;
用这条线
float outlineAlpha = saturate(saturate((average - thresholdStart) / (ThresholdEnd - thresholdStart)) - pixelCenter);
此更改在现有代码周围添加了一个 saturate() 调用。

请注意,在使用 UPM 包时,有两个名为“Spine-Outline-Common.cginc”的文件。这两个文件都应按上述方式更新:
com.esotericsoftware.spine.urp-shaders-3.8-2019.3\Shaders\Include\SpineCoreShaders\Spine-Outline-Common.cginc
Assets\Spine\Runtime\spine-unity\Shaders\CGIncludes\Spine-Outline-Common.cginc
-----
Thanks for reporting, this issue with outline rendering and enabled HDR setting has just been fixed on the 4.0 and 4.1-beta branches. New spine-unity and URP shaders UPM packages are available here as usual:
Spine Unity Download: Download

Issue ticket for later reference:
https://github.com/EsotericSoftware/spine-runtimes/issues/2001

If you want to integrate it to 3.8, you need to update the following line in Spine-Outline-Common.cginc:
Replace this line:
float outlineAlpha = saturate((average - thresholdStart) / (ThresholdEnd - thresholdStart)) - pixelCenter;
with this line
float outlineAlpha = saturate(saturate((average - thresholdStart) / (ThresholdEnd - thresholdStart)) - pixelCenter);
This change adds one saturate() call around the existing code.

Note that there are two files called Spine-Outline-Common.cginc when using the UPM package. Both files should be updated as described above:
com.esotericsoftware.spine.urp-shaders-3.8-2019.3\Shaders\Include\SpineCoreShaders\Spine-Outline-Common.cginc
Assets\Spine\Runtime\spine-unity\Shaders\CGIncludes\Spine-Outline-Common.cginc
头像
Harald

Harri
  • 帖子: 3589


回到 中国Spine用户