Skip to content

Commit

Permalink
filters/color-grading: Fix incorrect Lift logic (#515)
Browse files Browse the repository at this point in the history
Fixes #515
  • Loading branch information
Xaymar committed Apr 14, 2021
1 parent df7d916 commit 0903d3e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions data/effects/color-grade.effect
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ 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 multiplier = float3(1., 1., 1.) - (pLift.rgb * pLift.a);
return float3(1., 1., 1.) - ((float3(1., 1., 1.) - v) * multiplier);
};

float3 grade_gamma(float3 v) {
Expand Down

0 comments on commit 0903d3e

Please sign in to comment.