Trait ViewNode

Source
pub trait ViewNode {
    type ViewQuery: ReadOnlyQueryData;

    // Required method
    fn run<'w>(
        &self,
        graph: &mut RenderGraphContext<'_>,
        render_context: &mut RenderContext<'w>,
        view_query: <Self::ViewQuery as WorldQuery>::Item<'w>,
        world: &'w 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§

Source

type ViewQuery: ReadOnlyQueryData

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§

Source

fn run<'w>( &self, graph: &mut RenderGraphContext<'_>, render_context: &mut RenderContext<'w>, view_query: <Self::ViewQuery as WorldQuery>::Item<'w>, world: &'w 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§

Source

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

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

Implementors§

Source§

impl ViewNode for MainOpaquePass2dNode

Source§

type ViewQuery = (&'static ExtractedCamera, &'static ViewTarget, &'static ViewDepthTexture)

Source§

impl ViewNode for MainTransparentPass2dNode

Source§

type ViewQuery = (&'static ExtractedCamera, &'static ViewTarget, &'static ViewDepthTexture)

Source§

impl ViewNode for MainOpaquePass3dNode

Source§

type ViewQuery = (Entity, &'static ExtractedCamera, &'static ViewTarget, &'static ViewDepthTexture, Option<&'static SkyboxPipelineId>, Option<&'static SkyboxBindGroup>, &'static ViewUniformOffset)

Source§

impl ViewNode for MainTransparentPass3dNode

Source§

type ViewQuery = (&'static ExtractedCamera, &'static ViewTarget, &'static ViewDepthTexture)

Source§

impl ViewNode for CopyDeferredLightingIdNode

Source§

impl ViewNode for DeferredGBufferPrepassNode

Source§

impl ViewNode for DepthOfFieldNode

Source§

impl ViewNode for TemporalAntiAliasNode

Source§

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

Source§

impl ViewNode for FxaaNode

Source§

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

Source§

impl ViewNode for MotionBlurNode

Source§

type ViewQuery = (&'static ViewTarget, &'static MotionBlurPipelineId, &'static ViewPrepassTextures, &'static MotionBlur, &'static Msaa)

Source§

impl ViewNode for MsaaWritebackNode

Source§

type ViewQuery = (&'static ViewTarget, &'static MsaaWritebackBlitPipeline, &'static Msaa)

Source§

impl ViewNode for OitResolveNode

Source§

impl ViewNode for PostProcessingNode

Source§

impl ViewNode for PrepassNode

Source§

type ViewQuery = (Entity, &'static ExtractedCamera, &'static ViewDepthTexture, &'static ViewPrepassTextures, &'static ViewUniformOffset, Option<&'static DeferredPrepass>, Option<&'static RenderSkyboxPrepassPipeline>, Option<&'static SkyboxPrepassBindGroup>, Option<&'static PreviousViewUniformOffset>)

Source§

impl ViewNode for SmaaNode

Source§

type ViewQuery = (&'static ViewTarget, &'static ViewSmaaPipelines, &'static SmaaInfoUniformOffset, &'static SmaaTextures, &'static SmaaBindGroups)

Source§

impl ViewNode for TonemappingNode

Source§

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

Source§

impl ViewNode for UpscalingNode

Source§

impl ViewNode for DeferredOpaquePass3dPbrLightingNode

Source§

impl ViewNode for ScreenSpaceReflectionsNode