Skip to content
Discussion options

You must be logged in to vote

Yes, it should be possible.

In the example there's the post_processing_pass_layer component that is used to mark the Camera2dBundle and MaterialMesh2dBundle.

If you want to apply a different effect, you'll need different materials (just another type different than PostprocessingMaterial in the example, that derives AsBindGroup and implements Material2d, pointing to the correct shader).

You'll also need multiple entities with different MaterialMesh2dBundles, one for each material (one material per effect).

When it's time to apply a different effect, despawn the entity with the the MaterialMesh2dBundle that is currently applied, and spawn a new entity with the new material for the new effec…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@superdump
Comment options

@wilk10
Comment options

@Pietrek14
Comment options

Answer selected by Pietrek14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants