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.
Asked
Active
Viewed 554 times
1 Answers
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"}

chantey
- 4,252
- 1
- 35
- 40