[PD] flip image in glsl

Patrice Colet colet.patrice at free.fr
Mon Apr 8 16:37:29 CEST 2013


Got it, thanks a lot!

Colet Patrice

----- Mail original -----
> De: "Cyrille Henry" <ch at chnry.net>
> À: "Patrice Colet" <colet.patrice at free.fr>
> Cc: "pd-list" <pd-list at iem.at>
> Envoyé: Lundi 8 Avril 2013 10:05:22
> Objet: Re: [PD] flip image in glsl
> 
> hello,
> 
> when using rectangular texturing, coordinate goes from 0 to image
> pixel size.
> when using "rectangle 0" mode, pixel coordinate goes from 0 to 1.
> (sometimes 1 is for the power of 2 bigger than the image pixel size)
> 
> so, in rectangular mode, use pixetl_size - image coordinate to flip
> the image.
> and 1 - image coordinate in non rectangle mode.
> 
> Image can be fliped because the "fliped" flag is not used on the
> shader.
> 
> cheers
> c
> 
> 
> 
> Le 08/04/2013 09:24, Patrice Colet a écrit :
> > Hello,
> >
> >   how is it possible to flip upside down an image in glsl example
> >   05.multitexture
> >
> > I tried to implement this in fragment program:
> >
> > http://stackoverflow.com/questions/9857089/flip-upside-down-vertex-shader-gles
> >
> > but it doesn't work. The only thing I can do is changing texture
> > scale and position, but I couldn't do it with negative values
> > like it would be done in pix_coordinates.
> >
> > In fact when I use pix_multiimage before pix_texture, the image
> > gets flipped, I don't know why...
> >
> > Colet Patrice
> >
> >
> > _______________________________________________
> > Pd-list at iem.at mailing list
> > UNSUBSCRIBE and account-management ->
> > http://lists.puredata.info/listinfo/pd-list
> >
> 



More information about the Pd-list mailing list