diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-27 21:12:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-27 21:12:59 +0400 |
commit | 9c8f1e2ef487483bc374feaed9ff709e07638623 (patch) | |
tree | 1157b72533f1b2c2e2082d91562bd9a2da4290fb /source/blender/imbuf/intern/divers.c | |
parent | 4237c0393a9d1f089f01dd7c4b223b1f61b15023 (diff) |
imbuf, mathutils & readfile: floats were being implicitly promoted to doubles, adjust to use floats.
Diffstat (limited to 'source/blender/imbuf/intern/divers.c')
-rw-r--r-- | source/blender/imbuf/intern/divers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index ff98ac60166..6b35d7df397 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -109,7 +109,7 @@ void IMB_rect_from_float(struct ImBuf *ibuf) /* quick method to convert floatbuf to byte */ float *tof = (float *)ibuf->rect_float; // int do_dither = ibuf->dither != 0.f; - float dither= ibuf->dither / 255.0; + float dither= ibuf->dither / 255.0f; float srgb[4]; int i, channels= ibuf->channels; short profile= ibuf->profile; @@ -141,7 +141,7 @@ void IMB_rect_from_float(struct ImBuf *ibuf) else if (channels == 4) { if (dither != 0.f) { for (i = ibuf->x * ibuf->y; i > 0; i--, to+=4, tof+=4) { - const float d = (BLI_frand()-0.5)*dither; + const float d = (BLI_frand()-0.5f)*dither; srgb[0]= d + linearrgb_to_srgb(tof[0]); srgb[1]= d + linearrgb_to_srgb(tof[1]); @@ -170,7 +170,7 @@ void IMB_rect_from_float(struct ImBuf *ibuf) else { if (dither != 0.f) { for (i = ibuf->x * ibuf->y; i > 0; i--, to+=4, tof+=4) { - const float d = (BLI_frand()-0.5)*dither; + const float d = (BLI_frand()-0.5f)*dither; float col[4]; col[0]= d + tof[0]; |