#bevy #bevy-toon #bevy-shader

bevy_simpletoon

A super simple post processing toon shader

5 releases

Uses new Rust 2024

new 0.1.4 Apr 20, 2025
0.1.3 Apr 19, 2025
0.1.2 Apr 19, 2025
0.1.1 Apr 19, 2025
0.1.0 Apr 19, 2025

#480 in Game dev

Download history

165 downloads per month

MIT/Apache

38KB
353 lines

bevy_simpletoon

Latest version

WARNING

This is still in development and is VERY early days. I've decided to use it myself to make a game and will be updating it as I build out the game.

Usage


    fn main() {
        // add the SimpletoonPlugin to your app.
        // note that DefaultPlugin is not required.
        App::new()
            .add_plugins((
                DefaultPlugins,
                SimpletoonPlugin,
        )).run();
    }
    // add SimpletoonSettings to your camera
    // note that Msaa *must* be Off, as it is not currently compatible with post processing
    fn setup_camera(mut commands: Commands) {
        commands.spawn((
            Camera3d::default(),
            SimpletoonSettings::default(),  // These settings can be updated any time to change the shader's effect
            Msaa::Off,
            // Depth and normal prepass and both currently required by the shader.
            DepthPrepass,
            NormalPrepass,
            //Fxaa::default()   // Fxaa is not required, though the shader comes with no built-in anti-aliasing.
        ));
    }

Tips

For a more detailed example, check the examples directory.

Though I've tweaked the default settings to work for me, it does not mean they will work well for your scene, so you may need to play around with them to see what fits.

This shader works best with high roughness materials and simple or no textures, as demonstrated in examples/shapes.rs

Dependencies

~24–35MB
~576K SLoC