From cb3da8ef9582d547028b00214a85bea364d122ad Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Tue, 9 Dec 2025 21:52:05 +0100 Subject: [PATCH] [unity] Fixed additional URP shaders compile errors on Unity 6.3 on some configurations. See #2993. --- .../Spine-Sprite-StandardPass-URP-2D.hlsl | 26 ++++++++++--------- .../2D/Spine-SkeletonLit-URP-2D.shader | 2 ++ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/Include/Spine-Sprite-StandardPass-URP-2D.hlsl b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/Include/Spine-Sprite-StandardPass-URP-2D.hlsl index 1c9db114e..137e906e6 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/Include/Spine-Sprite-StandardPass-URP-2D.hlsl +++ b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/Include/Spine-Sprite-StandardPass-URP-2D.hlsl @@ -10,21 +10,23 @@ #endif #include "Packages/com.esotericsoftware.spine.urp-shaders/Shaders/Include/SpineCoreShaders/Spine-Skeleton-Tint-Common.cginc" -#if USE_SHAPE_LIGHT_TYPE_0 -SHAPE_LIGHT(0) -#endif +#if UNITY_VERSION < 60030000 // before Unity 6000.3 + #if USE_SHAPE_LIGHT_TYPE_0 + SHAPE_LIGHT(0) + #endif -#if USE_SHAPE_LIGHT_TYPE_1 -SHAPE_LIGHT(1) -#endif + #if USE_SHAPE_LIGHT_TYPE_1 + SHAPE_LIGHT(1) + #endif -#if USE_SHAPE_LIGHT_TYPE_2 -SHAPE_LIGHT(2) -#endif + #if USE_SHAPE_LIGHT_TYPE_2 + SHAPE_LIGHT(2) + #endif -#if USE_SHAPE_LIGHT_TYPE_3 -SHAPE_LIGHT(3) -#endif + #if USE_SHAPE_LIGHT_TYPE_3 + SHAPE_LIGHT(3) + #endif +#endif // #if UNITY_VERSION < 60030000 // before Unity 6000.3 TEXTURE2D(_MaskTex); SAMPLER(sampler_MaskTex); diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/Spine-SkeletonLit-URP-2D.shader b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/Spine-SkeletonLit-URP-2D.shader index d725fcf87..dd40d91f8 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/Spine-SkeletonLit-URP-2D.shader +++ b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Shaders/2D/Spine-SkeletonLit-URP-2D.shader @@ -96,6 +96,7 @@ Shader "Universal Render Pipeline/2D/Spine/Skeleton Lit" { TEXTURE2D(_MaskTex); SAMPLER(sampler_MaskTex); + #if UNITY_VERSION < 60030000 // before Unity 6000.3 #if USE_SHAPE_LIGHT_TYPE_0 SHAPE_LIGHT(0) #endif @@ -111,6 +112,7 @@ Shader "Universal Render Pipeline/2D/Spine/Skeleton Lit" { #if USE_SHAPE_LIGHT_TYPE_3 SHAPE_LIGHT(3) #endif + #endif Varyings CombinedShapeLightVertex(Attributes v) {