Expand description
§bevy_show_prepass
A Bevy plugin to visualize depth, normal and motion vector prepasses.
§Usage
For a complete example, see the simple example.
ⓘ
// 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 or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Structs§
- Show
Prepass Depth Power - Optional component to scale the depth visualization.
- Show
Prepass Label - Label for the show prepass render graph node.
- Show
Prepass Plugin - A Bevy plugin to visualize depth, normal and motion vector prepasses.
Enums§
- Show
Prepass - Add this component to a camera to visualize a prepass.