From a10eea6e4ce647061813519d5b0ea496f29495b9 Mon Sep 17 00:00:00 2001
From: leonard Wu <364452445@qq.com>
Date: 星期四, 09 八月 2018 09:47:08 +0800
Subject: [PATCH] 同步最新svn内容
---
Assets/Plugins/PostProcessing/Resources/Shaders/UberSecondPass.cginc | 78 +++++++++++++++++++-------------------
1 files changed, 39 insertions(+), 39 deletions(-)
diff --git a/Assets/Plugins/PostProcessing/Resources/Shaders/UberSecondPass.cginc b/Assets/Plugins/PostProcessing/Resources/Shaders/UberSecondPass.cginc
index 4a53822..2ba3214 100644
--- a/Assets/Plugins/PostProcessing/Resources/Shaders/UberSecondPass.cginc
+++ b/Assets/Plugins/PostProcessing/Resources/Shaders/UberSecondPass.cginc
@@ -1,39 +1,39 @@
-#include "ColorGrading.cginc"
-
-// Grain
-half2 _Grain_Params1; // x: lum_contrib, y: intensity
-half4 _Grain_Params2; // x: xscale, h: yscale, z: xoffset, w: yoffset
-sampler2D _GrainTex;
-
-// Dithering
-sampler2D _DitheringTex;
-float4 _DitheringCoords;
-
-float3 UberSecondPass(half3 color, float2 uv)
-{
- // Grain
- #if GRAIN
- {
- float3 grain = tex2D(_GrainTex, uv * _Grain_Params2.xy + _Grain_Params2.zw).rgb;
-
- // Noisiness response curve based on scene luminance
- float lum = 1.0 - sqrt(AcesLuminance(color));
- lum = lerp(1.0, lum, _Grain_Params1.x);
-
- color += color * grain * _Grain_Params1.y * lum;
- }
- #endif
-
- // Blue noise dithering
- #if DITHERING
- {
- // Symmetric triangular distribution on [-1,1] with maximal density at 0
- float noise = tex2D(_DitheringTex, uv * _DitheringCoords.xy + _DitheringCoords.zw).a * 2.0 - 1.0;
- noise = sign(noise) * (1.0 - sqrt(1.0 - abs(noise))) / 255.0;
-
- color += noise;
- }
- #endif
-
- return color;
-}
+#include "ColorGrading.cginc"
+
+// Grain
+half2 _Grain_Params1; // x: lum_contrib, y: intensity
+half4 _Grain_Params2; // x: xscale, h: yscale, z: xoffset, w: yoffset
+sampler2D _GrainTex;
+
+// Dithering
+sampler2D _DitheringTex;
+float4 _DitheringCoords;
+
+float3 UberSecondPass(half3 color, float2 uv)
+{
+ // Grain
+ #if GRAIN
+ {
+ float3 grain = tex2D(_GrainTex, uv * _Grain_Params2.xy + _Grain_Params2.zw).rgb;
+
+ // Noisiness response curve based on scene luminance
+ float lum = 1.0 - sqrt(AcesLuminance(color));
+ lum = lerp(1.0, lum, _Grain_Params1.x);
+
+ color += color * grain * _Grain_Params1.y * lum;
+ }
+ #endif
+
+ // Blue noise dithering
+ #if DITHERING
+ {
+ // Symmetric triangular distribution on [-1,1] with maximal density at 0
+ float noise = tex2D(_DitheringTex, uv * _DitheringCoords.xy + _DitheringCoords.zw).a * 2.0 - 1.0;
+ noise = sign(noise) * (1.0 - sqrt(1.0 - abs(noise))) / 255.0;
+
+ color += noise;
+ }
+ #endif
+
+ return color;
+}
--
Gitblit v1.8.0