Add ps5 changes
This commit is contained in:
@@ -37,22 +37,22 @@ float4 FastTonemapInvert(float4 c)
|
||||
return float4(FastTonemapInvert(c.rgb), c.a);
|
||||
}
|
||||
|
||||
half LinearToSrgbChannel(half linearColor)
|
||||
float LinearToSrgbChannel(float linearColor)
|
||||
{
|
||||
if (linearColor < 0.00313067)
|
||||
return linearColor * 12.92;
|
||||
return pow(linearColor, (1.0 / 2.4)) * 1.055 - 0.055;
|
||||
}
|
||||
|
||||
half3 LinearToSrgb(half3 linearColor)
|
||||
float3 LinearToSrgb(float3 linearColor)
|
||||
{
|
||||
return half3(
|
||||
return float3(
|
||||
LinearToSrgbChannel(linearColor.r),
|
||||
LinearToSrgbChannel(linearColor.g),
|
||||
LinearToSrgbChannel(linearColor.b));
|
||||
}
|
||||
|
||||
half3 sRGBToLinear(half3 color)
|
||||
float3 sRGBToLinear(float3 color)
|
||||
{
|
||||
color = max(6.10352e-5, color);
|
||||
return color > 0.04045 ? pow(color * (1.0 / 1.055) + 0.0521327, 2.4) : color * (1.0 / 12.92);
|
||||
|
||||
Reference in New Issue
Block a user