Fix color grading lut to be refreshed when shader gets reloaded

This commit is contained in:
Wojtek Figat
2025-10-28 23:19:51 +01:00
parent c4fcaa999c
commit 05a8c841da
5 changed files with 29 additions and 16 deletions

View File

@@ -37,7 +37,7 @@ float4 FastTonemapInvert(float4 c)
return float4(FastTonemapInvert(c.rgb), c.a);
}
float LinearToSrgbChannel(float linearColor)
float LinearToSrgb(float linearColor)
{
if (linearColor < 0.00313067)
return linearColor * 12.92;
@@ -46,10 +46,7 @@ float LinearToSrgbChannel(float linearColor)
float3 LinearToSrgb(float3 linearColor)
{
return float3(
LinearToSrgbChannel(linearColor.r),
LinearToSrgbChannel(linearColor.g),
LinearToSrgbChannel(linearColor.b));
return float3(LinearToSrgb(linearColor.r), LinearToSrgb(linearColor.g), LinearToSrgb(linearColor.b));
}
float3 sRGBToLinear(float3 color)