mask jit.gl.cornerpin

veasec's icon

Hi, does anyone know how to apply an alpha mask to the output of the jit.gl.cornerpin object? I'm currently using cc.alphaglue.jxs before the cornerpin, but I'd like to apply it after the warping.
-Charles

Tobias Rosenberger's icon

you could capture as sub-rendercontext with jit.gl.node, then put the captured video into the slab and finally send to a videoplane in your main render context

Rob Ramirez's icon
Max Patch
Copy patch and select New From Clipboard in Max.

yup, that's pretty much what you would do.
the one wrinkle is you lose mouse interaction when capturing a cornerpin to a node sub-context.
the patch below show's how to toggle between the two modes.

veasec's icon

It works except I can't seem to blend the planes. Any idea why?

Rob Ramirez's icon

took me awhile, but the problem is you forgot the @ sign in your jit.gl.videoplane boxes for the @depth_enable attribute.

veasec's icon

Yes that works. Sorry about the oversight....you're doing a great job on the forum.

Charles