感谢您的报告,这个与轮廓渲染和启用“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