summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flam3.c7
-rw-r--r--rect.c3
2 files changed, 4 insertions, 6 deletions
diff --git a/flam3.c b/flam3.c
index 7ab0b97..b0caaf7 100644
--- a/flam3.c
+++ b/flam3.c
@@ -185,10 +185,9 @@ bool iterator_step (iterator * const iter, double4 * const ret, randctx * const
iter->p = q;
if (genome->final_xform_enable == 1) {
- if (genome->xform[genome->final_xform_index].opacity==1 ||
- rand_d01(rc)<genome->xform[genome->final_xform_index].opacity) {
- apply_xform(&genome->xform[genome->final_xform_index], iter->p,
- &q, rc);
+ const flam3_xform * const final = &genome->xform[genome->final_xform_index];
+ if (final->opacity == 1 || rand_d01(rc) < final->opacity) {
+ apply_xform (final, iter->p, &q, rc);
/* Keep the opacity from the original xform */
q = (double4) { q[0], q[1], q[2], iter->p[3] };
}
diff --git a/rect.c b/rect.c
index 371e5c3..085c900 100644
--- a/rect.c
+++ b/rect.c
@@ -136,8 +136,7 @@ static void iter_thread (flam3_genome * const input_genome,
double4 interpcolor = color_palette_lookup (p[2],
genome.palette_mode, &input_genome->palette);
- const double logvis = p[3];
- interpcolor *= logvis;
+ interpcolor *= p[3];
bucket->data[ix] += interpcolor;
}