How to manipulate the rendergraph in Bevy
Asked Answered
C

1

7

I would like to be able to get the previously rendered frame and use that as a sampler in the current frame. There is a good set of example code in the Bevy repository to show me how to apply custom shaders as materials to a mesh. But I would like to do something more along the lines of post-processing effects where either the previous frame is used in the current frame or the previous frame is copied to a texture to be used in the current frame.

Concha answered 24/11, 2020 at 3:32 Comment(0)
F
0

There is now an official example that details how to do this.

It uses the render graph to run the post-processing shader on the same frame as the 3d scene, which means you dont need to be a frame late or set up multiple cameras.

Note: this example uses bevy 0.11 which hasn't yet been released, until then you can use 0.11 by pointing to the repo:

# Cargo.toml

[dependencies]
bevy = {git= "https://github.com/bevyengine/bevy.git"}

Ferromanganese answered 11/6, 2023 at 10:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.