Fix T47336: compositor color balance offset/slope/power incorrectly clamps HDR colors.

This commit is contained in:
Brecht Van Lommel 2016-02-07 16:41:41 +01:00
parent 8f6912392d
commit dd185bf5b8
Notes: blender-bot 2023-02-14 08:14:50 +01:00
Referenced by issue #47367, Segmentation fault at BIF_draw_manipulator
Referenced by issue #47336, ASC CDL Node: Clamps
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ inline float colorbalance_cdl(float in, float offset, float power, float slope)
float x = in * slope + offset;
/* prevent NaN */
CLAMP(x, 0.0f, 1.0f);
if (x < 0.f) x = 0.f;
return powf(x, power);
}