mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-04 13:30:48 +00:00
Fix Levels Node (#1289)
The Levels Node was previously outputing channel values out side the range of 0..1, this should be fixed now
This commit is contained in:
parent
820a2672b8
commit
054acd3cc9
1 changed files with 1 additions and 1 deletions
|
@ -261,7 +261,7 @@ fn levels_node(color: Color, input_start: f64, input_mid: f64, input_end: f64, o
|
|||
|
||||
// Input levels (Range: 0-1)
|
||||
let highlights_minus_shadows = (input_highlights - input_shadows).max(f32::EPSILON).min(1.);
|
||||
let color = color.map_rgb(|c| (c - input_shadows).max(0.) / highlights_minus_shadows);
|
||||
let color = color.map_rgb(|c| ((c - input_shadows).max(0.) / highlights_minus_shadows).min(1.));
|
||||
|
||||
// Midtones (Range: 0-1)
|
||||
let color = color.gamma(gamma);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue