jit.scissors but with GPU

Bertrand Fraysse's icon

I spent hours trying to make a scissors like function using "td.resample.jxs" but I don't understand how it works.
In fact i'd like to divide the image in 25 vertical bands and be able to process them independently. It works great with jit.scissors but it's too slow.
Thank you very much for your help.

jason@seeinginvideo.com's icon

all of your parameters for that script are contained within the script, open it with text wrangler and you will see. In this particular script, you have parameters such as scrdim, dstdim, interp etc. So you load the script into a jit.gl.slab using read as your message. Your other messages would be [param scrdim $1] etc with the appropriate number boxes controlling the parameters of the message. Plug your jit.qt.movie or grab into the slab and out to a window and see the parameters of the script at work. Andrew's tutorials on the main page are a godsend, study them.

Bertrand Fraysse's icon

I know how to use jit.gl.slab, the problem is that I don't understand how to manage the scrdim and dstdim parameters. I don't really understand them.

I spent hours trying combinations, without any success.
My probelm is coming from the algorithm, not from max.

jason@seeinginvideo.com's icon

this is your key to success. scr and dstdim are vec4, therefore the normal param *name* $1 with a number box wont be sufficient to modulate the parameter. After all the code you can see the patch example at the bottom on how that particular vec4 shader is working.

I hope i'm not being too simplistic.

EDIT: Pak param could be your friend, since the default for scrdim and dstdim are 0. 0. 1. 1. and attach number boxes to modulate those parameters

Bertrand Fraysse's icon

...

Here is what I got so far. It's exactly what I want except the black lines between each cuts.
If anyone have an idea.
Maybe the way i'm making it is too complicated too.
Thanks for your time and attention.

Max Patch
Copy patch and select New From Clipboard in Max.

Andrew Benson's icon

Hello,
The problem you are running into is directly related to the fact that the shader is written to use normalized coordinates. In this instance I would recommend altering the shader to use absolute texcoords instead.

AB

Bertrand Fraysse's icon