trying to sample vertex points in gl.texture

Pis Pas's icon

I need to sample vertex points for further processing in my geom shader but sampling with jit.gl.texture give me swapped results.
Please see the attached example

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

What would be the right way of doing that? Thanks!

Matth's icon

try with this:

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

Rob Ramirez's icon

you need to only send the first 3 position planes and discard the rest. jit.pack is your friend.

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

Pis Pas's icon

Thanks, but this will convert the point to ints and I need to preserve floats.

Rob Ramirez's icon

it shouldn't, how are you determining that?

Pis Pas's icon

Hi Rob and thanks for the example. I was answering Matth, your solution is fine!