<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Le 08/04/2013 17:47, Patrice Colet a
      &eacute;crit&nbsp;:<br>
    </div>
    <blockquote
cite="mid:1374283498.37832597.1365436022095.JavaMail.root@zimbra75-e12.priv.proxad.net"
      type="cite">
      <pre wrap="">
I've implemented all the stuff for flipping horizontaly and verticaly, 
there is an attached example, but it's not very elegant, there is warning messages even if it works good, maybe there is a better way to do it?


Colet Patrice

----- Mail original -----
</pre>
      <blockquote type="cite">
        <pre wrap="">De: "Patrice Colet" <a class="moz-txt-link-rfc2396E" href="mailto:colet.patrice@free.fr">&lt;colet.patrice@free.fr&gt;</a>
&Agrave;: "pd-list" <a class="moz-txt-link-rfc2396E" href="mailto:pd-list@iem.at">&lt;pd-list@iem.at&gt;</a>
Cc: "Cyrille Henry" <a class="moz-txt-link-rfc2396E" href="mailto:ch@chnry.net">&lt;ch@chnry.net&gt;</a>
Envoy&eacute;: Lundi 8 Avril 2013 16:37:29
Objet: Re: [PD] flip image in glsl

Got it, thanks a lot!

Colet Patrice

----- Mail original -----
</pre>
        <blockquote type="cite">
          <pre wrap="">De: "Cyrille Henry" <a class="moz-txt-link-rfc2396E" href="mailto:ch@chnry.net">&lt;ch@chnry.net&gt;</a>
&Agrave;: "Patrice Colet" <a class="moz-txt-link-rfc2396E" href="mailto:colet.patrice@free.fr">&lt;colet.patrice@free.fr&gt;</a>
Cc: "pd-list" <a class="moz-txt-link-rfc2396E" href="mailto:pd-list@iem.at">&lt;pd-list@iem.at&gt;</a>
Envoy&eacute;: 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 &eacute;crit :
</pre>
          <blockquote type="cite">
            <pre wrap="">Hello,

  how is it possible to flip upside down an image in glsl example
  05.multitexture

I tried to implement this in fragment program:

<a class="moz-txt-link-freetext" href="http://stackoverflow.com/questions/9857089/flip-upside-down-vertex-shader-gles">http://stackoverflow.com/questions/9857089/flip-upside-down-vertex-shader-gles</a>

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


_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list
UNSUBSCRIBE and account-management -&gt;
<a class="moz-txt-link-freetext" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a>

</pre>
          </blockquote>
          <pre wrap="">
</pre>
        </blockquote>
        <pre wrap="">
_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list
UNSUBSCRIBE and account-management -&gt;
<a class="moz-txt-link-freetext" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a>

</pre>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list
UNSUBSCRIBE and account-management -&gt; <a class="moz-txt-link-freetext" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a>
</pre>
      </blockquote>
    </blockquote>
    Hello Patrice,<br>
    <br>
    You can do operations directly on vec2 instead of two floats in your
    fragment shader.<br>
    You can also avoid condition (could be slow).<br>
    See patch and glsl vertex and fragment attached for flip.<br>
    ++<br>
    <br>
    Jack<br>
    <br>
    <br>
  </body>
</html>