pub trait ViewNode {
    type ViewQuery: ReadOnlyWorldQueryData;

    // Required method
    fn run(
        &self,
        graph: &mut RenderGraphContext<'_>,
        render_context: &mut RenderContext,
        view_query: <Self::ViewQuery as WorldQuery>::Item<'_>,
        world: &World
    ) -> Result<(), NodeRunError>;

    // Provided method
    fn update(&mut self, _world: &mut World) { ... }
}
Expand description

This trait should be used instead of the Node trait when making a render node that runs on a view.

It is intended to be used with ViewNodeRunner

Required Associated Types§

type ViewQuery: ReadOnlyWorldQueryData

The query that will be used on the view entity. It is guaranteed to run on the view entity, so there’s no need for a filter

Required Methods§

fn run( &self, graph: &mut RenderGraphContext<'_>, render_context: &mut RenderContext, view_query: <Self::ViewQuery as WorldQuery>::Item<'_>, world: &World ) -> Result<(), NodeRunError>

Runs the graph node logic, issues draw calls, updates the output slots and optionally queues up subgraphs for execution. The graph data, input and output values are passed via the RenderGraphContext.

Provided Methods§

fn update(&mut self, _world: &mut World)

Updates internal node state using the current render World prior to the run method.

Implementors§

§

impl ViewNode for MainOpaquePass3dNode

§

type ViewQuery = (&'static ExtractedCamera, &'static RenderPhase<Opaque3d>, &'static RenderPhase<AlphaMask3d>, &'static Camera3d, &'static ViewTarget, &'static ViewDepthTexture, Option<&'static DepthPrepass>, Option<&'static NormalPrepass>, Option<&'static MotionVectorPrepass>, Option<&'static DeferredPrepass>, Option<&'static SkyboxPipelineId>, Option<&'static SkyboxBindGroup>, &'static ViewUniformOffset)

§

impl ViewNode for MainTransparentPass3dNode

§

type ViewQuery = (&'static ExtractedCamera, &'static RenderPhase<Transparent3d>, &'static ViewTarget, &'static ViewDepthTexture)

§

impl ViewNode for CopyDeferredLightingIdNode

§

impl ViewNode for DeferredGBufferPrepassNode

§

impl ViewNode for TemporalAntiAliasNode

§

type ViewQuery = (&'static ExtractedCamera, &'static ViewTarget, &'static TemporalAntiAliasHistoryTextures, &'static ViewPrepassTextures, &'static TemporalAntiAliasPipelineId)

§

impl ViewNode for FxaaNode

§

type ViewQuery = (&'static ViewTarget, &'static CameraFxaaPipeline, &'static Fxaa)

§

impl ViewNode for PrepassNode

§

impl ViewNode for TonemappingNode

§

type ViewQuery = (&'static ViewUniformOffset, &'static ViewTarget, &'static ViewTonemappingPipeline, &'static Tonemapping)

§

impl ViewNode for UpscalingNode

§

type ViewQuery = (&'static ViewTarget, &'static ViewUpscalingPipeline, Option<&'static ExtractedCamera>)

§

impl ViewNode for DeferredOpaquePass3dPbrLightingNode