@@ -8,14 +8,15 @@ public sealed class DepthOfFieldComponent : PostProcessingComponentRenderTexture
88 {
99 static class Uniforms
1010 {
11- internal static readonly int _DepthOfFieldTex = Shader . PropertyToID ( "_DepthOfFieldTex" ) ;
12- internal static readonly int _Distance = Shader . PropertyToID ( "_Distance" ) ;
13- internal static readonly int _LensCoeff = Shader . PropertyToID ( "_LensCoeff" ) ;
14- internal static readonly int _MaxCoC = Shader . PropertyToID ( "_MaxCoC" ) ;
15- internal static readonly int _RcpMaxCoC = Shader . PropertyToID ( "_RcpMaxCoC" ) ;
16- internal static readonly int _RcpAspect = Shader . PropertyToID ( "_RcpAspect" ) ;
17- internal static readonly int _MainTex = Shader . PropertyToID ( "_MainTex" ) ;
18- internal static readonly int _HistoryCoC = Shader . PropertyToID ( "_HistoryCoC" ) ;
11+ internal static readonly int _DepthOfFieldTex = Shader . PropertyToID ( "_DepthOfFieldTex" ) ;
12+ internal static readonly int _Distance = Shader . PropertyToID ( "_Distance" ) ;
13+ internal static readonly int _LensCoeff = Shader . PropertyToID ( "_LensCoeff" ) ;
14+ internal static readonly int _MaxCoC = Shader . PropertyToID ( "_MaxCoC" ) ;
15+ internal static readonly int _RcpMaxCoC = Shader . PropertyToID ( "_RcpMaxCoC" ) ;
16+ internal static readonly int _RcpAspect = Shader . PropertyToID ( "_RcpAspect" ) ;
17+ internal static readonly int _MainTex = Shader . PropertyToID ( "_MainTex" ) ;
18+ internal static readonly int _HistoryCoC = Shader . PropertyToID ( "_HistoryCoC" ) ;
19+ internal static readonly int _DepthOfFieldParams = Shader . PropertyToID ( "_DepthOfFieldParams" ) ;
1920 }
2021
2122 const string k_ShaderString = "Hidden/Post FX/Depth Of Field" ;
@@ -129,7 +130,7 @@ public void Prepare(RenderTexture source, Material uberMaterial, bool antialiasC
129130 if ( context . profile . debugViews . IsModeActive ( DebugMode . FocusPlane ) )
130131 {
131132 uberMaterial . SetTexture ( Uniforms . _DepthOfFieldTex , rt1 ) ;
132- uberMaterial . SetFloat ( Uniforms . _MaxCoC , maxCoC ) ;
133+ uberMaterial . SetVector ( Uniforms . _DepthOfFieldParams , new Vector2 ( s1 , coeff ) ) ;
133134 uberMaterial . EnableKeyword ( "DEPTH_OF_FIELD_COC_VIEW" ) ;
134135 context . Interrupt ( ) ;
135136 }
0 commit comments