Fix T75414: Incorrect masking in Color Balance modifier

Color balance factor was infinity. Clamp to +/- `FLT_MAX`

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7884
This commit is contained in:
Richard Antalik 2020-06-18 05:41:19 +02:00
parent f7f3b2d318
commit 229ed078d1
Notes: blender-bot 2023-02-14 08:24:03 +01:00
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
Referenced by issue #75414, Color Balance Adjustment Layer "escapes" its mask when parameters are extreme
1 changed files with 3 additions and 1 deletions

View File

@ -2315,7 +2315,9 @@ MINLINE float color_balance_fl(
x = 0.f;
}
return powf(x, gamma) * mul;
x = powf(x, gamma) * mul;
CLAMP(x, FLT_MIN, FLT_MAX);
return x;
}
static void make_cb_table_float(float lift, float gain, float gamma, float *table, float mul)