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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-02-14 12:12:45 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-02-14 12:12:45 +0300
commit1c870f46e79c6378488bd84ed9ffbb40affae464 (patch)
tree602b7b04cd5313194f2e9266442e8dd61bbee057 /source/blender/compositor/operations/COM_GlareStreaksOperation.cpp
parentde9ec80e644bb86a3ebb258db9135c3ee32bdcac (diff)
Compositor: Cleanup, don't shortcut float values
Use 0.0f instead of 0.f and so on.
Diffstat (limited to 'source/blender/compositor/operations/COM_GlareStreaksOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_GlareStreaksOperation.cpp10
1 files changed, 5 insertions, 5 deletions
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;