Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

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 Mar 27, 2023
1 parent 27550ed commit fccfbd0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions data/effects/color-grade.effect
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fccfbd0

Please sign in to comment.