Skip to content

FullscreenMaterial API Changes example is incorrect in migration guide 0.18 -> 0.19 #2531

Description

@DavidHospital

Describe the issue

The FullscreenMaterial API Changes example lists trait functions run_in, run_after, and run_before, which do no appear in the bevy@0.18 FullscreenMaterial trait:

// 0.18
impl FullscreenMaterial for FullscreenEffect {
    fn fragment_shader() -> ShaderRef {
        "shaders/fullscreen_effect.wgsl".into()
    }
    fn run_in() -> impl SystemSet {
        Core3dSystems::PostProcess
    }
    fn run_after() -> Option<Core3dSystems> {
        None
    }
    fn run_before() -> Option<Core3dSystems> {
        None
    }
}

I am not entirely sure where these functions came from, as this feature was first implemented in 0.18, and neither the 0.18 or 0.19 docs reference these functions anywhere, to my knowledge.

Proposed Solution

Replace the 0.18 section of the example with something like:

// 0.18
impl FullscreenMaterial for FullscreenEffect {
    fn fragment_shader() -> ShaderRef {
        "shaders/fullscreen_effect.wgsl".into()
    }
    fn node_edges() -> Vec<InternedRenderLabel> {
        vec![
            Node3d::Tonemapping.intern(),
            Self::node_label().intern(),
            Node3d::EndMainPassPostProcessing.intern(),
        ]
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions