Fix Levels node gamma correction (#1034)
* Fix Levels Node * Fix the fix --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
parent
63b9b670a1
commit
344f243432
|
|
@ -77,9 +77,9 @@ fn levels_node(color: Color, input_start: f64, input_mid: f64, input_end: f64, o
|
|||
|
||||
// Gamma correction
|
||||
let gamma = if midtones < 0.5 {
|
||||
(1. + (9. * (1. - midtones * 2.))).min(9.99)
|
||||
1. / (1. + (9. * (1. - midtones * 2.))).min(9.99)
|
||||
} else {
|
||||
((1. - midtones) * 2.).max(0.01)
|
||||
1. / ((1. - midtones) * 2.).max(0.01)
|
||||
};
|
||||
|
||||
// Input levels
|
||||
|
|
|
|||
Loading…
Reference in New Issue