示例#1
0
        public TemporalFilterResources PrepareTemporalFilterResources(HDCamera hdCamera, RTHandle validationBuffer, RTHandle noisyBuffer, RTHandle historyBuffer, RTHandle outputBuffer)
        {
            TemporalFilterResources tfResources = new TemporalFilterResources();

            tfResources.depthStencilBuffer   = m_SharedRTManager.GetDepthStencilBuffer();
            tfResources.normalBuffer         = m_SharedRTManager.GetNormalBuffer();
            tfResources.velocityBuffer       = TextureXR.GetBlackTexture();
            tfResources.historyDepthTexture  = hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.Depth);
            tfResources.historyNormalTexture = hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.Normal);
            tfResources.noisyBuffer          = noisyBuffer;
            if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.MotionVectors))
            {
                tfResources.motionVectorBuffer = m_SharedRTManager.GetMotionVectorsBuffer();
            }
            else
            {
                tfResources.motionVectorBuffer = TextureXR.GetBlackTexture();
            }

            // Temporary buffers
            tfResources.validationBuffer = validationBuffer;

            // Output buffers
            tfResources.historyBuffer = historyBuffer;
            tfResources.outputBuffer  = outputBuffer;

            return(tfResources);
        }
        internal ReflectionDenoiserResources PrepareReflectionDenoiserResources(HDCamera hdCamera,
                                                                                RTHandle noisyToOutputSignal, RTHandle historySignal,
                                                                                RTHandle intermediateBuffer0, RTHandle intermediateBuffer1)
        {
            ReflectionDenoiserResources reflDenoiserResources = new ReflectionDenoiserResources();

            reflDenoiserResources.historySignal       = historySignal;
            reflDenoiserResources.noisyToOutputSignal = noisyToOutputSignal;
            reflDenoiserResources.intermediateBuffer0 = intermediateBuffer0;
            reflDenoiserResources.intermediateBuffer1 = intermediateBuffer1;
            reflDenoiserResources.depthBuffer         = m_SharedRTManager.GetDepthStencilBuffer();
            reflDenoiserResources.normalBuffer        = m_SharedRTManager.GetNormalBuffer();
            reflDenoiserResources.motionVectorBuffer  = m_SharedRTManager.GetMotionVectorsBuffer();
            return(reflDenoiserResources);
        }
示例#3
0
        SSGIDenoiserResources PrepareSSGIDenoiserResources(RTHandle historyDepthBuffer, RTHandle indirectDiffuseHistory, RTHandle inputOutputBuffer, RTHandle intermediateBuffer)
        {
            SSGIDenoiserResources resources = new SSGIDenoiserResources();

            // Input Buffers
            resources.depthTexture        = m_SharedRTManager.GetDepthTexture();
            resources.normalBuffer        = m_SharedRTManager.GetNormalBuffer();
            resources.motionVectorsBuffer = m_SharedRTManager.GetMotionVectorsBuffer();

            // History Buffer
            resources.indirectDiffuseHistory = indirectDiffuseHistory;
            resources.historyDepthBuffer     = historyDepthBuffer;

            // Intermediate buffer
            resources.intermediateBuffer = intermediateBuffer;

            // In-output Buffer
            resources.inputOutputBuffer = inputOutputBuffer;

            return(resources);
        }