diff --git a/CHANGELOG.md b/CHANGELOG.md index 26606ba6e..326427e7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -156,6 +156,7 @@ - SkeletonGraphic: Added auto-detect functionality for parameters `Advanced` - `Tint Black`, `CanvasGroup Compatible` and `PMA Vertex Color`. If unsure which settings are correct, hit the `Detect` button next to each parameter, in top to bottom order, or the `Detect Settings` to detect all three. Also added automatic material assignment via a `Detect Material` button in the `Advanced` section and a `Detect` button next to the `Material` property at the top of the component Inspector, as well as next to the `Blend Mode Materials` section when using multiple canvas renderers with blend modes. The suitable material is selected based on these three settings, combined with texture settings (PMA or straight alpha texture settings). If you receive incorrect results, likely your texture settings are incorrectly setup for your PMA or Straight alpha texture export settings. - `SkeletonRenderTexture` example components now provide a `shaderPasses` parameter to customize which passes are rendered to the `RenderTexture`. It defaults to `-1` for all passes to keep the existing behaviour. You might want to set it to `0` to only render the first pass e.g. to avoid issues when using a URP shader at the original skeleton. - `SkeletonGraphicRenderTexture` example component now also received a `quadMaterial` property, defaulting to the newly added Material asset `RenderQuadGraphicMaterial` which applies proper premultiplied-alpha blending of the render texture. The `quadMaterial` member variable was moved from `SkeletonRenderTexture` to the common base class `SkeletonRenderTextureBase`. + - All Spine Outline shaders, including the URP outline shader, now provide an additional parameter `Width in Screen Space`. Enable it to keep the outline width constant in screen space instead of texture space. Requires more expensive computations, so enable only where necessary. Defaults to `disabled` to maintain existing behaviour. - **Breaking changes** diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Shaders/SpineShaderWithOutlineGUI.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Shaders/SpineShaderWithOutlineGUI.cs index 0c21fb89f..effb6d9ef 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Shaders/SpineShaderWithOutlineGUI.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Shaders/SpineShaderWithOutlineGUI.cs @@ -39,6 +39,7 @@ public class SpineShaderWithOutlineGUI : ShaderGUI { bool _showStencilSettings = false; MaterialProperty _OutlineWidth = null; + MaterialProperty _UseScreenSpaceOutlineWidth = null; MaterialProperty _OutlineColor = null; MaterialProperty _OutlineReferenceTexWidth = null; MaterialProperty _ThresholdEnd = null; @@ -51,6 +52,7 @@ public class SpineShaderWithOutlineGUI : ShaderGUI { static GUIContent _EnableOutlineText = new GUIContent("Outline", "Enable outline rendering. Draws an outline by sampling 4 or 8 neighbourhood pixels at a given distance specified via 'Outline Width'."); static GUIContent _OutlineWidthText = new GUIContent("Outline Width", ""); + static GUIContent _UseScreenSpaceOutlineWidthText = new GUIContent("Width in Screen Space", "Enable to keep the outline width constant in screen space instead of texture space. Requires more expensive computations."); static GUIContent _OutlineColorText = new GUIContent("Outline Color", ""); static GUIContent _OutlineReferenceTexWidthText = new GUIContent("Reference Texture Width", ""); static GUIContent _ThresholdEndText = new GUIContent("Outline Threshold", ""); @@ -87,6 +89,7 @@ public class SpineShaderWithOutlineGUI : ShaderGUI { protected virtual void FindProperties (MaterialProperty[] props) { _OutlineWidth = FindProperty("_OutlineWidth", props, false); + _UseScreenSpaceOutlineWidth = FindProperty("_UseScreenSpaceOutlineWidth", props, false); _OutlineReferenceTexWidth = FindProperty("_OutlineReferenceTexWidth", props, false); _OutlineColor = FindProperty("_OutlineColor", props, false); _ThresholdEnd = FindProperty("_ThresholdEnd", props, false); @@ -151,6 +154,8 @@ public class SpineShaderWithOutlineGUI : ShaderGUI { if (isOutlineEnabled) { _materialEditor.ShaderProperty(_OutlineWidth, _OutlineWidthText); + if (_UseScreenSpaceOutlineWidth != null) + _materialEditor.ShaderProperty(_UseScreenSpaceOutlineWidth, _UseScreenSpaceOutlineWidthText); _materialEditor.ShaderProperty(_OutlineColor, _OutlineColorText); _showAdvancedOutlineSettings = EditorGUILayout.Foldout(_showAdvancedOutlineSettings, _OutlineAdvancedText); diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/BlendModes/Spine-Skeleton-PMA-Additive.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/BlendModes/Spine-Skeleton-PMA-Additive.shader index 3e962ac2c..7da343e05 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/BlendModes/Spine-Skeleton-PMA-Additive.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/BlendModes/Spine-Skeleton-PMA-Additive.shader @@ -16,6 +16,7 @@ Shader "Spine/Blend Modes/Skeleton PMA Additive" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/BlendModes/Spine-Skeleton-PMA-Multiply.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/BlendModes/Spine-Skeleton-PMA-Multiply.shader index 7261ba339..0454ffcfb 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/BlendModes/Spine-Skeleton-PMA-Multiply.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/BlendModes/Spine-Skeleton-PMA-Multiply.shader @@ -16,6 +16,7 @@ Shader "Spine/Blend Modes/Skeleton PMA Multiply" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/BlendModes/Spine-Skeleton-PMA-Screen.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/BlendModes/Spine-Skeleton-PMA-Screen.shader index ce9306480..b39c9cf7e 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/BlendModes/Spine-Skeleton-PMA-Screen.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/BlendModes/Spine-Skeleton-PMA-Screen.shader @@ -16,6 +16,7 @@ Shader "Spine/Blend Modes/Skeleton PMA Screen" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/CGIncludes/Spine-Outline-Common.cginc b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/CGIncludes/Spine-Outline-Common.cginc index dc31ad9eb..ae3763848 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/CGIncludes/Spine-Outline-Common.cginc +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/CGIncludes/Spine-Outline-Common.cginc @@ -8,11 +8,22 @@ float4 computeOutlinePixel(sampler2D mainTexture, float2 mainTextureTexelSize, float4 texColor = fixed4(0, 0, 0, 0); +#if !_USE_SCREENSPACE_OUTLINE_WIDTH + // constant width in texture space float outlineWidthCompensated = OutlineWidth / (OutlineReferenceTexWidth * mainTextureTexelSize.x); float xOffset = mainTextureTexelSize.x * outlineWidthCompensated; float yOffset = mainTextureTexelSize.y * outlineWidthCompensated; - float xOffsetDiagonal = mainTextureTexelSize.x * outlineWidthCompensated * 0.7; - float yOffsetDiagonal = mainTextureTexelSize.y * outlineWidthCompensated * 0.7; +#else + float2 ddxUV = ddx(uv); + float2 ddyUV = ddy(uv); + float2 ddu = float2(ddxUV.x, ddyUV.x); + float2 ddv = float2(ddxUV.y, ddyUV.y); + float widthScale = OutlineWidth * _ScreenParams.x / OutlineReferenceTexWidth; + float xOffset = length(ddu) * widthScale; + float yOffset = length(ddv) * widthScale; +#endif + float xOffsetDiagonal = xOffset * 0.7; + float yOffsetDiagonal = yOffset * 0.7; float pixelCenter = tex2D(mainTexture, uv).a; diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/BlendModes/Spine-Skeleton-PMA-Additive-Outline.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/BlendModes/Spine-Skeleton-PMA-Additive-Outline.shader index 80489e83d..56a176967 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/BlendModes/Spine-Skeleton-PMA-Additive-Outline.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/BlendModes/Spine-Skeleton-PMA-Additive-Outline.shader @@ -11,6 +11,7 @@ Shader "Spine/Outline/Blend Modes/Skeleton PMA Additive" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/BlendModes/Spine-Skeleton-PMA-Multiply-Outline.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/BlendModes/Spine-Skeleton-PMA-Multiply-Outline.shader index e3dbc8913..c008d45a1 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/BlendModes/Spine-Skeleton-PMA-Multiply-Outline.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/BlendModes/Spine-Skeleton-PMA-Multiply-Outline.shader @@ -11,6 +11,7 @@ Shader "Spine/Outline/Blend Modes/Skeleton PMA Multiply" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/BlendModes/Spine-Skeleton-PMA-Screen-Outline.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/BlendModes/Spine-Skeleton-PMA-Screen-Outline.shader index 89c9eb064..cdd7bd7ca 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/BlendModes/Spine-Skeleton-PMA-Screen-Outline.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/BlendModes/Spine-Skeleton-PMA-Screen-Outline.shader @@ -11,6 +11,7 @@ Shader "Spine/Outline/Blend Modes/Skeleton PMA Screen" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/SkeletonGraphic/Spine-SkeletonGraphic-Outline.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/SkeletonGraphic/Spine-SkeletonGraphic-Outline.shader index 2cedb99df..b899d9d03 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/SkeletonGraphic/Spine-SkeletonGraphic-Outline.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/SkeletonGraphic/Spine-SkeletonGraphic-Outline.shader @@ -21,6 +21,7 @@ Shader "Spine/Outline/SkeletonGraphic" // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 @@ -65,6 +66,7 @@ Shader "Spine/Outline/SkeletonGraphic" #pragma fragment fragOutline #define SKELETON_GRAPHIC #pragma shader_feature _ _USE8NEIGHBOURHOOD_ON + #pragma shader_feature _ _USE_SCREENSPACE_OUTLINE_WIDTH #include "../CGIncludes/Spine-Outline-Pass.cginc" ENDCG } diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/SkeletonGraphic/Spine-SkeletonGraphic-TintBlack-Outline.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/SkeletonGraphic/Spine-SkeletonGraphic-TintBlack-Outline.shader index 1f2d6572c..51647cb3f 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/SkeletonGraphic/Spine-SkeletonGraphic-TintBlack-Outline.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/SkeletonGraphic/Spine-SkeletonGraphic-TintBlack-Outline.shader @@ -23,6 +23,7 @@ Shader "Spine/Outline/SkeletonGraphic Tint Black" // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Fill-Outline.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Fill-Outline.shader index bd932b00d..0c00f2368 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Fill-Outline.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Fill-Outline.shader @@ -12,6 +12,7 @@ Shader "Spine/Outline/Skeleton Fill" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Lit-Outline.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Lit-Outline.shader index a862b82db..358b6b79a 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Lit-Outline.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Lit-Outline.shader @@ -11,6 +11,7 @@ Shader "Spine/Outline/Skeleton Lit" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Lit-ZWrite-Outline.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Lit-ZWrite-Outline.shader index 869087139..055c6fa71 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Lit-ZWrite-Outline.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Lit-ZWrite-Outline.shader @@ -12,6 +12,7 @@ Shader "Spine/Outline/Skeleton Lit ZWrite" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Outline.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Outline.shader index 7befaf587..ab5e01914 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Outline.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Outline.shader @@ -10,6 +10,7 @@ Shader "Spine/Outline/Skeleton" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 @@ -40,6 +41,7 @@ Shader "Spine/Outline/Skeleton" { #pragma vertex vertOutline #pragma fragment fragOutline #pragma shader_feature _ _USE8NEIGHBOURHOOD_ON + #pragma shader_feature _ _USE_SCREENSPACE_OUTLINE_WIDTH #include "CGIncludes/Spine-Outline-Pass.cginc" ENDCG } diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-OutlineOnly-ZWrite.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-OutlineOnly-ZWrite.shader index f88e06af8..16743f185 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-OutlineOnly-ZWrite.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-OutlineOnly-ZWrite.shader @@ -9,6 +9,7 @@ Shader "Spine/Outline/OutlineOnly-ZWrite" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 @@ -54,6 +55,7 @@ Shader "Spine/Outline/OutlineOnly-ZWrite" { #pragma vertex vertOutline #pragma fragment fragOutline #pragma shader_feature _ _USE8NEIGHBOURHOOD_ON + #pragma shader_feature _ _USE_SCREENSPACE_OUTLINE_WIDTH #include "CGIncludes/Spine-Outline-Pass.cginc" ENDCG } diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Tint-Outline.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Tint-Outline.shader index ff3f69456..c9d179a30 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Tint-Outline.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-Tint-Outline.shader @@ -12,6 +12,7 @@ Shader "Spine/Outline/Skeleton Tint" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-TintBlack-Outline.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-TintBlack-Outline.shader index 91c38ca3b..7b608ac9e 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-TintBlack-Outline.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Skeleton-TintBlack-Outline.shader @@ -12,6 +12,7 @@ Shader "Spine/Outline/Skeleton Tint Black" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Special-Skeleton-Grayscale-Outline.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Special-Skeleton-Grayscale-Outline.shader index d917a6628..eaf9ca60a 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Special-Skeleton-Grayscale-Outline.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Spine-Special-Skeleton-Grayscale-Outline.shader @@ -11,6 +11,7 @@ Shader "Spine/Outline/Special/Skeleton Grayscale" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Sprite/SpritesPixelLit-Outline.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Sprite/SpritesPixelLit-Outline.shader index 8cc0138de..ce6a98166 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Sprite/SpritesPixelLit-Outline.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Sprite/SpritesPixelLit-Outline.shader @@ -48,6 +48,7 @@ Shader "Spine/Outline/Sprite/Pixel Lit" // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Sprite/SpritesUnlit-Outline.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Sprite/SpritesUnlit-Outline.shader index 3068d6cea..64a6805cb 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Sprite/SpritesUnlit-Outline.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Sprite/SpritesUnlit-Outline.shader @@ -31,6 +31,7 @@ Shader "Spine/Outline/Sprite/Unlit" // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Sprite/SpritesVertexLit-Outline.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Sprite/SpritesVertexLit-Outline.shader index 8fce6138a..7ca7fdf5d 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Sprite/SpritesVertexLit-Outline.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Outline/Sprite/SpritesVertexLit-Outline.shader @@ -49,6 +49,7 @@ Shader "Spine/Outline/Sprite/Vertex Lit" // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Additive.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Additive.shader index e32474d87..a90833f3c 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Additive.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Additive.shader @@ -21,6 +21,7 @@ Shader "Spine/SkeletonGraphic Additive" // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Fill.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Fill.shader index b431f378e..53078f062 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Fill.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Fill.shader @@ -21,6 +21,7 @@ Shader "Spine/SkeletonGraphic Fill" // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Grayscale.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Grayscale.shader index 26e3900e9..dc8cfe0d2 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Grayscale.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Grayscale.shader @@ -19,6 +19,7 @@ Shader "Spine/SkeletonGraphic Grayscale" // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Multiply.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Multiply.shader index 38136cc7b..4e6fde069 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Multiply.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Multiply.shader @@ -21,6 +21,7 @@ Shader "Spine/SkeletonGraphic Multiply" // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Screen.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Screen.shader index b5f8cf764..b25c69c8d 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Screen.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic-Screen.shader @@ -21,6 +21,7 @@ Shader "Spine/SkeletonGraphic Screen" // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic.shader index 77ab6e01c..82a377d26 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/Spine-SkeletonGraphic.shader @@ -21,6 +21,7 @@ Shader "Spine/SkeletonGraphic" // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/TintBlack/Spine-SkeletonGraphic-TintBlack-Additive.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/TintBlack/Spine-SkeletonGraphic-TintBlack-Additive.shader index 917e71325..3bd624f81 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/TintBlack/Spine-SkeletonGraphic-TintBlack-Additive.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/TintBlack/Spine-SkeletonGraphic-TintBlack-Additive.shader @@ -22,6 +22,7 @@ Shader "Spine/SkeletonGraphic Tint Black Additive" // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/TintBlack/Spine-SkeletonGraphic-TintBlack-Multiply.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/TintBlack/Spine-SkeletonGraphic-TintBlack-Multiply.shader index b549ec67d..61987b1b9 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/TintBlack/Spine-SkeletonGraphic-TintBlack-Multiply.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/TintBlack/Spine-SkeletonGraphic-TintBlack-Multiply.shader @@ -22,6 +22,7 @@ Shader "Spine/SkeletonGraphic Tint Black Multiply" // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/TintBlack/Spine-SkeletonGraphic-TintBlack-Screen.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/TintBlack/Spine-SkeletonGraphic-TintBlack-Screen.shader index 4418bb3d4..c1a4c2518 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/TintBlack/Spine-SkeletonGraphic-TintBlack-Screen.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/TintBlack/Spine-SkeletonGraphic-TintBlack-Screen.shader @@ -22,6 +22,7 @@ Shader "Spine/SkeletonGraphic Tint Black Screen" // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/TintBlack/Spine-SkeletonGraphic-TintBlack.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/TintBlack/Spine-SkeletonGraphic-TintBlack.shader index 4c1798c4e..6babb5895 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/TintBlack/Spine-SkeletonGraphic-TintBlack.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/SkeletonGraphic/TintBlack/Spine-SkeletonGraphic-TintBlack.shader @@ -22,6 +22,7 @@ Shader "Spine/SkeletonGraphic Tint Black" // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-Fill.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-Fill.shader index 49689fdd1..a7669c8e0 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-Fill.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-Fill.shader @@ -14,6 +14,7 @@ Shader "Spine/Skeleton Fill" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-Lit-ZWrite.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-Lit-ZWrite.shader index fa3b6160f..b0c57acd0 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-Lit-ZWrite.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-Lit-ZWrite.shader @@ -15,6 +15,7 @@ Shader "Spine/Skeleton Lit ZWrite" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-Lit.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-Lit.shader index 98d0594ee..f3d10ee03 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-Lit.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-Lit.shader @@ -14,6 +14,7 @@ Shader "Spine/Skeleton Lit" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-Tint.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-Tint.shader index 87c4a039b..56feb518e 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-Tint.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-Tint.shader @@ -17,6 +17,7 @@ Shader "Spine/Skeleton Tint" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-TintBlack.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-TintBlack.shader index e66750766..4fbbbbba2 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-TintBlack.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton-TintBlack.shader @@ -19,6 +19,7 @@ Shader "Spine/Skeleton Tint Black" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton.shader index fb145dbd4..304de737e 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Skeleton.shader @@ -8,6 +8,7 @@ Shader "Spine/Skeleton" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Special-Skeleton-Grayscale.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Special-Skeleton-Grayscale.shader index 8d69bf815..367808693 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Special-Skeleton-Grayscale.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Spine-Special-Skeleton-Grayscale.shader @@ -13,6 +13,7 @@ Shader "Spine/Special/Skeleton Grayscale" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Sprite/SpritesPixelLit.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Sprite/SpritesPixelLit.shader index 4b08004f2..1dbe6efae 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Sprite/SpritesPixelLit.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Sprite/SpritesPixelLit.shader @@ -50,6 +50,7 @@ Shader "Spine/Sprite/Pixel Lit" // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Sprite/SpritesUnlit.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Sprite/SpritesUnlit.shader index 32d27bdd4..7549dd85e 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Sprite/SpritesUnlit.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Sprite/SpritesUnlit.shader @@ -32,6 +32,7 @@ Shader "Spine/Sprite/Unlit" // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Sprite/SpritesVertexLit.shader b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Sprite/SpritesVertexLit.shader index 39b97f0a1..cd15a4e4e 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Sprite/SpritesVertexLit.shader +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Shaders/Sprite/SpritesVertexLit.shader @@ -51,6 +51,7 @@ Shader "Spine/Sprite/Vertex Lit" // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 diff --git a/spine-unity/Assets/Spine/package.json b/spine-unity/Assets/Spine/package.json index 067a39953..adfc83c88 100644 --- a/spine-unity/Assets/Spine/package.json +++ b/spine-unity/Assets/Spine/package.json @@ -2,7 +2,7 @@ "name": "com.esotericsoftware.spine.spine-unity", "displayName": "spine-unity Runtime", "description": "This plugin provides the spine-unity runtime core.", - "version": "4.2.65", + "version": "4.2.66", "unity": "2018.3", "author": { "name": "Esoteric Software", diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Outline/Spine-Skeleton-OutlineOnly-URP.shader b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Outline/Spine-Skeleton-OutlineOnly-URP.shader index 3b9580d1f..482cb890f 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Outline/Spine-Skeleton-OutlineOnly-URP.shader +++ b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Outline/Spine-Skeleton-OutlineOnly-URP.shader @@ -6,6 +6,7 @@ Shader "Universal Render Pipeline/Spine/Outline/Skeleton-OutlineOnly" { // Outline properties are drawn via custom editor. [HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0 + [HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0 [HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1) [HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024 [HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25 @@ -44,6 +45,7 @@ Shader "Universal Render Pipeline/Spine/Outline/Skeleton-OutlineOnly" { #pragma vertex vertOutline #pragma fragment fragOutline #pragma shader_feature _ _USE8NEIGHBOURHOOD_ON + #pragma shader_feature _ _USE_SCREENSPACE_OUTLINE_WIDTH #define USE_URP #define fixed4 half4 diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/package.json b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/package.json index d990cdab3..9b3bae1f1 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/package.json +++ b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/package.json @@ -2,7 +2,7 @@ "name": "com.esotericsoftware.spine.urp-shaders", "displayName": "Spine Universal RP Shaders", "description": "This plugin provides universal render pipeline (URP) shaders for the spine-unity runtime.\n\nPrerequisites:\nIt requires a working installation of the spine-unity runtime, version 4.2.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)", - "version": "4.2.32", + "version": "4.2.33", "unity": "2019.3", "author": { "name": "Esoteric Software",