This repository was archived by the owner on Nov 30, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
PostProcessing/Resources/Shaders Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -175,14 +175,7 @@ Shader "Hidden/Post FX/Uber Shader"
175175 #endif
176176
177177 // Depth of field
178- #if DEPTH_OF_FIELD
179- {
180- #if !CHROMATIC_ABERRATION
181- half4 dof = tex2D (_DepthOfFieldTex, i.uvFlippedSPR);
182- #endif
183- color = color * dof.a + dof.rgb * autoExposure;
184- }
185- #elif DEPTH_OF_FIELD_COC_VIEW
178+ #if DEPTH_OF_FIELD_COC_VIEW
186179 {
187180 // Calculate the radiuses of CoC.
188181 half4 src = tex2D (_DepthOfFieldTex, uv);
@@ -206,6 +199,13 @@ Shader "Hidden/Post FX/Uber Shader"
206199
207200 color = rgb;
208201 }
202+ #elif DEPTH_OF_FIELD
203+ {
204+ #if !CHROMATIC_ABERRATION
205+ half4 dof = tex2D (_DepthOfFieldTex, i.uvFlippedSPR);
206+ #endif
207+ color = color * dof.a + dof.rgb * autoExposure;
208+ }
209209 #endif
210210
211211 // HDR Bloom
@@ -243,18 +243,18 @@ Shader "Hidden/Post FX/Uber Shader"
243243 #endif
244244
245245 // HDR color grading & tonemapping
246- #if COLOR_GRADING
246+ #if COLOR_GRADING_LOG_VIEW
247+ {
248+ color *= _ExposureEV;
249+ color = saturate (LinearToLogC (color));
250+ }
251+ #elif COLOR_GRADING
247252 {
248253 color *= _ExposureEV; // Exposure is in ev units (or 'stops')
249254
250255 half3 colorLogC = saturate (LinearToLogC (color));
251256 color = ApplyLut2d (_LogLut, colorLogC, _LogLut_Params);
252257 }
253- #elif COLOR_GRADING_LOG_VIEW
254- {
255- color *= _ExposureEV;
256- color = saturate (LinearToLogC (color));
257- }
258258 #endif
259259
260260 //
You can’t perform that action at this time.
0 commit comments