From 746185ce4de76f6d44d6041baa0182d30240431f Mon Sep 17 00:00:00 2001 From: Erik Reckase Date: Mon, 20 Jun 2011 14:05:00 -0600 Subject: [PATCH] added support for pre_blur. all variations that start with 'pre_' will be applied to the output of the affine transform before the other variation contributions are calculated. --- cuburn/code/iter.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cuburn/code/iter.py b/cuburn/code/iter.py index 8a7dc43..f124876 100644 --- a/cuburn/code/iter.py +++ b/cuburn/code/iter.py @@ -31,16 +31,28 @@ __shared__ iter_info info; __device__ void apply_xf{{xfid}}(float *ix, float *iy, float *icolor, mwc_st *rctx) { float tx, ty, ox = *ix, oy = *iy; + {{apply_affine_flam3('ox', 'oy', 'tx', 'ty', px, 'xf.c', 'pre')}} ox = 0; oy = 0; {{for v in xform.vars}} + {{if variations.var_nos[v].startswith('pre_')}} if (1) { float w = {{px.get('xf.var[%d]' % v)}}; {{variations.var_code[variations.var_nos[v]].substitute(locals())}} } + {{endif}} + {{endfor}} + + {{for v in xform.vars}} + {{if not variations.var_nos[v].startswith('pre_')}} + if (1) { + float w = {{px.get('xf.var[%d]' % v)}}; + {{variations.var_code[variations.var_nos[v]].substitute(locals())}} + } + {{endif}} {{endfor}} *ix = ox;