aboutsummaryrefslogtreecommitdiff
path: root/src/components.rs
diff options
context:
space:
mode:
authorLibravatar Silas Bartha <[email protected]>2024-11-21 12:23:45 -0500
committerLibravatar Silas Bartha <[email protected]>2024-11-21 12:23:45 -0500
commit48382cc39b73b6c3317637c77862a725de310ce1 (patch)
tree0a9b90c185a31c79a8451ce89b7f51b26d858582 /src/components.rs
parent68c0010bd44276544469e4ee6487076067f11f80 (diff)
Thu Nov 21 12:23:45 PM EST 2024 (Introduced Defferred Rendering/Shading Threshold)
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
+}