filters/color-grading: Fix incorrect Lift logic (#515)

Fixes #515
This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2021-04-14 11:36:45 +02:00 committed by Xaymar
parent 895b1a06e6
commit 36b12d971b

View file

@ -50,8 +50,10 @@ uniform float4 pCorrection;
// Functionality
//------------------------------------------------------------------------------
float3 grade_lift(float3 v) { // same as grade_offset?
return (v.rgb + pLift.rgb) + pLift.a;
float3 grade_lift(float3 v) {
float3 multiplier1 = float3(1., 1., 1.) - pLift.rgb;
float3 multiplier2 = float3(1., 1., 1.) - pLift.aaa;
return float3(1., 1., 1.) - ((float3(1., 1., 1.) - v) * multiplier1 * multiplier2);
};
float3 grade_gamma(float3 v) {