Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit 7d99986

Browse files
committed
Gamma space :|
1 parent ac405b9 commit 7d99986

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

PostProcessing/Shaders/Builtins/Uber.shader

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -216,17 +216,10 @@ Shader "Hidden/PostProcessing/Uber"
216216
{
217217
color = saturate(color);
218218

219-
#if UNITY_COLORSPACE_GAMMA
220-
{
221-
color.rgb = ApplyLut2D(TEXTURE2D_PARAM(_Lut2D, sampler_Lut2D), color.rgb, _Lut2D_Params);
222-
}
223-
#else
224-
{
225-
color.rgb = LinearToSRGB(color.rgb);
226-
color.rgb = ApplyLut2D(TEXTURE2D_PARAM(_Lut2D, sampler_Lut2D), color.rgb, _Lut2D_Params);
227-
color.rgb = SRGBToLinear(color.rgb);
228-
}
229-
#endif
219+
// LDR Lut lookup needs to be in sRGB - for HDR stick to linear
220+
color.rgb = LinearToSRGB(color.rgb);
221+
color.rgb = ApplyLut2D(TEXTURE2D_PARAM(_Lut2D, sampler_Lut2D), color.rgb, _Lut2D_Params);
222+
color.rgb = SRGBToLinear(color.rgb);
230223
}
231224
#endif
232225

0 commit comments

Comments
 (0)