Ejemplo n.º 1
0
        public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData)
        {
            if (scanLineMat == null)
            {
                UnityEngine.Debug.LogError("材质没找到!");
                return;
            }
            if (!renderingData.cameraData.postProcessEnabled)
            {
                return;
            }
            //通过队列来找到HologramBlock组件,然后
            var stack = VolumeManager.instance.stack;

            scanLine = stack.GetComponent <ScanLine>();
            if (scanLine == null)
            {
                return;
            }
            if (!scanLine.IsActive())
            {
                return;
            }

            var cmd = CommandBufferPool.Get(k_RenderTag);

            Render(cmd, ref renderingData);
            context.ExecuteCommandBuffer(cmd);
            CommandBufferPool.Release(cmd);
        }