[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47879] trunk/blender/source/blender/ compositor/operations/COM_GlareFogGlowOperation.cpp: minor change to r47872 , multiply both values as unsigned ints before converting to float.
Campbell Barton
ideasman42 at gmail.com
Thu Jun 14 12:03:32 CEST 2012
Revision: 47879
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47879
Author: campbellbarton
Date: 2012-06-14 10:03:23 +0000 (Thu, 14 Jun 2012)
Log Message:
-----------
minor change to r47872, multiply both values as unsigned ints before converting to float.
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47872
Modified Paths:
--------------
trunk/blender/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp
Modified: trunk/blender/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp 2012-06-14 09:48:27 UTC (rev 47878)
+++ trunk/blender/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp 2012-06-14 10:03:23 UTC (rev 47879)
@@ -382,14 +382,14 @@
BLI_init_rcti(&kernelRect, 0, sz, 0, sz);
ckrn = new MemoryBuffer(NULL, &kernelRect);
- scale = 0.25f * sqrtf((float)sz * sz);
+ scale = 0.25f * sqrtf((float)(sz * sz));
for (y = 0; y < sz; ++y) {
- v = 2.f * (y / (float)sz) - 1.f;
+ v = 2.f * (y / (float)sz) - 1.0f;
for (x = 0; x < sz; ++x) {
- u = 2.f * (x / (float)sz) - 1.f;
+ u = 2.f * (x / (float)sz) - 1.0f;
r = (u * u + v * v) * scale;
- d = -sqrtf(sqrtf(sqrtf(r))) * 9.f;
+ d = -sqrtf(sqrtf(sqrtf(r))) * 9.0f;
fcol[0] = expf(d * cs_r), fcol[1] = expf(d * cs_g), fcol[2] = expf(d * cs_b);
// linear window good enough here, visual result counts, not scientific analysis
//w = (1.f-fabs(u))*(1.f-fabs(v));
More information about the Bf-blender-cvs
mailing list