示例#1
0
 static void Register(CustomPassVolume volume) => m_ActivePassVolumes.Add(volume);
示例#2
0
 static void UnRegister(CustomPassVolume volume) => m_ActivePassVolumes.Remove(volume);
示例#3
0
        internal void ExecuteInternal(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResult, SharedRTManager rtManager, RenderTargets targets, CustomPassVolume owner)
        {
            this.owner               = owner;
            this.currentRTManager    = rtManager;
            this.currentRenderTarget = targets;
            this.currentHDCamera     = hdCamera;

            if (!isSetup)
            {
                Setup(renderContext, cmd);
                isSetup = true;
            }

            SetCustomPassTarget(cmd, targets);

            isExecuting = true;
            Execute(renderContext, cmd, hdCamera, cullingResult);
            isExecuting = false;

            // Set back the camera color buffer is we were using a custom buffer as target
            if (targetDepthBuffer != TargetBuffer.Camera)
            {
                CoreUtils.SetRenderTarget(cmd, targets.cameraColorBuffer);
            }
        }