Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paul-hansen/bevy_mod_film_grain
https://github.com/paul-hansen/bevy_mod_film_grain
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/paul-hansen/bevy_mod_film_grain
- Owner: paul-hansen
- Created: 2024-07-06T00:22:29.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-11T20:09:22.000Z (5 months ago)
- Last Synced: 2024-12-06T17:48:00.242Z (17 days ago)
- Language: Rust
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bevy Film Grain Shader
A film grain post process shader implementation for the [Bevy game engine](https://bevyengine.org).
It can be used with a single camera or multiple.
It's tested to work on desktop and the web with WebGL 2.
WebGPU on the web should work but I haven't tested it yet.![image](https://github.com/paul-hansen/bevy_mod_film_grain/assets/7019130/9c232a48-e914-43f8-bb2f-f8da8bbd6025)
Expect changes in the future as there are missing features such as changing the size of the noise and animating the noise over time.
## Minimal Example
```rust
use bevy::prelude::*;
use bevy_mod_film_grain::{FilmGrainPlugin, FilmGrainSettings};
fn main() {
App::new()
.add_plugins((DefaultPlugins, FilmGrainPlugin))
.add_systems(Startup, setup)
.run();
}fn setup(mut commands: Commands) {
commands.spawn((
Camera3dBundle::default(),
// Adding this component enables the effect for this camera only.
FilmGrainSettings::from_strength(0.2),
));
}
```## HDR
If your camera has hdr enabled, you will need to enable the hdr feature on this crate. Eventually I'll figure out specialization so this isn't needed.
## License
Licensed under either of
* [Apache License, Version 2.0]()
* [MIT license]()at your option.
## Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.