aboutsummaryrefslogtreecommitdiff
path: root/src/components.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components.rs')
-rw-r--r--src/components.rs20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/components.rs b/src/components.rs
index 7f572e3..285a881 100644
--- a/src/components.rs
+++ b/src/components.rs
@@ -11,28 +11,32 @@ pub struct OutlinePostProcessSettings {
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.
- threshold: f32,
+ normal_threshold: f32,
/// Whether to use adaptive outlines. White outlines will be drawn around darker objects, while black ones will be drawn around lighter ones.
adaptive: u32,
+ /// Threshold of illumination for outlines to apply. Requires deferred prepass.
+ light_threshold: f32,
}
impl OutlinePostProcessSettings {
/// Create a new instance with the given settings
- pub fn new(weight: f32, threshold: f32, adaptive: bool) -> Self {
+ pub fn new(weight: f32, normal_threshold: f32, adaptive: bool, light_threshold: f32) -> Self {
Self {
weight,
- threshold,
+ normal_threshold,
adaptive: adaptive as u32,
+ light_threshold,
}
- }
+ }
}
impl Default for OutlinePostProcessSettings {
fn default() -> Self {
- Self {
+ Self {
weight: 1.0,
- threshold: 0.0,
- adaptive: 0
+ normal_threshold: 0.0,
+ adaptive: 0,
+ light_threshold: 0.0,
}
}
-} \ No newline at end of file
+}