using srcdim attributes with gl.texture??

    Feb 07 2014 | 8:28 pm
    Quick question here (search isn't working on the site).
    I have a video module that takes incoming video, selects a portion of it (cropping, essentially) and outputs it. Previously I was simply using an internal [jit.matrix @usescrdim] and giving it different srcstart/end values.
    I've since moved my system into the GPU realm, but I can't figure out how to do this simple operation using []. I don't want to use the subtext method because that means I'd need to go back into the CPU domain at some prior point. The srcdim attributes don't seem to work with g.texture. Any advice? Thanks a ton!

    • Feb 07 2014 | 9:20 pm
      I think what you're referring to is in the maxhelp. The subtex_matrix tab - dstdimstart and dstdimend
    • Feb 07 2014 | 9:31 pm
      Oh I see, You need td.rota.jxs
    • Feb 07 2014 | 11:09 pm
      I can't use subtex_matrix because that requires converting the incoming texture back to a jit_matrix, which defeats the point.
      I don't want to use td.rota.jxs because its parameters aren't easy to work with. i.e. I'd like to define the region of the incoming video that I'd like to use by describing a rectangle (a la srcdim).
      This seems like it should be a trivial operation! Perhaps there is a shader file i'm overlooking that does this? It should really be supported natively with gl.texture. Hrmph.
    • Feb 07 2014 | 11:36 pm
      here's a simple based solution to crop textures using pixel parameters:
    • Feb 08 2014 | 12:19 pm
      That's why I then suggested td.rota.jxs - see the texdisplace folder inside Jitter examples. Saying that, I think Rob Ramirez's version will probably be faster.