This repository was archived by the owner on Nov 30, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
PostProcessing/Resources/Shaders Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -288,19 +288,6 @@ Shader "Hidden/Post FX/Uber Shader"
288
288
289
289
color = saturate (color);
290
290
291
- // Grain
292
- #if GRAIN
293
- {
294
- float3 grain = tex2D (_GrainTex, uv * _Grain_Params2.xy + _Grain_Params2.zw).rgb;
295
-
296
- // Noisiness response curve based on scene luminance
297
- float lum = 1.0 - sqrt (AcesLuminance (color));
298
- lum = lerp (1.0 , lum, _Grain_Params1.x);
299
-
300
- color += color * grain * _Grain_Params1.y * lum;
301
- }
302
- #endif
303
-
304
291
// Back to gamma space if needed
305
292
#if UNITY_COLORSPACE_GAMMA
306
293
{
@@ -329,6 +316,19 @@ Shader "Hidden/Post FX/Uber Shader"
329
316
}
330
317
#endif
331
318
319
+ // Grain
320
+ #if GRAIN
321
+ {
322
+ float3 grain = tex2D (_GrainTex, uv * _Grain_Params2.xy + _Grain_Params2.zw).rgb;
323
+
324
+ // Noisiness response curve based on scene luminance
325
+ float lum = 1.0 - sqrt (AcesLuminance (color));
326
+ lum = lerp (1.0 , lum, _Grain_Params1.x);
327
+
328
+ color += color * grain * _Grain_Params1.y * lum;
329
+ }
330
+ #endif
331
+
332
332
// Blue noise dithering
333
333
#if DITHERING
334
334
{
You can’t perform that action at this time.
0 commit comments