Clamp min to 0 in colorclip (for wavelet et al)

This commit is contained in:
Steven Robertson 2012-01-20 09:23:46 -05:00
parent ec1e84fee6
commit e1914a9c87

View File

@ -25,6 +25,10 @@ void colorclip(float4 *pixbuf, float gamma, float vibrance, float highpow,
return;
}
pix.x = fmaxf(0.0f, pix.x);
pix.y = fmaxf(0.0f, pix.y);
pix.z = fmaxf(0.0f, pix.z);
float4 opix = pix;
float alpha = powf(pix.w, gamma);