@ -173,7 +173,7 @@ namespace FidelityFX
// - How do we clear the resources that need to be cleared at dispatch? (SetBufferData)
// - Shouldn't we use a ComputeBuffer for resources that are one-dimensional and clearly not image data? e.g. SPD atomic counter & Lanczos LUT data
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvInputColor , dispatchParams . Color , 0 , RenderTextureSubElement . Color ) ;
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvInputColor , dispatchParams . ColorDepth , 0 , RenderTextureSubElement . Color ) ;
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , UavAutoExposure , _autoExposure ) ;
commandBuffer . SetComputeConstantBufferParam ( ComputeShader , CbFsr2 , Constants , 0 , Marshal . SizeOf < Fsr2 . Fsr2Constants > ( ) ) ;
commandBuffer . SetComputeConstantBufferParam ( ComputeShader , CbSpd , _spdConstants , 0 , Marshal . SizeOf < Fsr2 . SpdConstants > ( ) ) ;
@ -196,8 +196,8 @@ namespace FidelityFX
public override void ScheduleDispatch ( CommandBuffer commandBuffer , Fsr2 . DispatchDescription dispatchParams , int frameIndex , int dispatchX , int dispatchY )
{
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvInputColor , dispatchParams . Color , 0 , RenderTextureSubElement . Color ) ;
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvInputDepth , dispatchParams . Depth , 0 , RenderTextureSubElement . Depth ) ;
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvInputColor , dispatchParams . ColorDepth , 0 , RenderTextureSubElement . Color ) ;
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvInputDepth , dispatchParams . Color Depth, 0 , RenderTextureSubElement . Depth ) ;
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvInputMotionVectors , dispatchParams . MotionVectors ) ;
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvInputExposure , dispatchParams . Exposure ) ;
@ -228,8 +228,8 @@ namespace FidelityFX
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvTransparencyAndCompositionMask , dispatchParams . Reactive ) ; // Default reactive mask, as we don't support TCR (yet)
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvPrevDilatedMotionVectors , _dilatedMotionVectors [ frameIndex ^ 1 ] ) ;
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvInputMotionVectors , dispatchParams . MotionVectors ) ;
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvInputColor , dispatchParams . Color , 0 , RenderTextureSubElement . Color ) ;
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvInputDepth , dispatchParams . Depth , 0 , RenderTextureSubElement . Depth ) ;
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvInputColor , dispatchParams . ColorDepth , 0 , RenderTextureSubElement . Color ) ;
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvInputDepth , dispatchParams . Color Depth, 0 , RenderTextureSubElement . Depth ) ;
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvInputExposure , dispatchParams . Exposure ) ;
commandBuffer . SetComputeConstantBufferParam ( ComputeShader , CbFsr2 , Constants , 0 , Marshal . SizeOf < Fsr2 . Fsr2Constants > ( ) ) ;
@ -318,7 +318,7 @@ namespace FidelityFX
{
// Run the RCAS sharpening filter on the upscaled image
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvInputExposure , dispatchParams . Exposure ) ;
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvRcasInput , dispatchParams . Color , 0 , RenderTextureSubElement . Color ) ; // TODO: should be output from accumulate pass
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , SrvRcasInput , dispatchParams . ColorDepth , 0 , RenderTextureSubElement . Color ) ; // TODO: should be output from accumulate pass
commandBuffer . SetComputeTextureParam ( ComputeShader , KernelIndex , UavUpscaledOutput , dispatchParams . Output ) ;
commandBuffer . SetComputeConstantBufferParam ( ComputeShader , CbFsr2 , Constants , 0 , Marshal . SizeOf < Fsr2 . Fsr2Constants > ( ) ) ;
commandBuffer . SetComputeConstantBufferParam ( ComputeShader , CbRcas , _rcasConstants , 0 , Marshal . SizeOf < Fsr2 . RcasConstants > ( ) ) ;