RenderTargetIdentifier [ ] m_RTIDs = new RenderTargetIdentifier [ k_MaxDbuffer ] ;
public void InitDBuffers ( int width , int height , CommandBuffer cmd )
{
{
dbufferCount = Decal . GetMaterialDBufferCount ( ) ;
RenderTextureFormat [ ] rtFormat ;
RenderTextureReadWrite [ ] rtReadWrite ;
// Renderer Bake configuration can vary depends on if shadow mask is enabled or no
RendererConfiguration m_currentRendererConfigurationBakedLighting = HDUtils . k_RendererConfigurationBakedLighting ;
Material m_CopyStencilForSplitLighting ;
// Various set of material use in render loop
ComputeShader m_SubsurfaceScatteringCS { get { return m_Asset . renderPipelineResources . subsurfaceScatteringCS ; } }
int m_SubsurfaceScatteringKernel ;
Material m_CombineLightingPass ;
// Old SSS Model >>>
Material m_SssVerticalFilterPass ;
Material m_SssHorizontalFilterAndCombinePass ;
// <<< Old SSS Model
ComputeShader m_GaussianPyramidCS { get { return m_Asset . renderPipelineResources . gaussianPyramidCS ; } }
int m_GaussianPyramidKernel ;
ComputeShader m_DepthPyramidCS { get { return m_Asset . renderPipelineResources . depthPyramidCS ; } }
// Various buffer
readonly int m_CameraColorBuffer ;
readonly int m_CameraSssDiffuseLightingBuffer ;
// Old SSS Model >>>
readonly int m_CameraFilteringBuffer ;
// <<< Old SSS Model
readonly int m_ShadowMaskBuffer ;
readonly int m_VelocityBuffer ;
readonly int m_DistortionBuffer ;
// 'm_CameraColorBuffer' does not contain diffuse lighting of SSS materials until the SSS pass. It is stored within 'm_CameraSssDiffuseLightingBuffer'.
readonly RenderTargetIdentifier m_CameraColorBufferRT ;
readonly RenderTargetIdentifier m_CameraSssDiffuseLightingBufferRT ;
// Old SSS Model >>>
readonly RenderTargetIdentifier m_CameraFilteringBufferRT ;
// <<< Old SSS Model
readonly RenderTargetIdentifier m_VelocityBufferRT ;
readonly RenderTargetIdentifier m_DistortionBufferRT ;
readonly RenderTargetIdentifier m_GaussianPyramidColorBufferRT ;
RenderTexture m_CameraDepthStencilBuffer ;
RenderTexture m_CameraDepthBufferCopy ;
RenderTexture m_CameraStencilBufferCopy ;
RenderTexture m_HTile ; // If the hardware does not expose it, we compute our own, optimized to only contain the SSS bit
RenderTargetIdentifier m_HTileRT ;
static CustomSampler [ ] m_samplers = new CustomSampler [ ( int ) CustomSamplerId . Max ] ;
m_CameraColorBufferRT = new RenderTargetIdentifier ( m_CameraColorBuffer ) ;
m_CameraSssDiffuseLightingBuffer = HDShaderIDs . _CameraSssDiffuseLightingBuffer ;
m_CameraSssDiffuseLightingBufferRT = new RenderTargetIdentifier ( m_CameraSssDiffuseLightingBuffer ) ;
m_CameraFilteringBuffer = HDShaderIDs . _CameraFilteringBuffer ;
m_CameraFilteringBufferRT = new RenderTargetIdentifier ( m_CameraFilteringBuffer ) ;
CreateSssMaterials ( ) ;
m_SSSBufferManager . Build ( asset . renderPipelineResources , asset . sssSettings ) ;
m_CopyStencilForSplitLighting = CoreUtils . CreateEngineMaterial ( "Hidden/HDRenderPipeline/CopyStencilBuffer" ) ;
m_CopyStencilForSplitLighting . SetInt ( HDShaderIDs . _StencilRef , ( int ) StencilLightingUsage . SplitLighting ) ;
m_CopyStencilForNoLighting = CoreUtils . CreateEngineMaterial ( "Hidden/HDRenderPipeline/CopyStencilBuffer" ) ;
// General material
m_CopyStencilForNoLighting = CoreUtils . CreateEngineMaterial ( asset . renderPipelineResources . copyStencilBuffer ) ;
m_CameraMotionVectorsMaterial = CoreUtils . CreateEngineMaterial ( "Hidden/HDRenderPipeline/CameraMotionVectors" ) ;
m_CameraMotionVectorsMaterial = CoreUtils . CreateEngineMaterial ( asset . renderPipelineResources . cameraMotionVectors ) ;
InitializeDebugMaterials ( ) ;
m_ErrorMaterial = CoreUtils . CreateEngineMaterial ( "Hidden/InternalErrorShader" ) ;
}
public void CreateSssMaterials ( )
{
m_SubsurfaceScatteringKernel = m_SubsurfaceScatteringCS . FindKernel ( "SubsurfaceScattering" ) ;
CoreUtils . Destroy ( m_CombineLightingPass ) ;
m_CombineLightingPass = CoreUtils . CreateEngineMaterial ( "Hidden/HDRenderPipeline/CombineLighting" ) ;
// Old SSS Model >>>
CoreUtils . Destroy ( m_SssVerticalFilterPass ) ;
m_SssVerticalFilterPass = CoreUtils . CreateEngineMaterial ( "Hidden/HDRenderPipeline/SubsurfaceScattering" ) ;
m_SssVerticalFilterPass . DisableKeyword ( "SSS_FILTER_HORIZONTAL_AND_COMBINE" ) ;
m_SssVerticalFilterPass . SetFloat ( HDShaderIDs . _DstBlend , ( float ) BlendMode . Zero ) ;
CoreUtils . Destroy ( m_SssHorizontalFilterAndCombinePass ) ;
m_SssHorizontalFilterAndCombinePass = CoreUtils . CreateEngineMaterial ( "Hidden/HDRenderPipeline/SubsurfaceScattering" ) ;
m_SssHorizontalFilterAndCombinePass . EnableKeyword ( "SSS_FILTER_HORIZONTAL_AND_COMBINE" ) ;
m_SssHorizontalFilterAndCombinePass . SetFloat ( HDShaderIDs . _DstBlend , ( float ) BlendMode . One ) ;
// <<< Old SSS Model
}
void InitializeRenderStateBlocks ( )
{
m_DepthStateOpaque = new RenderStateBlock
m_MaterialList . ForEach ( material = > material . Cleanup ( ) ) ;
CoreUtils . Destroy ( m_CopyStencilForNoLighting ) ;
CoreUtils . Destroy ( m_CameraMotionVectorsMaterial ) ;
CoreUtils . Destroy ( m_DebugViewMaterialGBuffer ) ;
CoreUtils . Destroy ( m_DebugViewMaterialGBufferShadowMask ) ;
CoreUtils . Destroy ( m_DebugDisplayLatlong ) ;
m_SSSBufferManager . Cleanup ( ) ;
m_SkyManager . Cleanup ( ) ;
#if UNITY_EDITOR
m_CameraStencilBufferCopy . Create ( ) ;
m_CameraStencilBufferCopyRT = new RenderTargetIdentifier ( m_CameraStencilBufferCopy ) ;
}
if ( NeedHTileCopy ( ) )
{
if ( m_HTile ! = null )
m_HTile . Release ( ) ;
// We use 8x8 tiles in order to match the native GCN HTile as closely as possible.
m_HTile = new RenderTexture ( ( camera . pixelWidth + 7 ) / 8 , ( camera . pixelHeight + 7 ) / 8 , 0 , RenderTextureFormat . R8 , RenderTextureReadWrite . Linear ) ; // DXGI_FORMAT_R8_UINT is not supported by Unity
m_HTile . filterMode = FilterMode . Point ;
m_HTile . enableRandomWrite = true ;
m_HTile . Create ( ) ;
m_HTileRT = new RenderTargetIdentifier ( m_HTile ) ;
}
}
void Resize ( Camera camera )
bool resolutionChanged = camera . pixelWidth ! = m_CurrentWidth | | camera . pixelHeight ! = m_CurrentHeight ;
if ( resolutionChanged | | m_CameraDepthStencilBuffer = = null )
{
m_SSSBufferManager . Resize ( camera ) ;
}
if ( resolutionChanged | | m_LightLoop . NeedResize ( ) )
{
cmd . SetGlobalInt ( HDShaderIDs . _EnvLightSkyEnabled , 0 ) ;
}
// Broadcast SSS parameters to all shaders.
cmd . SetGlobalInt ( HDShaderIDs . _EnableSSSAndTransmission , m_CurrentDebugDisplaySettings . renderingDebugSettings . enableSSSAndTransmission ? 1 : 0 ) ;
cmd . SetGlobalInt ( HDShaderIDs . _UseDisneySSS , sssParameters . useDisneySSS ? 1 : 0 ) ;
unsafe
{
// Warning: Unity is not able to losslessly transfer integers larger than 2^24 to the shader system.
// Therefore, we bitcast uint to float in C#, and bitcast back to uint in the shader.
uint texturingModeFlags = sssParameters . texturingModeFlags ;
uint transmissionFlags = sssParameters . transmissionFlags ;
cmd . SetGlobalFloat ( HDShaderIDs . _TexturingModeFlags , * ( float * ) & texturingModeFlags ) ;
cmd . SetGlobalFloat ( HDShaderIDs . _TransmissionFlags , * ( float * ) & transmissionFlags ) ;
}
cmd . SetGlobalVectorArray ( HDShaderIDs . _ThicknessRemaps , sssParameters . thicknessRemaps ) ;
cmd . SetGlobalVectorArray ( HDShaderIDs . _ShapeParams , sssParameters . shapeParams ) ;
cmd . SetGlobalVectorArray ( HDShaderIDs . _HalfRcpVariancesAndWeights , sssParameters . halfRcpVariancesAndWeights ) ;
cmd . SetGlobalVectorArray ( HDShaderIDs . _TransmissionTints , sssParameters . transmissionTints ) ;
cmd . SetGlobalVectorArray ( HDShaderIDs . _WorldScales , sssParameters . worldScales ) ;
m_SSSBufferManager . PushGlobalParams ( cmd , sssParameters , m_CurrentDebugDisplaySettings ) ;
}
}
// TODO: test/implement for other platforms.
return SystemInfo . graphicsDeviceType ! = GraphicsDeviceType . PlayStation4 ;
return SystemInfo . graphicsDeviceType ! = GraphicsDeviceType . PlayStation4 & &
SystemInfo . graphicsDeviceType ! = GraphicsDeviceType . XboxOne & &
SystemInfo . graphicsDeviceType ! = GraphicsDeviceType . XboxOneD3D12 ;
}
bool NeedStencilBufferCopy ( )
return m_CurrentDebugDisplaySettings . renderingDebugSettings . enableSSSAndTransmission | | m_LightLoop . GetFeatureVariantsEnabled ( ) ;
}
bool NeedHTileCopy ( )
{
// Currently, Unity does not offer a way to access the GCN HTile even on PS4 and Xbox One.
// Therefore, it's computed in a pixel shader, and optimized to only contain the SSS bit.
return m_CurrentDebugDisplaySettings . renderingDebugSettings . enableSSSAndTransmission & & sssSettings . useDisneySSS ;
}
bool NeedTemporarySubsurfaceBuffer ( )
{
// Typed UAV loads from FORMAT_R16G16B16A16_FLOAT is an optional feature of Direct3D 11.
// Most modern GPUs support it. We can avoid performing a costly copy in this case.
// TODO: test/implement for other platforms.
return m_CurrentDebugDisplaySettings . renderingDebugSettings . enableSSSAndTransmission & & ( ! sssSettings . useDisneySSS | | (
SystemInfo . graphicsDeviceType ! = GraphicsDeviceType . PlayStation4 & &
SystemInfo . graphicsDeviceType ! = GraphicsDeviceType . XboxOne & &
SystemInfo . graphicsDeviceType ! = GraphicsDeviceType . XboxOneD3D12 ) ) ;
return m_LightLoop . GetFeatureVariantsEnabled ( ) ;
}
RenderTargetIdentifier GetDepthTexture ( )
RenderTargetIdentifier GetHTile ( )
{
// Currently, Unity does not offer a way to access the GCN HTile.
return m_HTileRT ;
}
void CopyDepthBufferIfNeeded ( CommandBuffer cmd )
{
using ( new ProfilingSample ( cmd , NeedDepthBufferCopy ( ) ? "Copy DepthBuffer" : "Set DepthBuffer" , GetSampler ( CustomSamplerId . CopySetDepthBuffer ) ) )
{
CoreUtils . SetRenderTarget ( cmd , m_CameraStencilBufferCopyRT , ClearFlag . Color , CoreUtils . clearColorAllBlack ) ;
cmd . SetRandomWriteTarget ( 1 , GetHTile ( ) ) ;
// In the material classification shader we will simply test is we are no lighting
// Use ShaderPassID 1 => "Pass 1 - Write 1 if value different from stencilRef to output"
CoreUtils . DrawFullScreen ( cmd , m_CopyStencilForNoLighting , m_CameraStencilBufferCopyRT , m_CameraDepthStencilBufferRT , null , 1 ) ;
RenderForwardError ( m_CullResults , camera , renderContext , cmd , ForwardPass . Opaque ) ;
// SSS pass here handle both SSS material from deferred and forward
SubsurfaceScatteringPass ( hdCamera , cmd , sssSettings ) ;
m_SSSBufferManager . SubsurfaceScatteringPass ( hdCamera , cmd , sssSettings , m_CurrentDebugDisplaySettings ,
m_CameraColorBufferRT , m_CameraSssDiffuseLightingBufferRT , m_CameraDepthStencilBufferRT , GetDepthTexture ( ) ) ;
RenderSky ( hdCamera , cmd ) ;
// Render transparent depth prepass after opaque one
using ( new ProfilingSample ( cmd , "Transparent Depth Prepass" , GetSampler ( CustomSamplerId . TransparentDepthPrepass ) ) )
{
{
RenderTransparentRenderList ( cull , camera , renderContext , cmd , m_TransparentDepthPrePassNames ) ;
}
}
// Currently disabled
return ;
// We need to copy depth buffer texture if we want to bind it at this stage
CopyDepthBufferIfNeeded ( cmd ) ; // THe call will bind HDShaderIDs._MainDepthTexture
cmd . SetGlobalTexture ( HDShaderIDs . _MainDepthTexture , GetDepthTexture ( ) ) ;
DecalSystem . instance . Render ( renderContext , cameraPos , cmd ) ;
}
}
options . outputSplitLighting = false ;
m_LightLoop . RenderDeferredLighting ( hdCamera , cmd , m_CurrentDebugDisplaySettings , m_MRTCache2 , m_CameraDepthStencilBufferRT , depthTexture , options ) ;
}
// Combines specular lighting and diffuse lighting with subsurface scattering.
void SubsurfaceScatteringPass ( HDCamera hdCamera , CommandBuffer cmd , SubsurfaceScatteringSettings sssParameters )
{
if ( ! m_CurrentDebugDisplaySettings . renderingDebugSettings . enableSSSAndTransmission )
return ;
using ( new ProfilingSample ( cmd , "Subsurface Scattering" , GetSampler ( CustomSamplerId . SubsurfaceScattering ) ) )
{
if ( sssSettings . useDisneySSS )
{
using ( new ProfilingSample ( cmd , "HTile for SSS" , GetSampler ( CustomSamplerId . HTileForSSS ) ) )
{
CoreUtils . SetRenderTarget ( cmd , m_HTileRT , ClearFlag . Color , CoreUtils . clearColorAllBlack ) ;
cmd . SetRandomWriteTarget ( 1 , GetHTile ( ) ) ;
// Generate HTile for the split lighting stencil usage. Don't write into stencil texture (shaderPassId = 2)
// Use ShaderPassID 1 => "Pass 2 - Export HTILE for stencilRef to output"
CoreUtils . DrawFullScreen ( cmd , m_CopyStencilForSplitLighting , m_CameraStencilBufferCopyRT , m_CameraDepthStencilBufferRT , null , 2 ) ;
cmd . ClearRandomWriteTargets ( ) ;
}
// TODO: Remove this once fix, see comment inside the function
hdCamera . SetupComputeShader ( m_SubsurfaceScatteringCS , cmd ) ;
unsafe
{
// Warning: Unity is not able to losslessly transfer integers larger than 2^24 to the shader system.
// Therefore, we bitcast uint to float in C#, and bitcast back to uint in the shader.
uint texturingModeFlags = sssParameters . texturingModeFlags ;
cmd . SetComputeFloatParam ( m_SubsurfaceScatteringCS , HDShaderIDs . _TexturingModeFlags , * ( float * ) & texturingModeFlags ) ;
}
cmd . SetComputeVectorArrayParam ( m_SubsurfaceScatteringCS , HDShaderIDs . _WorldScales , sssParameters . worldScales ) ;
cmd . SetComputeVectorArrayParam ( m_SubsurfaceScatteringCS , HDShaderIDs . _FilterKernels , sssParameters . filterKernels ) ;
cmd . SetComputeVectorArrayParam ( m_SubsurfaceScatteringCS , HDShaderIDs . _ShapeParams , sssParameters . shapeParams ) ;
cmd . SetComputeTextureParam ( m_SubsurfaceScatteringCS , m_SubsurfaceScatteringKernel , HDShaderIDs . _DepthTexture , GetDepthTexture ( ) ) ;
cmd . SetComputeTextureParam ( m_SubsurfaceScatteringCS , m_SubsurfaceScatteringKernel , HDShaderIDs . _HTile , GetHTile ( ) ) ;
cmd . SetComputeTextureParam ( m_SubsurfaceScatteringCS , m_SubsurfaceScatteringKernel , HDShaderIDs . _IrradianceSource , m_CameraSssDiffuseLightingBufferRT ) ;
for ( int i = 0 ; i < m_SSSBufferManager . sssBufferCount ; + + i )
{
cmd . SetComputeTextureParam ( m_SubsurfaceScatteringCS , m_SubsurfaceScatteringKernel , HDShaderIDs . _SSSBufferTexture [ i ] , m_SSSBufferManager . GetSSSBuffers ( i ) ) ;
}
if ( NeedTemporarySubsurfaceBuffer ( ) )
{
cmd . SetComputeTextureParam ( m_SubsurfaceScatteringCS , m_SubsurfaceScatteringKernel , HDShaderIDs . _CameraFilteringBuffer , m_CameraFilteringBufferRT ) ;
// Perform the SSS filtering pass which fills 'm_CameraFilteringBufferRT'.
// We dispatch 4x swizzled 16x16 groups per a 32x32 macrotile.
cmd . DispatchCompute ( m_SubsurfaceScatteringCS , m_SubsurfaceScatteringKernel , 4 , ( ( int ) hdCamera . screenSize . x + 3 1 ) / 3 2 , ( ( int ) hdCamera . screenSize . y + 3 1 ) / 3 2 ) ;
cmd . SetGlobalTexture ( HDShaderIDs . _IrradianceSource , m_CameraFilteringBufferRT ) ; // Cannot set a RT on a material
// Additively blend diffuse and specular lighting into 'm_CameraColorBufferRT'.
CoreUtils . DrawFullScreen ( cmd , m_CombineLightingPass , m_CameraColorBufferRT , m_CameraDepthStencilBufferRT ) ;
}
else
{
cmd . SetComputeTextureParam ( m_SubsurfaceScatteringCS , m_SubsurfaceScatteringKernel , HDShaderIDs . _CameraColorTexture , m_CameraColorBufferRT ) ;
// Perform the SSS filtering pass which performs an in-place update of 'm_CameraColorBufferRT'.
// We dispatch 4x swizzled 16x16 groups per a 32x32 macrotile.
cmd . DispatchCompute ( m_SubsurfaceScatteringCS , m_SubsurfaceScatteringKernel , 4 , ( ( int ) hdCamera . screenSize . x + 3 1 ) / 3 2 , ( ( int ) hdCamera . screenSize . y + 3 1 ) / 3 2 ) ;
}
}
else
{
for ( int i = 0 ; i < m_SSSBufferManager . sssBufferCount ; + + i )
{
cmd . SetGlobalTexture ( HDShaderIDs . _SSSBufferTexture [ i ] , m_SSSBufferManager . GetSSSBuffers ( i ) ) ;
}
cmd . SetGlobalTexture ( HDShaderIDs . _IrradianceSource , m_CameraSssDiffuseLightingBufferRT ) ; // Cannot set a RT on a material
m_SssVerticalFilterPass . SetVectorArray ( HDShaderIDs . _FilterKernelsBasic , sssParameters . filterKernelsBasic ) ;
m_SssVerticalFilterPass . SetVectorArray ( HDShaderIDs . _HalfRcpWeightedVariances , sssParameters . halfRcpWeightedVariances ) ;
// Perform the vertical SSS filtering pass which fills 'm_CameraFilteringBufferRT'.
CoreUtils . DrawFullScreen ( cmd , m_SssVerticalFilterPass , m_CameraFilteringBufferRT , m_CameraDepthStencilBufferRT ) ;
cmd . SetGlobalTexture ( HDShaderIDs . _IrradianceSource , m_CameraFilteringBufferRT ) ; // Cannot set a RT on a material
m_SssHorizontalFilterAndCombinePass . SetVectorArray ( HDShaderIDs . _FilterKernelsBasic , sssParameters . filterKernelsBasic ) ;
m_SssHorizontalFilterAndCombinePass . SetVectorArray ( HDShaderIDs . _HalfRcpWeightedVariances , sssParameters . halfRcpWeightedVariances ) ;
// Perform the horizontal SSS filtering pass, and combine diffuse and specular lighting into 'm_CameraColorBufferRT'.
CoreUtils . DrawFullScreen ( cmd , m_SssHorizontalFilterAndCombinePass , m_CameraColorBufferRT , m_CameraDepthStencilBufferRT ) ;
}
}
}
void UpdateSkyEnvironment ( HDCamera hdCamera , CommandBuffer cmd )
}
}
void InitAndClearBuffer ( HDCamera c amera, bool enableBakeShadowMask , CommandBuffer cmd )
void InitAndClearBuffer ( HDCamera hdC amera, bool enableBakeShadowMask , CommandBuffer cmd )
{
using ( new ProfilingSample ( cmd , "InitAndClearBuffer" , GetSampler ( CustomSamplerId . InitAndClearBuffer ) ) )
{
// Also we manage ourself the HDR format, here allocating fp16 directly.
// With scriptable render loop we can allocate temporary RT in a command buffer, they will not be release with ExecuteCommandBuffer
// These temporary surface are release automatically at the end of the scriptable render pipeline if not release explicitly
int w = camera . camera . pixelWidth ;
int h = camera . camera . pixelHeight ;
int w = hdCamera . camera . pixelWidth ;
int h = hdCamera . camera . pixelHeight ;
if ( NeedTemporarySubsurfaceBuffer ( ) )
{
cmd . GetTemporaryRT ( m_CameraFilteringBuffer , w , h , 0 , FilterMode . Point , RenderTextureFormat . RGB111110Float , RenderTextureReadWrite . Linear , 1 , true ) ; // Enable UAV
}
// Color and depth pyramids
int s = CalculatePyramidSize ( w , h ) ;
cmd . GetTemporaryRT ( m_DepthPyramidBuffer , m_DepthPyramidBufferDesc , FilterMode . Trilinear ) ;
// End
if ( ! c amera. useForwardOnly )
if ( ! hdC amera. useForwardOnly )
m_SSSBufferManager . InitGBuffers ( w , h , m_GbufferManager , cmd ) ;
m_SSSBufferManager . InitSSSBuffersFrom GBuffer ( w , h , m_GbufferManager , cmd ) ;
m_SSSBufferManager . InitG Buffers ( w , h , cmd ) ;
m_SSSBufferManager . InitSSS Buffers ( w , h , cmd ) ;
}
m_DbufferManager . InitDBuffers ( w , h , cmd ) ;
CoreUtils . SetRenderTarget ( cmd , m_CameraSssDiffuseLightingBufferRT , ClearFlag . Color , CoreUtils . clearColorAllBlack ) ;
}
// Old SSS Model >>>
if ( NeedTemporarySubsurfaceBuffer ( ) )
{
// Clear the SSS filtering target
using ( new ProfilingSample ( cmd , "Clear SSS filtering target" , GetSampler ( CustomSamplerId . ClearSSSFilteringTarget ) ) )
{
CoreUtils . SetRenderTarget ( cmd , m_CameraFilteringBuffer , ClearFlag . Color , CoreUtils . clearColorAllBlack ) ;
}
}
// <<< Old SSS Model
Color clearColor = camera . camera . backgroundColor . linear ; // Need it in linear because we clear a linear fp16 texture.
Color clearColor = hdCamera . camera . backgroundColor . linear ; // Need it in linear because we clear a linear fp16 texture.
if ( ! camera . useForwardOnly )
if ( ! hdCamera . useForwardOnly )
{
using ( new ProfilingSample ( cmd , "Clear GBuffer" , GetSampler ( CustomSamplerId . ClearGBuffer ) ) )
{