From 1c870f46e79c6378488bd84ed9ffbb40affae464 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sun, 14 Feb 2016 10:12:45 +0100 Subject: Compositor: Cleanup, don't shortcut float values Use 0.0f instead of 0.f and so on. --- .../compositor/operations/COM_GlareStreaksOperation.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/compositor/operations/COM_GlareStreaksOperation.cpp') diff --git a/source/blender/compositor/operations/COM_GlareStreaksOperation.cpp b/source/blender/compositor/operations/COM_GlareStreaksOperation.cpp index deeb5094bd0..da6076337b4 100644 --- a/source/blender/compositor/operations/COM_GlareStreaksOperation.cpp +++ b/source/blender/compositor/operations/COM_GlareStreaksOperation.cpp @@ -40,14 +40,14 @@ void GlareStreaksOperation::generateGlare(float *data, MemoryBuffer *inputTile, tdst->clear(); memset(data, 0, size4 * sizeof(float)); - for (a = 0.f; a < DEG2RADF(360.0f) && (!breaked); a += ang) { + for (a = 0.0f; a < DEG2RADF(360.0f) && (!breaked); a += ang) { const float an = a + settings->angle_ofs; const float vx = cos((double)an), vy = sin((double)an); for (n = 0; n < settings->iter && (!breaked); ++n) { const float p4 = pow(4.0, (double)n); const float vxp = vx * p4, vyp = vy * p4; const float wt = pow((double)settings->fade, (double)p4); - const float cmo = 1.f - (float)pow((double)settings->colmod, (double)n + 1); // colormodulation amount relative to current pass + const float cmo = 1.0f - (float)pow((double)settings->colmod, (double)n + 1); // colormodulation amount relative to current pass float *tdstcol = tdst->getBuffer(); for (y = 0; y < tsrc->getHeight() && (!breaked); ++y) { for (x = 0; x < tsrc->getWidth(); ++x, tdstcol += 4) { @@ -55,8 +55,8 @@ void GlareStreaksOperation::generateGlare(float *data, MemoryBuffer *inputTile, // otherwise results in uneven brightness, only need once if (n == 0) tsrc->read(c1, x, y); else c1[0] = c1[1] = c1[2] = 0; tsrc->readBilinear(c2, x + vxp, y + vyp); - tsrc->readBilinear(c3, x + vxp * 2.f, y + vyp * 2.f); - tsrc->readBilinear(c4, x + vxp * 3.f, y + vyp * 3.f); + tsrc->readBilinear(c3, x + vxp * 2.0f, y + vyp * 2.0f); + tsrc->readBilinear(c4, x + vxp * 3.0f, y + vyp * 3.0f); // modulate color to look vaguely similar to a color spectrum c2[1] *= cmo; c2[2] *= cmo; @@ -80,7 +80,7 @@ void GlareStreaksOperation::generateGlare(float *data, MemoryBuffer *inputTile, } float *sourcebuffer = tsrc->getBuffer(); - float factor = 1.f / (float)(6 - settings->iter); + float factor = 1.0f / (float)(6 - settings->iter); for (int i = 0; i < size4; i += 4) { madd_v3_v3fl(&data[i], &sourcebuffer[i], factor); data[i + 3] = 1.0f; -- cgit v1.2.3