jit.expr to jit.gen


    Jan 12 2012 | 8:08 pm
    Hello Friends,
    I am trying to figure out how I could replace the following expression:
    [jit.expr @inputs 3 @expr "in[0].p[0]*in[1]" "in[0].p[1]*in[2]" "in[0].p[2]*in[2]" "in[0].p[3]*in[2]"]
    I use it to apply different transformations on Aplha channel (p[0]) and RGB channels (p[1], p[2], p[3]). I use this for a Soft Edge patch.
    Thank you very much for your help.
    Happy New Year, Happy Maxing!
    -PhM

    • Jan 12 2012 | 8:47 pm
      You can use swiz to access the plane of a matrix cell just like .p[0] in jit.expr. Here's an example. Don't forget that in jit.pix, the color format is RGBA just like in jit.gl.pix, which is different than the usual jitter matrix format of ARGB.
    • Jan 12 2012 | 9:24 pm
      Hi Wesley!
      Thank you very much for the patch!
      I did not know the [concat] object.
      I was on the track with C74 Expo Gen Patches, but I did not read anything about [concat].
      Is there a extensive list of [gen] objects somewhere?
      Again, thanx very much
      -P
    • Jan 13 2012 | 7:08 pm
      If you search for Gen in the documentation, you'll pull up a bunch of reference material on Gen, GenExpr and the various operators. concat was recently added and slipped through being documented. As far as I know, it's the only undocumented operator.