[unity] Fixed fragment shader output (from COLOR to SV_Target), fixes ps4 shader compile error. Closes #1374.

This commit is contained in:
Harald Csaszar 2019-07-10 12:38:21 +02:00
parent 8532d3a929
commit a96a059faf
9 changed files with 13 additions and 13 deletions

View File

@ -101,7 +101,7 @@ Shader "Spine/Special/Skeleton Grayscale" {
return o;
}
float4 frag (VertexOutput i) : COLOR {
float4 frag (VertexOutput i) : SV_Target {
fixed4 texcol = tex2D(_MainTex, i.uv);
clip(texcol.a - _Cutoff);
SHADOW_CASTER_FRAGMENT(i)

View File

@ -38,7 +38,7 @@ vertexOutput vert(vertexInput v)
uniform fixed _ShadowAlphaCutoff;
fixed4 frag(vertexOutput IN) : COLOR
fixed4 frag(vertexOutput IN) : SV_Target
{
fixed4 texureColor = calculateTexturePixel(IN.texcoord);
clip(texureColor.a - _ShadowAlphaCutoff);

View File

@ -41,7 +41,7 @@ vertexOutput vert(vertexInput v)
uniform fixed _ShadowAlphaCutoff;
fixed4 frag(vertexOutput IN) : COLOR
fixed4 frag(vertexOutput IN) : SV_Target
{
fixed4 texureColor = tex2D(_MainTex, IN.texcoord.xy);
clip(texureColor.a - _ShadowAlphaCutoff);

View File

@ -60,7 +60,7 @@ Shader "Spine/Blend Modes/Skeleton PMA Additive" {
return o;
}
float4 frag (VertexOutput i) : COLOR {
float4 frag (VertexOutput i) : SV_Target {
float4 texColor = tex2D(_MainTex, i.uv);
#if defined(_STRAIGHT_ALPHA_INPUT)
@ -103,7 +103,7 @@ Shader "Spine/Blend Modes/Skeleton PMA Additive" {
uniform sampler2D _MainTex;
uniform fixed _Cutoff;
float4 frag (v2f i) : COLOR {
float4 frag (v2f i) : SV_Target {
fixed4 texcol = tex2D(_MainTex, i.uv);
clip(texcol.a - _Cutoff);
SHADOW_CASTER_FRAGMENT(i)

View File

@ -60,7 +60,7 @@ Shader "Spine/Blend Modes/Skeleton PMA Multiply" {
return o;
}
float4 frag (VertexOutput i) : COLOR {
float4 frag (VertexOutput i) : SV_Target {
float4 texColor = tex2D(_MainTex, i.uv);
#if defined(_STRAIGHT_ALPHA_INPUT)

View File

@ -60,7 +60,7 @@ Shader "Spine/Blend Modes/Skeleton PMA Screen" {
return o;
}
float4 frag (VertexOutput i) : COLOR {
float4 frag (VertexOutput i) : SV_Target {
float4 texColor = tex2D(_MainTex, i.uv);
#if defined(_STRAIGHT_ALPHA_INPUT)
@ -103,7 +103,7 @@ Shader "Spine/Blend Modes/Skeleton PMA Screen" {
uniform sampler2D _MainTex;
uniform fixed _Cutoff;
float4 frag (v2f i) : COLOR {
float4 frag (v2f i) : SV_Target {
fixed4 texcol = tex2D(_MainTex, i.uv);
clip(texcol.a - _Cutoff);
SHADOW_CASTER_FRAGMENT(i)

View File

@ -69,7 +69,7 @@ Shader "Spine/Skeleton Tint Black" {
return o;
}
float4 frag (VertexOutput i) : COLOR {
float4 frag (VertexOutput i) : SV_Target {
float4 texColor = tex2D(_MainTex, i.uv);
#if defined(_STRAIGHT_ALPHA_INPUT)
@ -110,7 +110,7 @@ Shader "Spine/Skeleton Tint Black" {
return o;
}
float4 frag (v2f i) : COLOR {
float4 frag (v2f i) : SV_Target {
fixed4 texcol = tex2D(_MainTex, i.uv);
clip(texcol.a - _Cutoff);
SHADOW_CASTER_FRAGMENT(i)

View File

@ -50,7 +50,7 @@ Shader "Spine/Skeleton" {
return o;
}
float4 frag (VertexOutput i) : COLOR {
float4 frag (VertexOutput i) : SV_Target {
float4 texColor = tex2D(_MainTex, i.uv);
#if defined(_STRAIGHT_ALPHA_INPUT)
@ -94,7 +94,7 @@ Shader "Spine/Skeleton" {
return o;
}
float4 frag (VertexOutput i) : COLOR {
float4 frag (VertexOutput i) : SV_Target {
fixed4 texcol = tex2D(_MainTex, i.uv);
clip(texcol.a - _Cutoff);
SHADOW_CASTER_FRAGMENT(i)

View File

@ -194,7 +194,7 @@ Shader "Spine/Skeleton Lit" {
uniform sampler2D _MainTex;
uniform fixed _Cutoff;
float4 frag (v2f i) : COLOR {
float4 frag (v2f i) : SV_Target {
fixed4 texcol = tex2D(_MainTex, i.uv);
clip(texcol.a - _Cutoff);
SHADOW_CASTER_FRAGMENT(i)