# bevy_show_prepass
[](#license)
[](https://github.com/jannik4/bevy_show_prepass/actions)
[](https://crates.io/crates/bevy_show_prepass)
[](https://docs.rs/bevy_show_prepass)
A Bevy plugin to visualize depth, normal and motion vector prepasses.
[Live Demo](https://jannik4.github.io/bevy_show_prepass/)
## Usage
For a complete example, see the [simple example](https://github.com/jannik4/bevy_show_prepass/blob/main/examples/simple.rs).
```rust,ignore
// Add the plugin
app.add_plugins(ShowPrepassPlugin);
fn setup(mut commands: Commands) {
commands.spawn((
Camera3d::default(),
// Add the desired prepasses to the camera (DepthPrepass, NormalPrepass, MotionVectorPrepass)
DepthPrepass,
// Show the desired prepass (ShowPrepass::Depth, ShowPrepass::Normals, ShowPrepass::MotionVector)
ShowPrepass::Depth,
// Optionally scale the depth visualization, e.g. depth = depth^0.75
ShowPrepassDepthPower(0.75),
));
}
```
## License
Licensed under either of
- Apache License, Version 2.0
([LICENSE-APACHE-2.0](LICENSE-Apache-2.0) or <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT License
([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
at your option.