|
@@ -49,7 +49,8 @@ VertexOutput vert (VertexInput IN) {
|
|
#else
|
|
#else
|
|
// Note: CanvasRenderer performs a GammaToTargetSpace conversion on vertex color already,
|
|
// Note: CanvasRenderer performs a GammaToTargetSpace conversion on vertex color already,
|
|
// however incorrectly assuming straight alpha color.
|
|
// however incorrectly assuming straight alpha color.
|
|
- float4 vertexColor = PMAGammaToTargetSpace(half4(TargetToGammaSpace(IN.color.rgb), IN.color.a));
|
|
|
|
|
|
+ // Saturated version used to prevent numerical issues of certain low-alpha values.
|
|
|
|
+ float4 vertexColor = PMAGammaToTargetSpaceSaturated(half4(TargetToGammaSpace(IN.color.rgb), IN.color.a));
|
|
#endif
|
|
#endif
|
|
OUT.color = vertexColor * float4(_Color.rgb * _Color.a, _Color.a); // Combine a PMA version of _Color with vertexColor.
|
|
OUT.color = vertexColor * float4(_Color.rgb * _Color.a, _Color.a); // Combine a PMA version of _Color with vertexColor.
|
|
return OUT;
|
|
return OUT;
|