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

Commit 4bfd2ef

Browse files
committed
Fixed dithering in gamma mode
1 parent f3e25e9 commit 4bfd2ef

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

PostProcessing/Shaders/Builtins/Uber.shader

+11-5
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,12 @@ Shader "Hidden/PostProcessing/Uber"
230230

231231
#if FINALPASS
232232
{
233+
#if UNITY_COLORSPACE_GAMMA
234+
{
235+
output = LinearToSRGB(output);
236+
}
237+
#endif
238+
233239
output.rgb = Dither(output.rgb, i.texcoord);
234240
}
235241
#else
@@ -242,12 +248,12 @@ Shader "Hidden/PostProcessing/Uber"
242248
half luma = Luminance(saturate(output));
243249
output.a = luma;
244250
}
245-
}
246-
#endif
247251

248-
#if UNITY_COLORSPACE_GAMMA
249-
{
250-
output = LinearToSRGB(output);
252+
#if UNITY_COLORSPACE_GAMMA
253+
{
254+
output = LinearToSRGB(output);
255+
}
256+
#endif
251257
}
252258
#endif
253259

0 commit comments

Comments
 (0)