jit.gl.pix sample object - rotation squeezes the texture

pelo's icon

Hello jitter pros,

I am writing my first jit.gl.pix objects and have a question about rotating a texture.
I found this great rotation patch here, but the rotation squeezes the texture like videoplane (@transform_reset 2)

The jit.gl.slab @file td.rota.jxs object works, but makes the background black and i want to stay in gen if possible.

Perhaps someone has a hint for me.
Here is the patch.

All the best,
Penelope

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

MakePatchesNotWar's icon

I think it's because of the aspect-ratio of your sourcefile because it has to fit the horizontal 1920 pixels into the vertical 1280 pixels and vice versa. There's no distortion if you use a square matrix

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

Matteo Marson's icon

Hi,

Luvulongtime is correct; you have to compensate for the aspect ratio before and after applying the rotation:

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

pelo's icon

Hello luvulongtime and Matteo Marson,

thank you so much for your help!
At the end things are looking so easy ;-)

Have a nice day,
Penelope

pelo's icon

Hello jitter fellows,

I just want to give something back.
A jit.gl.pix rotator with scale, position and boundmode adjustments.

perhaps useful for someone who do not reinvent the wheel ;-)

Happy patching,
Pelo

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

mizu's icon

Thanks Penelope ! With the sensation i understand what happens inside this jit.gl.pix... happy !
zzz