mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
[unity] Fixed fragment shader output (from COLOR to SV_Target), fixes ps4 shader compile error. Closes #1374.
This commit is contained in:
parent
8532d3a929
commit
a96a059faf
@ -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)
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user