mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Fixed URP Sprite shader treating skeleton alpha incorrectly. Closes #1735.
This commit is contained in:
parent
bb34e33aee
commit
11006baa65
@ -105,7 +105,7 @@ half4 LightweightFragmentPBRSimplified(InputData inputData, half4 texAlbedoAlpha
|
||||
finalColor += inputData.vertexLighting * brdfData.diffuse;
|
||||
#endif
|
||||
finalColor += emission;
|
||||
return prepareLitPixelForOutput(half4(finalColor, texAlbedoAlpha.a), vertexColor);
|
||||
return prepareLitPixelForOutput(half4(finalColor, albedo.a), vertexColor);
|
||||
}
|
||||
|
||||
#else // !SPECULAR
|
||||
@ -148,7 +148,7 @@ half4 LightweightFragmentBlinnPhongSimplified(InputData inputData, half4 texDiff
|
||||
diffuseLighting += emission;
|
||||
//half3 finalColor = diffuseLighting * diffuse + emission;
|
||||
half3 finalColor = diffuseLighting * diffuse.rgb;
|
||||
return prepareLitPixelForOutput(half4(finalColor, texDiffuseAlpha.a), vertexColor);
|
||||
return prepareLitPixelForOutput(half4(finalColor, diffuse.a), vertexColor);
|
||||
}
|
||||
#endif // SPECULAR
|
||||
|
||||
|
||||
@ -105,7 +105,7 @@ half4 LightweightFragmentPBRSimplified(InputData inputData, half4 texAlbedoAlpha
|
||||
finalColor += inputData.vertexLighting * brdfData.diffuse;
|
||||
#endif
|
||||
finalColor += emission;
|
||||
return prepareLitPixelForOutput(half4(finalColor, texAlbedoAlpha.a), vertexColor);
|
||||
return prepareLitPixelForOutput(half4(finalColor, albedo.a), vertexColor);
|
||||
}
|
||||
|
||||
#else // !SPECULAR
|
||||
@ -148,7 +148,7 @@ half4 LightweightFragmentBlinnPhongSimplified(InputData inputData, half4 texDiff
|
||||
diffuseLighting += emission;
|
||||
//half3 finalColor = diffuseLighting * diffuse + emission;
|
||||
half3 finalColor = diffuseLighting * diffuse.rgb;
|
||||
return prepareLitPixelForOutput(half4(finalColor, texDiffuseAlpha.a), vertexColor);
|
||||
return prepareLitPixelForOutput(half4(finalColor, diffuse.a), vertexColor);
|
||||
}
|
||||
#endif // SPECULAR
|
||||
|
||||
@ -261,6 +261,7 @@ half4 ForwardPassFragmentSprite(VertexOutputLWRP input) : SV_Target
|
||||
|
||||
COLORISE(pixel)
|
||||
APPLY_FOG_LWRP(pixel, input.fogFactorAndVertexLight.x)
|
||||
|
||||
return pixel;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user