Beispiel #1
0
        internal bool Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResult, SharedRTManager rtManager, CustomPass.RenderTargets targets)
        {
            bool executed = false;

            // We never execute volume if the layer is not within the culling layers of the camera
            if ((hdCamera.volumeLayerMask & (1 << gameObject.layer)) == 0)
            {
                return(false);
            }

            Shader.SetGlobalFloat(HDShaderIDs._CustomPassInjectionPoint, (float)injectionPoint);

            foreach (var pass in customPasses)
            {
                if (pass != null && pass.WillBeExecuted(hdCamera))
                {
                    pass.ExecuteInternal(renderContext, cmd, hdCamera, cullingResult, rtManager, targets, this);
                    executed = true;
                }
            }

            return(executed);
        }
Beispiel #2
0
        internal void Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResult, CustomPass.RenderTargets targets)
        {
            Shader.SetGlobalFloat(HDShaderIDs._CustomPassInjectionPoint, (float)injectionPoint);

            foreach (var pass in customPasses)
            {
                if (pass != null && pass.enabled)
                {
                    using (new ProfilingSample(cmd, pass.name))
                        pass.ExecuteInternal(renderContext, cmd, hdCamera, cullingResult, targets);
                }
            }
        }
        internal bool Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResult, CustomPass.RenderTargets targets)
        {
            bool executed = false;

            Shader.SetGlobalFloat(HDShaderIDs._CustomPassInjectionPoint, (float)injectionPoint);

            foreach (var pass in customPasses)
            {
                if (pass != null && pass.enabled)
                {
                    using (new ProfilingSample(cmd, pass.name))
                    {
                        pass.ExecuteInternal(renderContext, cmd, hdCamera, cullingResult, targets, fadeValue);
                        executed = true;
                    }
                }
            }

            return(executed);
        }
Beispiel #4
0
        internal bool Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResult, SharedRTManager rtManager, CustomPass.RenderTargets targets)
        {
            bool executed = false;

            if (!IsVisible(hdCamera))
            {
                return(false);
            }

            Shader.SetGlobalFloat(HDShaderIDs._CustomPassInjectionPoint, (float)injectionPoint);
            if (injectionPoint == CustomPassInjectionPoint.AfterPostProcess)
            {
                Shader.SetGlobalTexture(HDShaderIDs._AfterPostProcessColorBuffer, targets.cameraColorBuffer);
            }

            foreach (var pass in customPasses)
            {
                if (pass != null && pass.WillBeExecuted(hdCamera))
                {
                    pass.ExecuteInternal(renderContext, cmd, hdCamera, cullingResult, rtManager, targets, this);
                    executed = true;
                }
            }

            return(executed);
        }