Skip to content

Crash if Msaa is disabled/enabled after adding the plugin #15

@mbrea-c

Description

@mbrea-c

Reproduction

Change the main function in the pbr example to:

    let mut app = App::new();
    app.add_plugins(DefaultPlugins);
    app.add_plugins(ParticleSystemPlugin)
        .add_systems(Startup, setup);
    app.insert_resource(Msaa::Off);
    app.run();

Expected

The example runs normally, but with Msaa disabled.

Actual result

The example crashes

Reasoning

Currently we setup the texture bindings that the plugin uses at plugin build time, but those bindings are dependent on whether Msaa is enabled or not. They need to be recreated whenever the Msaa resource changes.
This is the reason for the third crash in #11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions