Fix #32369: pixel glitch with compositor curves node, and some pixels having
black point = white point. That's a degenerate case, clamped it now to 1e5, which is a bit arbitrary, but infinity would give NaN issues.
This commit is contained in:
@@ -150,13 +150,8 @@ void curvemapping_set_black_white_ex(const float black[3], const float white[3],
|
||||
int a;
|
||||
|
||||
for (a = 0; a < 3; a++) {
|
||||
const float delta = white[a] - black[a];
|
||||
if (delta != 0.0f) {
|
||||
r_bwmul[a] = 1.0f / delta;
|
||||
}
|
||||
else {
|
||||
r_bwmul[a] = 0.0f;
|
||||
}
|
||||
const float delta = MAX2(white[a] - black[a], 1e-5f);
|
||||
r_bwmul[a] = 1.0f / delta;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user