Eliminate needless pre_ var separation

This commit is contained in:
Steven Robertson 2011-10-16 13:42:37 -04:00
parent 9bafbda81a
commit 5111a0f05c

View File

@ -112,22 +112,13 @@ void apply_xf{{xfid}}(float &ox, float &oy, float &color, mwc_st &rctx) {
oy = 0; oy = 0;
{{for v in xform.vars}} {{for v in xform.vars}}
{{if variations.var_nos[v].startswith('pre_')}}
if (1) { if (1) {
float w = {{px.get('xf.var[%d]' % v)}}; float w = {{px.get('xf.var[%d]' % v)}};
{{variations.var_code[variations.var_nos[v]].substitute(locals())}} {{variations.var_code[variations.var_nos[v]].substitute(locals())}}
} }
{{endif}}
{{endfor}} {{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}} {{endif}}
{{endfor}}
float csp = {{px.get('xf.color_speed')}}; float csp = {{px.get('xf.color_speed')}};
color = color * (1.0f - csp) + {{px.get('xf.color')}} * csp; color = color * (1.0f - csp) + {{px.get('xf.color')}} * csp;