Use a texture sampler in your shader.&nbsp; GLSL has a sampler for 2D and RECT texutres, so make sure you have the right one for the texture type (OSX defaults to RECT while Win/Linux are probably 2D).<br><br>uniform sampler2D MyTex;
<br><br>void main (void)<br>{<br>&nbsp; vec4 color = texture2D(MyTex, gl_TexCoord[0].st);<br>&nbsp; color = color * 0.5;<br>&nbsp; gl_FragColor = color;<br>}<br><br>That is untested but it should result in something.<br><br>cgc<br><br><div>
<span class="gmail_quote">On 8/25/06, <b class="gmail_sendername">cyrille henry</b> &lt;<a href="mailto:cyrille.henry@la-kitchen.fr">cyrille.henry@la-kitchen.fr</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hello,<br><br>i'm trying to learn glsl.<br>I can't find how to use texture in the fragment shader.<br>does anyone have an exemple how to load texture with GEM glsl?<br><br>thanks<br>Cyrille<br><br>_______________________________________________
<br>GEM-dev mailing list<br><a href="mailto:GEM-dev@iem.at">GEM-dev@iem.at</a><br><a href="http://lists.puredata.info/listinfo/gem-dev">http://lists.puredata.info/listinfo/gem-dev</a><br></blockquote></div><br>