aboutsummaryrefslogtreecommitdiff
path: root/src/components.rs
blob: 49f468401ceced266b415b4f0b51b8011ac46abe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use bevy::{
    prelude::*,
    render::{extract_component::ExtractComponent, render_resource::ShaderType},
};

/// Component which, when inserted into an entity with a camera and normal prepass, enables an outline effect for that
/// camera.
#[derive(Component, ShaderType, ExtractComponent, PartialEq, Clone, Default)]
pub struct OutlinePostProcessSettings {
    /// Weight of outlines in pixels.
    pub weight: f32,
    /// A threshold for normal differences, values below this threshold will not become outlines.
    /// Higher values will result in more outlines which may look better on smooth surfaces.
    pub threshold: f32,
}