StartPlan() public method

public StartPlan ( ) : RenderPlan
return RenderPlan
Beispiel #1
0
        protected override void BeginTransitionOn()
        {
            _scene = _kernel.Get<TestScene>();

            _renderer = _scene.Scene.GetService<Renderer>();

            _fullPlan = _renderer.StartPlan()
                               .Then<GeometryBufferComponent>()
                               .Then<EdgeDetectComponent>()
                               .Then<Ssao>()
                               .Then<LightingComponent>()
                               .Then<RestoreDepthPhase>()
                               .Then<TranslucentComponent>()
                               .Then<ToneMapComponent>()
                               .Then<AntiAliasComponent>()
                               .Show("antialiased");

            _noAaPlan = _renderer.StartPlan()
                               .Then<GeometryBufferComponent>()
                               .Then<EdgeDetectComponent>()
                               .Then<Ssao>()
                               .Then<LightingComponent>()
                               .Then<RestoreDepthPhase>()
                               .Then<TranslucentComponent>()
                               .Then<ToneMapComponent>()
                               .Show("tonemapped");

            base.OnShown();
        }
Beispiel #2
0
        protected override void BeginTransitionOn()
        {
            _scene = new TestScene(_kernel, _kernel.Get<Game>(), _kernel.Get<ContentManager>(), _kernel.Get<GraphicsDevice>(), new TestScene.SceneConfiguration()
            {
                View = false
            });

            _renderer = _scene.Scene.GetService<Renderer>();
            _renderer.StartPlan()
                    .Then<GeometryBufferComponent>()
                    .Then<EdgeDetectComponent>()
                    .Then<Ssao>()
                    .Then<LightingComponent>()
                    .Then<RestoreDepthPhase>()
                    .Then<TranslucentComponent>()
                    .Then<ToneMapComponent>()
                    .Then<AntiAliasComponent>()
                    .Apply();

            var w = _renderer.Device.Viewport.Width / 2;
            var h = _renderer.Device.Viewport.Height / 2;
            AddCamera("gbuffer_depth", new Viewport { X = 0, Y = 0, Width = w, Height = h });
            AddCamera("gbuffer_normals", new Viewport { X = w, Y = 0, Width = w, Height = h });
            AddCamera("gbuffer_diffuse", new Viewport { X = 0, Y = h, Width = w, Height = h });
            AddCamera("lightbuffer", new Viewport { X = w, Y = h, Width = w, Height = h });

            base.OnShown();
        }