#post-processing #bevy-plugin #bevy #edge-detection #plugin #graphics

bevy_edge_detection

A bevy plugin adding edge detection post processing effect

4 releases

new 0.15.4 Jan 14, 2025
0.15.3 Jan 11, 2025
0.15.2 Jan 9, 2025
0.15.1 Jan 8, 2025

#264 in Game dev

Download history 249/week @ 2025-01-05 130/week @ 2025-01-12

379 downloads per month

MIT/Apache

1.5MB
660 lines

bevy_edge_detection

bevy_edge_detection is a Bevy plugin that provides edge detection post-processing using a 3x3 Sobel filter. This plugin is designed to enhance your Bevy projects by adding visually distinct edges to your 3D scenes, making them more stylized or easier to analyze.

3d_shapes

Features

  • Edge Detection: Utilizes a 3x3 Sobel filter to detect edges based on depth, normal, and color variations.

  • Customizable Thresholds: Adjustable thresholds for depth, normal, and color to fine-tune edge detection.

  • Post-Processing Integration: Seamlessly integrates with Bevy's post-processing pipeline.

Usage

  1. Add bevy_edge_detection to your Cargo.toml:
[dependencies]
bevy_edge_detection = "0.15.1"
  1. Add the EdgeDetectionPlugin to your Bevy app:
use bevy::prelude::*;
use bevy_edge_detection::EdgeDetectionPlugin;

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_plugin(EdgeDetectionPlugin::default())
        .run();
}
  1. Add EdgeDetection to Camera:
commands.spawn((
    Camera3d::default(),
    Transform::default(),
    EdgeDetection::default(),
));

Example

cargo run --example 3d_shapes

License

This project is licensed under the MIT License.

Acknowledgments

Thanks to IceSentry, this project was inspired by bevy_mod_edge_detection.

Dependencies

~22–33MB
~524K SLoC