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 GitHub
parent e1745c97b8
commit 2291f7e7d6

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