Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-06-14 14:03:23 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-14 14:03:23 +0400
commit47950325a412e40a6d9ed89f7cef849f0d136a29 (patch)
treeafb07bfef8791230388e4b7d74f5d25865e5c800 /source/blender
parent4f607bf162130bb5360650921bfcc5aac38efcc3 (diff)
minor change to r47872, multiply both values as unsigned ints before converting to float.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp b/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp
index 0c2ae96aa51..a91445be4b5 100644
--- a/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp
@@ -382,14 +382,14 @@ void GlareFogGlowOperation::generateGlare(float *data, MemoryBuffer *inputTile,
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));