1)您需要确保在导出图集纹理期间,设置“区域填充”足够大以适合您的轮廓。
此博客文章中显示了要求和常见问题:
[url=http://zh.esotericsoftware.com/blog/Outline-shaders-for-spine-unity#%E5%9B%BE%E7%89%87%E5%92%8C%E5%9B%BE%E9%9B%86%E7%BA%B9%E7%90%86
%E5%A2%9E%E5%8A%A0%E8%BE%B9%E8%B7%9D%E6%88%96%E7%A9%BA%E7%99%BD]Blog: spine-unity轮廓着色器: 图片和图集纹理 增加边距或空白[/url]
2)您需要稍微修改着色器(或先创建着色器的副本并修改副本)以更改“轮廓宽度”滑块的参数范围,如下所示:
[HideInInspector] _OutlineWidth("轮廓宽度", Range(0,8)) = 3.0
您可以在此处的“Spine-Skeleton-Outline”着色器中看到这条线:
https://github.com/EsotericSoftware/spine-runtimes/blob/4.1/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Outline.shader#L12
1) You need to ensure that during exporting your atlas texture, the setting Region Padding
is large enough to fit your outline.
Requirements and common problems are shown in this blog posting:
[url=http://zh.esotericsoftware.com/blog/Outline-shaders-for-spine-unity#%E5%9B%BE%E7%89%87%E5%92%8C%E5%9B%BE%E9%9B%86%E7%BA%B9%E7%90%86
%E5%A2%9E%E5%8A%A0%E8%BE%B9%E8%B7%9D%E6%88%96%E7%A9%BA%E7%99%BD]Blog: spine-unity轮廓着色器: 图片和图集纹理 增加边距或空白[/url]
2) You would need to slightly modify the shader (or create a copy of the shader first and modify the copy) that you are using to change the parameter range of the Outline Width
slider, which looks like this:
[HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0
You can see the line in the Spine-Skeleton-Outline
shader here:
https://github.com/EsotericSoftware/spine-runtimes/blob/4.1/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Outline.shader#L12