forked from bartvdbraak/blender
Fix [#24964] HISTOGRAM: Inconsistency in spaces
This commit is contained in:
parent
5fe2a16385
commit
04d3741947
@ -956,13 +956,11 @@ void curvemapping_table_RGBA(CurveMapping *cumap, float **array, int *size)
|
||||
|
||||
DO_INLINE int get_bin_float(float f)
|
||||
{
|
||||
int bin= (int)(f*255);
|
||||
int bin= (int)((f*255) + 0.5); /* 0.5 to prevent quantisation differences */
|
||||
|
||||
/* note: clamp integer instead of float to avoid problems with NaN */
|
||||
CLAMP(bin, 0, 255);
|
||||
|
||||
//return (int) (((f + 0.25) / 1.5) * 255);
|
||||
|
||||
|
||||
return bin;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user