<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Dear list,<br>
    <br>
    I tried to get familiar with shaders in GEM. I started with
    "01.simple_texture.pd" in folder 10.glsl.<br>
    <br>
    I can start rendering (checking "rendering") but I cannot load
    shaders. After checking the rendering checkbox 2 errors occur:<br>
    &nbsp;&nbsp;&nbsp; [glsl_vertex]: need to load a shader<br>
    &nbsp;&nbsp;&nbsp; [glsl_fragment]: need to load a shader<br>
    <br>
    When I try to use shaders (click on "load shader") I receive the
    error message:<br>
    &nbsp;&nbsp;&nbsp; linking: link 1.5 3.5<br>
    &nbsp;&nbsp;&nbsp; [glsl_program]: Info_log:<br>
    &nbsp;&nbsp;&nbsp; [glsl_program]: Vertex info<br>
    &nbsp;&nbsp;&nbsp; -----------<br>
    &nbsp;&nbsp;&nbsp; (0) : error C5145: must write to gl_Position<br>
    &nbsp;&nbsp;&nbsp; [glsl_program]: Link failed!<br>
    <br>
    These errors occur when I either try to open a ".vert" or a ".fraq"
    file! Do you have any ideas what I could try to use different
    shaders??? Below I'm listing my system details:<br>
    <br>
    - pd: 0.43.4-extended<br>
    - GEM: 0.93.3<br>
    - System: Windows 7-64<br>
    - Folder contains no spaces:
    "C:\pd-0.43.4\extra\Gem\examples\10.glsl"<br>
    - I replaced all CRLFs with CRs as I found in
    <a class="moz-txt-link-freetext" href="https://sourceforge.net/p/pure-data/bugs/864/?page=2">https://sourceforge.net/p/pure-data/bugs/864/?page=2</a> (otherwise I
    get the errors &nbsp;&nbsp;&nbsp;&nbsp; <br>
    &nbsp;&nbsp;&nbsp; [glsl_vertex]: error reading file<br>
    &nbsp;&nbsp;&nbsp; [glsl_fragment]: error reading file<br>
    - I also tried to run pd with Admin permissions<br>
    <br>
    Thanks in advance!!<br>
    <br>
    Br, Michael<br>
    <br>
    <br>
    <div class="moz-cite-prefix">-------- Original Message --------<br>
      Subject: Re: [GEM-dev] Oculus Rift distortion/support<br>
      From: Jack <a class="moz-txt-link-rfc2396E" href="mailto:jack@rybn.org">&lt;jack@rybn.org&gt;</a><br>
      To: <a class="moz-txt-link-abbreviated" href="mailto:gem-dev@iem.at">gem-dev@iem.at</a><br>
      Date: 25.07.2013 12:22<br>
    </div>
    <blockquote cite="mid:51F0FC83.1050507@rybn.org" type="cite">
      <pre wrap="">Hello,

Yep, and if oculus doesn't provide a shader for barrel distortion, there
is plenty of example on the web.
++

Jack



Le 25/07/2013 12:17, Cyrille Henry a &eacute;crit :
</pre>
      <blockquote type="cite">
        <pre wrap="">hello,

one have to use shader in order create the image distortion.

i think oculus should provide standard shader that you have to insert
in your rendering process.

the only problem is that you have to do 2 rendering : one for each eye.
The best solution is to do a 3 pass rendering :
1st : left eye view without distortion, rendered in a frame buffer
2nd : right eye view (no distortion / framebuffer)
3rd : using the 2 previous texture and a shader, render the final image

cheers
c


Le 25/07/2013 12:04, Michael Mihocic a &eacute;crit :
</pre>
        <blockquote type="cite">
          <pre wrap="">Dear list,

we are using GEM with a head-mounted-display to present a virtual
world to subjects performing acoustic localization experiments.

Now we plan to switch from our current HMD to Oculus Rift (an
upcoming virtual reality head-mounted display). Therefore we need to
modify our image and add (asymetric) barrel distortion to the
represented image. (The image distortion is compensated by the lenses
in Oculus Rift.)

My questions now:
- Is there an easy solution to implement barrel distortion to the
rendered window in GEM?
- Does anybody of you already have some experience with GEM together
with Oculus Rift?

Since attachments should be avoided in this list, I do not send any
example pictures of the distortion or our current presented world. If
you are interested you can either contact me and I can send you some
screenshots, or you can google for example images/videos of Oculus
Rift distortion.

Thanks in advance and best regards, Michael

</pre>
        </blockquote>
        <pre wrap="">
_______________________________________________
GEM-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:GEM-dev@iem.at">GEM-dev@iem.at</a>
<a class="moz-txt-link-freetext" href="http://lists.puredata.info/listinfo/gem-dev">http://lists.puredata.info/listinfo/gem-dev</a>
</pre>
      </blockquote>
      <pre wrap="">

_______________________________________________
GEM-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:GEM-dev@iem.at">GEM-dev@iem.at</a>
<a class="moz-txt-link-freetext" href="http://lists.puredata.info/listinfo/gem-dev">http://lists.puredata.info/listinfo/gem-dev</a>
</pre>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      Michael Mihocic<br>
      Psychoacoustics &amp; Experimental Audiology<br>
      <a href="http://www.kfs.oeaw.ac.at/">Acoustics Research Institute</a><br>
      <a href="http://www.oeaw.ac.at/">Austrian Academy Of Sciences</a><br>
      Wohllebengasse 12-14 / 1<br>
      A-1040 Vienna, Austria<br>
      Tel: +43 (1) 51581 2515 (Office)<br>
      Tel: +43 (1) 51581 2525 (Lab)<br>
      Fax: +43 (1) 51581 2530<br>
      <a href="mailto:michael.mihocic@oeaw.ac.at">michael.mihocic@oeaw.ac.at</a><br>
    </div>
  </body>
</html>