diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_GlareStreaksOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_GlareStreaksOperation.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/compositor/operations/COM_GlareStreaksOperation.cc b/source/blender/compositor/operations/COM_GlareStreaksOperation.cc index 8c303ab6332..c544e13cf34 100644 --- a/source/blender/compositor/operations/COM_GlareStreaksOperation.cc +++ b/source/blender/compositor/operations/COM_GlareStreaksOperation.cc @@ -12,7 +12,7 @@ void GlareStreaksOperation::generate_glare(float *data, int x, y, n; uint nump = 0; float c1[4], c2[4], c3[4], c4[4]; - float a, ang = DEG2RADF(360.0f) / (float)settings->streaks; + float a, ang = DEG2RADF(360.0f) / float(settings->streaks); int size = input_tile->get_width() * input_tile->get_height(); int size4 = size * 4; @@ -26,14 +26,14 @@ void GlareStreaksOperation::generate_glare(float *data, 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); + 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 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 wt = pow(double(settings->fade), double(p4)); /* Color-modulation amount relative to current pass. */ - const float cmo = 1.0f - (float)pow((double)settings->colmod, (double)n + 1); + const float cmo = 1.0f - float(pow(double(settings->colmod), double(n) + 1)); float *tdstcol = tdst.get_buffer(); for (y = 0; y < tsrc.get_height() && (!breaked); y++) { @@ -72,7 +72,7 @@ void GlareStreaksOperation::generate_glare(float *data, } float *sourcebuffer = tsrc.get_buffer(); - float factor = 1.0f / (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; |