texture coordinates with jit.gl.multiple

Dec 4, 2013 at 7:16am

texture coordinates with jit.gl.multiple

Hi, is there any way to set individual texture coordinates for each instance with jit.gl.multiple? This is not what i’m trying to do, but imagine you’re trying to split apart or shatter one larger image into a grid of smaller individual videoplanes.

#274696
Dec 4, 2013 at 10:33am

absolutely. since max 6 gl.multiple allows setting texplane_s/t as one of the glparams matrices.
here’s a silly example i made way back when. it uses this feature to utilize a font-atlas with gl.multiple.

<code>

– Pasted Max Patch, click to expand. –

</code>

#274714
Dec 4, 2013 at 2:21pm

Cool patch. I can’t see any coordinate variation though? dstdimstart dstdimend.

#274747
Dec 6, 2013 at 6:27am

@rob. Is the alphabet supposed to map on the spheres – each letter per sphere? If so it isn’t working on my machine.

Processor 2.6 GHz Intel Core i7
Memory 16 GB 1600 MHz DDR3
Graphics NVIDIA GeForce GT 650M 1024 MB
Software OS X 10.9 (13A603)

#274947
Dec 6, 2013 at 11:50am

it maps whatever letter you type on the keyboard. possibly only works for US keyboard layouts.

in any case, to send texture coordinates to gl.multiple instances, provide tex_plane_s tex_plane_t as args to the @glparams attribute, and send 4 plane float32 matrices to the corresponding inputs.

#274977
Jan 27, 2014 at 2:32am

Sorry, I forgot to thank you. That patch has taught me how to use jit.multiple. Thank you!

#279236
Jan 27, 2014 at 8:19am

thanks for bumping this up, as i have looked for a way to have different textures on several instances from a jit.gl.multiple, and this might be the solution !

#279254

You must be logged in to reply to this topic.