Provides mechanisms for renderer components to validate their input resources and define their output resources.
Beispiel #1
0
        public override void Initialise(Renderer renderer, ResourceContext context)
        {            
            // define outputs
            context.DefineOutput(_name, true, null, _targetInfo);

            base.Initialise(renderer, context);
        }
Beispiel #2
0
        public override void Initialise(Renderer renderer, ResourceContext context)
        {
            // define input
            context.DefineInput("scene");

            // define output
            context.DefineOutput("scene");

            base.Initialise(renderer, context);
        }
Beispiel #3
0
        public override void Initialise(Renderer renderer, ResourceContext context)
        {
            foreach (var resource in context.SetRenderTargets)
            {
                context.DefineInput(resource.Name);
                context.DefineOutput(resource);
            }

            renderables = renderer.Scene.FindManagers<IRenderable>();
            base.Initialise(renderer, context);
        }
Beispiel #4
0
            //protected override void SpecifyResources(IList<Input> inputs, IList<RendererComponent.Resource> outputs, out RenderTargetInfo? outputTarget)
            //{
            //    inputs.Add(new Input() { Name = "gbuffer_depth" });
            //    inputs.Add(new Input() { Name = "gbuffer_depth_downsample" });
            //    inputs.Add(new Input() { Name = "gbuffer_normals" });
            //    inputs.Add(new Input() { Name = "gbuffer_diffuse" });
            //    outputs.Add(new Resource() { Name = "scene", IsLeftSet = true });
            //    outputTarget = new RenderTargetInfo();
            //}
            //protected override bool ValidateInput(RenderTargetInfo? previousRenderTarget)
            //{
            //    return true;
            //}
            public override void Initialise(Renderer renderer, ResourceContext context)
            {
                // define inputs
                context.DefineInput("gbuffer_depth");
                context.DefineInput("gbuffer_depth_downsample");
                context.DefineInput("gbuffer_normals");
                context.DefineInput("gbuffer_diffuse");

                // define outputs
                context.DefineOutput("scene");

                base.Initialise(renderer, context);
            }
Beispiel #5
0
            //protected override void SpecifyResources(IList<Input> inputs, IList<RendererComponent.Resource> outputs, out RenderTargetInfo? outputTarget)
            //{
            //    inputs.Add(new Input() { Name = "tonemapped" });
            //    inputs.Add(new Input() { Name = "luminancemap" });
            //    outputs.Add(new Resource() { Name = "scene", IsLeftSet = true });
            //    outputTarget = new RenderTargetInfo() { SurfaceFormat = SurfaceFormat.Rgba64, DepthFormat = DepthFormat.Depth24Stencil8 };
            //}
            //protected override bool ValidateInput(RenderTargetInfo? previousRenderTarget)
            //{
            //    return true;
            //}
            public override void Initialise(Renderer renderer, ResourceContext context)
            {
                // define inputs
                context.DefineInput("tonemapped");
                //context.DefineInput("luminancemap");

                // define outputs
                context.DefineOutput("scene", surfaceFormat: SurfaceFormat.Rgba64, depthFormat: DepthFormat.Depth24Stencil8);

                base.Initialise(renderer, context);
            }
Beispiel #6
0
 /// <summary>
 /// Initialised this renderer component.
 /// </summary>
 /// <remarks>
 /// Here, components may validate that required inputs are available, and
 /// define their output.
 /// </remarks>
 /// <param name="renderer">The renderer.</param>
 /// <param name="context">The resource context containing environment information and providing means to define inputs and outputs.</param>
 public virtual void Initialise(Renderer renderer, ResourceContext context)
 {
     Initialised = true;
 }
Beispiel #7
0
 /// <summary>
 /// Initialised this renderer component.
 /// </summary>
 /// <remarks>
 /// Here, components may validate that required inputs are available, and
 /// define their output.
 /// </remarks>
 /// <param name="renderer">The renderer.</param>
 /// <param name="context">The resource context containing environment information and providing means to define inputs and outputs.</param>
 public virtual void Initialise(Renderer renderer, ResourceContext context)
 {
     Initialised = true;
 }