Ejemplo n.º 1
0
        public void DispatchToRenderStage(IColourEffectsStageModel stage, CommandList cl, RenderCommandQueueItem command)
        {
            var surface = _surfaceManager.RetrieveSurface(command.Surface, new GpuSurfaceType[] { GpuSurfaceType.Texture, GpuSurfaceType.Internal });
            var source  = _surfaceManager.RetrieveSurface(command.Texture0, new GpuSurfaceType[] { GpuSurfaceType.SwapChainOutput, GpuSurfaceType.Internal });

            _colourEffectStageRenderer.Render(cl, stage, surface, source);
        }
Ejemplo n.º 2
0
        public void Render(CommandList cl, IColourEffectsStageModel stage, GpuSurface surface, GpuSurface source)
        {
            if (cl == null || stage == null || source == null || surface == null)
            {
                _frameworkMessenger.Report("Warning: you are feeding the Colour Effect Stage Renderer null inputs, aborting");
                return;
            }

            cl.SetPipeline(_pipeline);
            cl.SetFramebuffer(surface.Framebuffer);
            _viewportManager.ConfigureViewportForActiveFramebuffer(cl);
            if (stage.ClearBackgroundBeforeRender)
            {
                cl.ClearColorTarget(0, stage.ClearColour);
            }
            cl.SetVertexBuffer(0, _ndcQuadVertexBuffer.Buffer);
            cl.SetGraphicsResourceSet(0, stage.FactorsResourceSet);
            cl.SetGraphicsResourceSet(1, source.ResourceSet_TexWrap);
            cl.Draw(6);
        }
Ejemplo n.º 3
0
 public void CacheStageModel(IColourEffectsStageModel model) => CachedColourEffectModel       = model;