From 617eb38340b56085923d3cedf2c5149d4caa9c54 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Tue, 3 Sep 2019 20:03:26 +0200 Subject: [PATCH] [unity] Fixed more fragment shader output declarations (from COLOR to SV_Target), fixes ps4 shader compile error. Related to commit e229dab. See #1374. --- .../Ghost/Shaders/Spine-Special-Skeleton-Ghost.shader | 2 +- .../Shaders/BlendModes/Spine-Skeleton-PMA-Multiply.shader | 2 +- .../Runtime/spine-unity/Shaders/Spine-Skeleton-Fill.shader | 4 ++-- .../Runtime/spine-unity/Shaders/Spine-Skeleton-Tint.shader | 4 ++-- .../Shaders/Spine-Special-Skeleton-Grayscale.shader | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spine-unity/Assets/Spine Examples/Scripts/Sample Components/Ghost/Shaders/Spine-Special-Skeleton-Ghost.shader b/spine-unity/Assets/Spine Examples/Scripts/Sample Components/Ghost/Shaders/Spine-Special-Skeleton-Ghost.shader index 85923c323..bb9420089 100644 --- a/spine-unity/Assets/Spine Examples/Scripts/Sample Components/Ghost/Shaders/Spine-Special-Skeleton-Ghost.shader +++ b/spine-unity/Assets/Spine Examples/Scripts/Sample Components/Ghost/Shaders/Spine-Special-Skeleton-Ghost.shader @@ -56,7 +56,7 @@ Shader "Spine/Special/SkeletonGhost" { return o; } - fixed4 frag (VertexOutput i) : COLOR { + fixed4 frag (VertexOutput i) : SV_Target { fixed4 tc = tex2D(_MainTex, i.uv); tc = fixed4(max(_TextureFade, tc.r), max(_TextureFade, tc.g), max(_TextureFade, tc.b), tc.a); return tc * ((i.color * _Color) * tc.a); 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 a02077e94..ef05e3e47 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 @@ -105,7 +105,7 @@ Shader "Spine/Blend Modes/Skeleton PMA Multiply" { uniform sampler2D _MainTex; uniform fixed _Cutoff; - float4 frag (v2f i) : COLOR { + float4 frag (v2f i) : SV_Target { fixed4 texcol = tex2D(_MainTex, i.uvAndAlpha.xy); clip(texcol.a * i.uvAndAlpha.a - _Cutoff); SHADOW_CASTER_FRAGMENT(i) 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 b6ae48f35..b5b11bd6e 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 @@ -55,7 +55,7 @@ Shader "Spine/Skeleton Fill" { return o; } - float4 frag (VertexOutput i) : COLOR { + float4 frag (VertexOutput i) : SV_Target { float4 rawColor = tex2D(_MainTex,i.uv); float finalAlpha = (rawColor.a * i.vertexColor.a); @@ -102,7 +102,7 @@ Shader "Spine/Skeleton Fill" { return o; } - float4 frag (VertexOutput i) : COLOR { + float4 frag (VertexOutput i) : SV_Target { fixed4 texcol = tex2D(_MainTex, i.uvAndAlpha.xy); clip(texcol.a * i.uvAndAlpha.a - _Cutoff); SHADOW_CASTER_FRAGMENT(i) 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 63df4f772..c4d012adc 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 @@ -60,7 +60,7 @@ Shader "Spine/Skeleton Tint" { return o; } - float4 frag (VertexOutput i) : COLOR { + float4 frag (VertexOutput i) : SV_Target { float4 texColor = tex2D(_MainTex, i.uv); #if defined(_STRAIGHT_ALPHA_INPUT) @@ -105,7 +105,7 @@ Shader "Spine/Skeleton Tint" { return o; } - float4 frag (VertexOutput i) : COLOR { + float4 frag (VertexOutput i) : SV_Target { fixed4 texcol = tex2D(_MainTex, i.uvAndAlpha.xy); clip(texcol.a * i.uvAndAlpha.a - _Cutoff); SHADOW_CASTER_FRAGMENT(i) 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 34a72f5a0..228a79a8e 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 @@ -53,7 +53,7 @@ Shader "Spine/Special/Skeleton Grayscale" { return o; } - float4 frag (VertexOutput i) : COLOR { + float4 frag (VertexOutput i) : SV_Target { float4 rawColor = tex2D(_MainTex,i.uv); float finalAlpha = (rawColor.a * i.vertexColor.a);