@@ -189,9 +189,9 @@ void RenderExternalPipeline(PostProcessRenderContext context)
189189
190190 var uberSheet = context . uberSheet ;
191191 uberSheet . EnableKeyword ( "COLOR_GRADING_HDR" ) ;
192- uberSheet . properties . SetTexture ( Uniforms . _Lut3D , lut ) ;
193- uberSheet . properties . SetVector ( Uniforms . _Lut3D_Params , new Vector2 ( 1f / lut . width , lut . width - 1f ) ) ;
194- uberSheet . properties . SetFloat ( Uniforms . _PostExposure , RuntimeUtilities . Exp2 ( settings . postExposure . value ) ) ;
192+ uberSheet . properties . SetTexture ( ShaderIDs . Lut3D , lut ) ;
193+ uberSheet . properties . SetVector ( ShaderIDs . Lut3D_Params , new Vector2 ( 1f / lut . width , lut . width - 1f ) ) ;
194+ uberSheet . properties . SetFloat ( ShaderIDs . PostExposure , RuntimeUtilities . Exp2 ( settings . postExposure . value ) ) ;
195195 context . logLut = lut ;
196196 }
197197
@@ -294,9 +294,9 @@ void RenderHDRPipeline(PostProcessRenderContext context)
294294 var lut = m_InternalLogLut ;
295295 var uberSheet = context . uberSheet ;
296296 uberSheet . EnableKeyword ( "COLOR_GRADING_HDR" ) ;
297- uberSheet . properties . SetTexture ( Uniforms . _Lut3D , lut ) ;
298- uberSheet . properties . SetVector ( Uniforms . _Lut3D_Params , new Vector2 ( 1f / lut . width , lut . width - 1f ) ) ;
299- uberSheet . properties . SetFloat ( Uniforms . _PostExposure , RuntimeUtilities . Exp2 ( settings . postExposure . value ) ) ;
297+ uberSheet . properties . SetTexture ( ShaderIDs . Lut3D , lut ) ;
298+ uberSheet . properties . SetVector ( ShaderIDs . Lut3D_Params , new Vector2 ( 1f / lut . width , lut . width - 1f ) ) ;
299+ uberSheet . properties . SetFloat ( ShaderIDs . PostExposure , RuntimeUtilities . Exp2 ( settings . postExposure . value ) ) ;
300300
301301 context . logLut = lut ;
302302 }
@@ -312,33 +312,33 @@ void RenderLDRPipeline(PostProcessRenderContext context)
312312 var lutSheet = context . propertySheets . Get ( context . resources . shaders . lut2DBaker ) ;
313313 lutSheet . ClearKeywords ( ) ;
314314
315- lutSheet . properties . SetVector ( Uniforms . _Lut2D_Params , new Vector4 ( k_Lut2DSize , 0.5f / ( k_Lut2DSize * k_Lut2DSize ) , 0.5f / k_Lut2DSize , k_Lut2DSize / ( k_Lut2DSize - 1f ) ) ) ;
315+ lutSheet . properties . SetVector ( ShaderIDs . Lut2D_Params , new Vector4 ( k_Lut2DSize , 0.5f / ( k_Lut2DSize * k_Lut2DSize ) , 0.5f / k_Lut2DSize , k_Lut2DSize / ( k_Lut2DSize - 1f ) ) ) ;
316316
317317 var colorBalance = ColorUtilities . ComputeColorBalance ( settings . temperature . value , settings . tint . value ) ;
318- lutSheet . properties . SetVector ( Uniforms . _ColorBalance , colorBalance ) ;
319- lutSheet . properties . SetVector ( Uniforms . _ColorFilter , settings . colorFilter . value ) ;
318+ lutSheet . properties . SetVector ( ShaderIDs . ColorBalance , colorBalance ) ;
319+ lutSheet . properties . SetVector ( ShaderIDs . ColorFilter , settings . colorFilter . value ) ;
320320
321321 float hue = settings . hueShift . value / 360f ; // Remap to [-0.5;0.5]
322322 float sat = settings . saturation . value / 100f + 1f ; // Remap to [0;2]
323323 float con = settings . contrast . value / 100f + 1f ; // Remap to [0;2]
324- lutSheet . properties . SetVector ( Uniforms . _HueSatCon , new Vector3 ( hue , sat , con ) ) ;
324+ lutSheet . properties . SetVector ( ShaderIDs . HueSatCon , new Vector3 ( hue , sat , con ) ) ;
325325
326326 var channelMixerR = new Vector3 ( settings . mixerRedOutRedIn , settings . mixerRedOutGreenIn , settings . mixerRedOutBlueIn ) ;
327327 var channelMixerG = new Vector3 ( settings . mixerGreenOutRedIn , settings . mixerGreenOutGreenIn , settings . mixerGreenOutBlueIn ) ;
328328 var channelMixerB = new Vector3 ( settings . mixerBlueOutRedIn , settings . mixerBlueOutGreenIn , settings . mixerBlueOutBlueIn ) ;
329- lutSheet . properties . SetVector ( Uniforms . _ChannelMixerRed , channelMixerR / 100f ) ; // Remap to [-2;2]
330- lutSheet . properties . SetVector ( Uniforms . _ChannelMixerGreen , channelMixerG / 100f ) ;
331- lutSheet . properties . SetVector ( Uniforms . _ChannelMixerBlue , channelMixerB / 100f ) ;
329+ lutSheet . properties . SetVector ( ShaderIDs . ChannelMixerRed , channelMixerR / 100f ) ; // Remap to [-2;2]
330+ lutSheet . properties . SetVector ( ShaderIDs . ChannelMixerGreen , channelMixerG / 100f ) ;
331+ lutSheet . properties . SetVector ( ShaderIDs . ChannelMixerBlue , channelMixerB / 100f ) ;
332332
333333 var lift = ColorUtilities . ColorToLift ( settings . lift . value ) ;
334334 var gain = ColorUtilities . ColorToGain ( settings . gain . value ) ;
335335 var invgamma = ColorUtilities . ColorToInverseGamma ( settings . gamma . value ) ;
336- lutSheet . properties . SetVector ( Uniforms . _Lift , lift ) ;
337- lutSheet . properties . SetVector ( Uniforms . _InvGamma , invgamma ) ;
338- lutSheet . properties . SetVector ( Uniforms . _Gain , gain ) ;
336+ lutSheet . properties . SetVector ( ShaderIDs . Lift , lift ) ;
337+ lutSheet . properties . SetVector ( ShaderIDs . InvGamma , invgamma ) ;
338+ lutSheet . properties . SetVector ( ShaderIDs . Gain , gain ) ;
339339
340- lutSheet . properties . SetFloat ( Uniforms . _Brightness , ( settings . brightness . value + 100f ) / 100f ) ;
341- lutSheet . properties . SetTexture ( Uniforms . _Curves , GetCurveTexture ( false ) ) ;
340+ lutSheet . properties . SetFloat ( ShaderIDs . Brightness , ( settings . brightness . value + 100f ) / 100f ) ;
341+ lutSheet . properties . SetTexture ( ShaderIDs . Curves , GetCurveTexture ( false ) ) ;
342342
343343 // Generate the lut
344344 context . command . BeginSample ( "LdrColorGradingLut" ) ;
@@ -353,8 +353,8 @@ void RenderLDRPipeline(PostProcessRenderContext context)
353353 var lut = m_InternalLdrLut ;
354354 var uberSheet = context . uberSheet ;
355355 uberSheet . EnableKeyword ( "COLOR_GRADING_LDR" ) ;
356- uberSheet . properties . SetVector ( Uniforms . _Lut2D_Params , new Vector3 ( 1f / lut . width , 1f / lut . height , lut . height - 1f ) ) ;
357- uberSheet . properties . SetTexture ( Uniforms . _Lut2D , lut ) ;
356+ uberSheet . properties . SetVector ( ShaderIDs . Lut2D_Params , new Vector3 ( 1f / lut . width , 1f / lut . height , lut . height - 1f ) ) ;
357+ uberSheet . properties . SetTexture ( ShaderIDs . Lut2D , lut ) ;
358358 }
359359
360360 void CheckInternalLogLut ( )
0 commit comments