mirror of
https://github.com/stevenrobertson/cuburn.git
synced 2025-02-05 11:40:04 -05:00
Do post affine transforms. How did I miss this?
This commit is contained in:
parent
5111a0f05c
commit
0cc904c4f1
@ -118,6 +118,10 @@ void apply_xf{{xfid}}(float &ox, float &oy, float &color, mwc_st &rctx) {
|
|||||||
}
|
}
|
||||||
{{endfor}}
|
{{endfor}}
|
||||||
|
|
||||||
|
{{if xform.has_post}}
|
||||||
|
tx = ox;
|
||||||
|
ty = oy;
|
||||||
|
{{apply_affine_flam3('tx', 'ty', 'ox', 'oy', px, 'xf.post', 'post')}}
|
||||||
{{endif}}
|
{{endif}}
|
||||||
|
|
||||||
float csp = {{px.get('xf.color_speed')}};
|
float csp = {{px.get('xf.color_speed')}};
|
||||||
|
@ -458,9 +458,15 @@ class XFormFeatures(object):
|
|||||||
def __init__(self, xforms, xform_id):
|
def __init__(self, xforms, xform_id):
|
||||||
self.id = xform_id
|
self.id = xform_id
|
||||||
any = lambda l: bool(filter(None, map(l, xforms)))
|
any = lambda l: bool(filter(None, map(l, xforms)))
|
||||||
self.has_post = any(lambda xf: getattr(xf, 'post', None))
|
|
||||||
|
self.has_post = any(lambda xf: not self.id_matrix(xf.post))
|
||||||
self.vars = set()
|
self.vars = set()
|
||||||
for x in xforms:
|
for x in xforms:
|
||||||
self.vars = (
|
self.vars = (
|
||||||
self.vars.union(set([i for i, v in enumerate(x.var) if v])))
|
self.vars.union(set([i for i, v in enumerate(x.var) if v])))
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def id_matrix(m):
|
||||||
|
return (m[0][0] == 1 and m[1][0] == 0 and m[2][0] == 0 and
|
||||||
|
m[0][1] == 0 and m[1][1] == 1 and m[2][1] == 0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user