diff --git a/CHANGELOG.md b/CHANGELOG.md index 47fd19045..bee9d97e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -115,6 +115,7 @@ * URP Shaders: Added `Depth Write` property to shaders `Universal Render Pipeline/Spine/Skeleton` and `Universal Render Pipeline/Spine/Skeleton Lit`. Defaults to false to maintain existing behaviour. * Added `Animation Update` mode (called `UpdateTiming` in code) `In Late Update` for `SkeletonAnimation`, `SkeletonMecanim` and `SkeletonGraphic`. This allows you to update the `SkeletonMecanim` skeleton in the same frame that the Mecanim Animator updated its state, which happens between `Update` and `LateUpdate`. * URP Shaders: Added URP "Blend Mode" shader variants for both URP 3D and URP 2D renderers. They are listed under shader name "Universal Render Pipeline/Spine/Blend Modes/" and "Universal Render Pipeline/2D/Spine/Blend Modes/" respectively. + * URP Shaders: Added support for [Tint Black](http://en.esotericsoftware.com/spine-slots#Tint-black) functionality at "Blend Modes" Spine URP shaders (2D and 3D shaders). * **Breaking changes** * Made `SkeletonGraphic.unscaledTime` parameter protected, use the new property `UnscaledTime` instead. diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/BlendModes/Spine-Skeleton-Additive-URP-2D.shader b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/BlendModes/Spine-Skeleton-Additive-URP-2D.shader index 765a4eabb..1fe8f8510 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/BlendModes/Spine-Skeleton-Additive-URP-2D.shader +++ b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/BlendModes/Spine-Skeleton-Additive-URP-2D.shader @@ -4,6 +4,8 @@ [NoScaleOffset] _MainTex ("MainTex", 2D) = "black" {} [Toggle(_STRAIGHT_ALPHA_INPUT)] _StraightAlphaInput("Straight Alpha Texture", Int) = 0 _Cutoff ("Shadow alpha cutoff", Range(0,1)) = 0.1 + [MaterialToggle(_TINT_BLACK_ON)] _TintBlack("Tint Black", Float) = 0 + _Black(" Dark Color", Color) = (0,0,0,0) [HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0 [HideInInspector][Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Comparison", Float) = 8 // Set to Always as default } @@ -28,9 +30,24 @@ Tags { "LightMode" = "Universal2D" } HLSLPROGRAM + // Required to compile gles 2.0 with standard srp library + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + + // ------------------------------------- + // Unity defined keywords + #pragma multi_compile_fog + + //-------------------------------------- + // GPU Instancing + #pragma multi_compile_instancing + + //-------------------------------------- + // Spine related keywords + #pragma shader_feature _ _STRAIGHT_ALPHA_INPUT + #pragma shader_feature _TINT_BLACK_ON #pragma vertex vert #pragma fragment frag - #pragma shader_feature _ _STRAIGHT_ALPHA_INPUT #undef LIGHTMAP_ON @@ -38,10 +55,10 @@ #define fixed4 half4 #define fixed3 half3 #define fixed half - #include "../../Include/Spine-Input-BlendModes-URP.hlsl" - #include "../../Include/Spine-BlendModes-NormalPass-URP.hlsl" + #define APPLY_MATERIAL_TINT_COLOR + #include "../../Include/Spine-Input-URP.hlsl" + #include "../../Include/Spine-Skeleton-ForwardPass-URP.hlsl" ENDHLSL } } - CustomEditor "SpineShaderWithOutlineGUI" } diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/BlendModes/Spine-Skeleton-Multiply-URP-2D.shader b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/BlendModes/Spine-Skeleton-Multiply-URP-2D.shader index 3ee7c1708..17048d9e2 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/BlendModes/Spine-Skeleton-Multiply-URP-2D.shader +++ b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/BlendModes/Spine-Skeleton-Multiply-URP-2D.shader @@ -4,6 +4,8 @@ [NoScaleOffset] _MainTex ("MainTex", 2D) = "black" {} [Toggle(_STRAIGHT_ALPHA_INPUT)] _StraightAlphaInput("Straight Alpha Texture", Int) = 0 _Cutoff ("Shadow alpha cutoff", Range(0,1)) = 0.1 + [MaterialToggle(_TINT_BLACK_ON)] _TintBlack("Tint Black", Float) = 0 + _Black(" Dark Color", Color) = (0,0,0,0) [HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0 [HideInInspector][Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Comparison", Float) = 8 // Set to Always as default } @@ -28,9 +30,24 @@ Tags { "LightMode" = "Universal2D" } HLSLPROGRAM + // Required to compile gles 2.0 with standard srp library + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + + // ------------------------------------- + // Unity defined keywords + #pragma multi_compile_fog + + //-------------------------------------- + // GPU Instancing + #pragma multi_compile_instancing + + //-------------------------------------- + // Spine related keywords + #pragma shader_feature _ _STRAIGHT_ALPHA_INPUT + #pragma shader_feature _TINT_BLACK_ON #pragma vertex vert #pragma fragment frag - #pragma shader_feature _ _STRAIGHT_ALPHA_INPUT #undef LIGHTMAP_ON @@ -38,10 +55,10 @@ #define fixed4 half4 #define fixed3 half3 #define fixed half - #include "../../Include/Spine-Input-BlendModes-URP.hlsl" - #include "../../Include/Spine-BlendModes-NormalPass-URP.hlsl" + #define APPLY_MATERIAL_TINT_COLOR + #include "../../Include/Spine-Input-URP.hlsl" + #include "../../Include/Spine-Skeleton-ForwardPass-URP.hlsl" ENDHLSL } } - CustomEditor "SpineShaderWithOutlineGUI" } diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/BlendModes/Spine-Skeleton-Screen-URP-2D.shader b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/BlendModes/Spine-Skeleton-Screen-URP-2D.shader index 28ffba1df..159d74a1e 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/BlendModes/Spine-Skeleton-Screen-URP-2D.shader +++ b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/BlendModes/Spine-Skeleton-Screen-URP-2D.shader @@ -4,6 +4,8 @@ [NoScaleOffset] _MainTex ("MainTex", 2D) = "black" {} [Toggle(_STRAIGHT_ALPHA_INPUT)] _StraightAlphaInput("Straight Alpha Texture", Int) = 0 _Cutoff ("Shadow alpha cutoff", Range(0,1)) = 0.1 + [MaterialToggle(_TINT_BLACK_ON)] _TintBlack("Tint Black", Float) = 0 + _Black(" Dark Color", Color) = (0,0,0,0) [HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0 [HideInInspector][Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Comparison", Float) = 8 // Set to Always as default } @@ -28,9 +30,24 @@ Tags { "LightMode" = "Universal2D" } HLSLPROGRAM + // Required to compile gles 2.0 with standard srp library + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + + // ------------------------------------- + // Unity defined keywords + #pragma multi_compile_fog + + //-------------------------------------- + // GPU Instancing + #pragma multi_compile_instancing + + //-------------------------------------- + // Spine related keywords + #pragma shader_feature _ _STRAIGHT_ALPHA_INPUT + #pragma shader_feature _TINT_BLACK_ON #pragma vertex vert #pragma fragment frag - #pragma shader_feature _ _STRAIGHT_ALPHA_INPUT #undef LIGHTMAP_ON @@ -38,10 +55,10 @@ #define fixed4 half4 #define fixed3 half3 #define fixed half - #include "../../Include/Spine-Input-BlendModes-URP.hlsl" - #include "../../Include/Spine-BlendModes-NormalPass-URP.hlsl" + #define APPLY_MATERIAL_TINT_COLOR + #include "../../Include/Spine-Input-URP.hlsl" + #include "../../Include/Spine-Skeleton-ForwardPass-URP.hlsl" ENDHLSL } } - CustomEditor "SpineShaderWithOutlineGUI" } diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/BlendModes/Spine-Skeleton-Additive-URP.shader b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/BlendModes/Spine-Skeleton-Additive-URP.shader index 929396eb6..a99c16785 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/BlendModes/Spine-Skeleton-Additive-URP.shader +++ b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/BlendModes/Spine-Skeleton-Additive-URP.shader @@ -4,6 +4,8 @@ [NoScaleOffset] _MainTex ("MainTex", 2D) = "black" {} [Toggle(_STRAIGHT_ALPHA_INPUT)] _StraightAlphaInput("Straight Alpha Texture", Int) = 0 _Cutoff ("Shadow alpha cutoff", Range(0,1)) = 0.1 + [MaterialToggle(_TINT_BLACK_ON)] _TintBlack("Tint Black", Float) = 0 + _Black(" Dark Color", Color) = (0,0,0,0) [HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0 [HideInInspector][Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Comparison", Float) = 8 // Set to Always as default } @@ -15,7 +17,6 @@ Fog { Mode Off } Cull Off ZWrite Off - Blend One One Lighting Off Stencil { @@ -27,10 +28,28 @@ Pass { Name "Forward" Tags{"LightMode" = "UniversalForward"} + + Blend One One + HLSLPROGRAM + // Required to compile gles 2.0 with standard srp library + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + + // ------------------------------------- + // Unity defined keywords + #pragma multi_compile_fog + + //-------------------------------------- + // GPU Instancing + #pragma multi_compile_instancing + + //-------------------------------------- + // Spine related keywords + #pragma shader_feature _ _STRAIGHT_ALPHA_INPUT + #pragma shader_feature _TINT_BLACK_ON #pragma vertex vert #pragma fragment frag - #pragma shader_feature _ _STRAIGHT_ALPHA_INPUT #undef LIGHTMAP_ON @@ -38,48 +57,12 @@ #define fixed4 half4 #define fixed3 half3 #define fixed half - #include "../Include/Spine-Input-BlendModes-URP.hlsl" - #include "../Include/Spine-BlendModes-NormalPass-URP.hlsl" + #define APPLY_MATERIAL_TINT_COLOR + #include "../Include/Spine-Input-URP.hlsl" + #include "../Include/Spine-Skeleton-ForwardPass-URP.hlsl" ENDHLSL - } + } - Pass - { - Name "ShadowCaster" - Tags{"LightMode" = "ShadowCaster"} - - ZWrite On - ColorMask 0 - ZTest LEqual - Cull Off - - HLSLPROGRAM - // Required to compile gles 2.0 with standard srp library - #pragma prefer_hlslcc gles - #pragma exclude_renderers d3d11_9x - #pragma target 2.0 - - // ------------------------------------- - // Material Keywords - #pragma shader_feature _ALPHATEST_ON - - //-------------------------------------- - // GPU Instancing - #pragma multi_compile_instancing - #pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A - - #pragma vertex ShadowPassVertexSkeletonLit - #pragma fragment ShadowPassFragmentSkeletonLit - - #define USE_URP - #define fixed4 half4 - #define fixed3 half3 - #define fixed half - #include "../Include/Spine-Input-BlendModes-URP.hlsl" - #include "../Include/Spine-SkeletonLit-ShadowCasterPass-URP.hlsl" - - ENDHLSL - } + UsePass "Universal Render Pipeline/Spine/Skeleton/SHADOWCASTER" } - CustomEditor "SpineShaderWithOutlineGUI" } diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/BlendModes/Spine-Skeleton-Multiply-URP.shader b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/BlendModes/Spine-Skeleton-Multiply-URP.shader index 0d003ebb5..80302211d 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/BlendModes/Spine-Skeleton-Multiply-URP.shader +++ b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/BlendModes/Spine-Skeleton-Multiply-URP.shader @@ -4,6 +4,8 @@ [NoScaleOffset] _MainTex ("MainTex", 2D) = "black" {} [Toggle(_STRAIGHT_ALPHA_INPUT)] _StraightAlphaInput("Straight Alpha Texture", Int) = 0 _Cutoff ("Shadow alpha cutoff", Range(0,1)) = 0.1 + [MaterialToggle(_TINT_BLACK_ON)] _TintBlack("Tint Black", Float) = 0 + _Black(" Dark Color", Color) = (0,0,0,0) [HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0 [HideInInspector][Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Comparison", Float) = 8 // Set to Always as default } @@ -15,7 +17,6 @@ Fog { Mode Off } Cull Off ZWrite Off - Blend DstColor OneMinusSrcAlpha Lighting Off Stencil { @@ -27,10 +28,28 @@ Pass { Name "Forward" Tags{"LightMode" = "UniversalForward"} + + Blend DstColor OneMinusSrcAlpha + HLSLPROGRAM + // Required to compile gles 2.0 with standard srp library + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + + // ------------------------------------- + // Unity defined keywords + #pragma multi_compile_fog + + //-------------------------------------- + // GPU Instancing + #pragma multi_compile_instancing + + //-------------------------------------- + // Spine related keywords + #pragma shader_feature _ _STRAIGHT_ALPHA_INPUT + #pragma shader_feature _TINT_BLACK_ON #pragma vertex vert #pragma fragment frag - #pragma shader_feature _ _STRAIGHT_ALPHA_INPUT #undef LIGHTMAP_ON @@ -38,12 +57,12 @@ #define fixed4 half4 #define fixed3 half3 #define fixed half - #include "../Include/Spine-Input-BlendModes-URP.hlsl" - #include "../Include/Spine-BlendModes-NormalPass-URP.hlsl" + #define APPLY_MATERIAL_TINT_COLOR + #include "../Include/Spine-Input-URP.hlsl" + #include "../Include/Spine-Skeleton-ForwardPass-URP.hlsl" ENDHLSL - } + } - UsePass "Universal Render Pipeline/Spine/Blend Modes/Skeleton Additive/SHADOWCASTER" + UsePass "Universal Render Pipeline/Spine/Skeleton/SHADOWCASTER" } - CustomEditor "SpineShaderWithOutlineGUI" } diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/BlendModes/Spine-Skeleton-Screen-URP.shader b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/BlendModes/Spine-Skeleton-Screen-URP.shader index 667bd6064..2e200e3c6 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/BlendModes/Spine-Skeleton-Screen-URP.shader +++ b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/BlendModes/Spine-Skeleton-Screen-URP.shader @@ -4,6 +4,8 @@ [NoScaleOffset] _MainTex ("MainTex", 2D) = "black" {} [Toggle(_STRAIGHT_ALPHA_INPUT)] _StraightAlphaInput("Straight Alpha Texture", Int) = 0 _Cutoff ("Shadow alpha cutoff", Range(0,1)) = 0.1 + [MaterialToggle(_TINT_BLACK_ON)] _TintBlack("Tint Black", Float) = 0 + _Black(" Dark Color", Color) = (0,0,0,0) [HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0 [HideInInspector][Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Comparison", Float) = 8 // Set to Always as default } @@ -15,7 +17,6 @@ Fog { Mode Off } Cull Off ZWrite Off - Blend One OneMinusSrcColor Lighting Off Stencil { @@ -27,10 +28,28 @@ Pass { Name "Forward" Tags{"LightMode" = "UniversalForward"} + + Blend One OneMinusSrcColor + HLSLPROGRAM + // Required to compile gles 2.0 with standard srp library + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + + // ------------------------------------- + // Unity defined keywords + #pragma multi_compile_fog + + //-------------------------------------- + // GPU Instancing + #pragma multi_compile_instancing + + //-------------------------------------- + // Spine related keywords + #pragma shader_feature _ _STRAIGHT_ALPHA_INPUT + #pragma shader_feature _TINT_BLACK_ON #pragma vertex vert #pragma fragment frag - #pragma shader_feature _ _STRAIGHT_ALPHA_INPUT #undef LIGHTMAP_ON @@ -38,12 +57,12 @@ #define fixed4 half4 #define fixed3 half3 #define fixed half - #include "../Include/Spine-Input-BlendModes-URP.hlsl" - #include "../Include/Spine-BlendModes-NormalPass-URP.hlsl" + #define APPLY_MATERIAL_TINT_COLOR + #include "../Include/Spine-Input-URP.hlsl" + #include "../Include/Spine-Skeleton-ForwardPass-URP.hlsl" ENDHLSL - } + } - UsePass "Universal Render Pipeline/Spine/Blend Modes/Skeleton Additive/SHADOWCASTER" + UsePass "Universal Render Pipeline/Spine/Skeleton/SHADOWCASTER" } - CustomEditor "SpineShaderWithOutlineGUI" } diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Include/Spine-BlendModes-NormalPass-URP.hlsl b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Include/Spine-BlendModes-NormalPass-URP.hlsl deleted file mode 100644 index eeffc7166..000000000 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Include/Spine-BlendModes-NormalPass-URP.hlsl +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef BLENDMODES_NORMAL_PASS_URP_INCLUDED -#define BLENDMODES_NORMAL_PASS_URP_INCLUDED - -#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonMaterial.hlsl" -#include "SpineCoreShaders/Spine-Common.cginc" -#include "SpineCoreShaders/Spine-Skeleton-Tint-Common.cginc" - -struct VertexInput { - float3 pos : POSITION; - float2 uv : TEXCOORD0; - float4 vertexColor : COLOR; -}; - -struct VertexOutput { - float4 pos : SV_POSITION; - float2 uv : TEXCOORD0; - float4 vertexColor : COLOR; -}; - -VertexOutput vert(VertexInput v) { - VertexOutput o; - float3 positionWS = TransformObjectToWorld(v.pos); - o.pos = TransformWorldToHClip(positionWS); - o.uv = v.uv; - o.vertexColor = PMAGammaToTargetSpace(v.vertexColor) * float4(_Color.rgb * _Color.a, _Color.a); // Combine a PMA version of _Color with vertexColor. - return o; -} - -float4 frag(VertexOutput i) : SV_Target{ - float4 texColor = tex2D(_MainTex, i.uv); - - #if defined(_STRAIGHT_ALPHA_INPUT) - texColor.rgb *= texColor.a; - #endif - - return (texColor * i.vertexColor); -} - -#endif diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Include/Spine-BlendModes-NormalPass-URP.hlsl.meta b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Include/Spine-BlendModes-NormalPass-URP.hlsl.meta deleted file mode 100644 index 13c7872cf..000000000 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Include/Spine-BlendModes-NormalPass-URP.hlsl.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 444419be824cb1d4482a06b558b0892a -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - preprocessorOverride: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Include/Spine-Input-BlendModes-URP.hlsl b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Include/Spine-Input-BlendModes-URP.hlsl deleted file mode 100644 index 5cf781a1f..000000000 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Include/Spine-Input-BlendModes-URP.hlsl +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef URP_INPUT_BLEND_MODES_INCLUDED -#define URP_INPUT_BLEND_MODES_INCLUDED - -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" - -//////////////////////////////////////// -// Defines -// -#undef LIGHTMAP_ON - -CBUFFER_START(UnityPerMaterial) - -float4 _MainTex_ST; -half _Cutoff; -half4 _Color; - -CBUFFER_END - -sampler2D _MainTex; - -#endif diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Include/Spine-Input-BlendModes-URP.hlsl.meta b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Include/Spine-Input-BlendModes-URP.hlsl.meta deleted file mode 100644 index c697bd74f..000000000 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Include/Spine-Input-BlendModes-URP.hlsl.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 7fbcfe81149b96e458243062a65e31b4 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - preprocessorOverride: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Include/Spine-Skeleton-ForwardPass-URP.hlsl b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Include/Spine-Skeleton-ForwardPass-URP.hlsl index 03fee1caf..afd16546c 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Include/Spine-Skeleton-ForwardPass-URP.hlsl +++ b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/Include/Spine-Skeleton-ForwardPass-URP.hlsl @@ -41,6 +41,8 @@ VertexOutput vert(appdata v) { o.color *= _Color; o.darkColor = GammaToTargetSpace( half3(v.tintBlackRG.r, v.tintBlackRG.g, v.tintBlackB.r)) + _Black.rgb; +#elif defined (APPLY_MATERIAL_TINT_COLOR) + o.color *= _Color; #endif return o; } 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 0ea608d4b..9df1313b7 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.1.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)", - "version": "4.1.25", + "version": "4.1.26", "unity": "2019.3", "author": { "name": "Esoteric Software",