From 48382cc39b73b6c3317637c77862a725de310ce1 Mon Sep 17 00:00:00 2001 From: Silas Bartha Date: Thu, 21 Nov 2024 12:23:45 -0500 Subject: Thu Nov 21 12:23:45 PM EST 2024 (Introduced Defferred Rendering/Shading Threshold) --- src/components.rs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src/components.rs') 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 +} -- cgit v1.2.3