Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

paul-hansen/bevy_mod_film_grain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bevy Film Grain Shader

A film grain post process shader implementation for the Bevy game engine. 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

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

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

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •