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:
isiko 2023-02-16 18:33:03 +01:00 committed by Keavon Chambers
parent 63b9b670a1
commit 344f243432
1 changed files with 2 additions and 2 deletions

View File

@ -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