On Dec 21, 2007 2:46 PM, Alexandre Quessy &lt;<a href="mailto:listes@sourcelibre.com">listes@sourcelibre.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>2007/12/21, chris clepper &lt;<a href="mailto:cgclepper@gmail.com">cgclepper@gmail.com</a>&gt;:<br><div class="Ih2E3d">&gt; Please stop saying this. &nbsp;These features do work apart from reading texture<br>&gt; coordinates from units other than zero.
<br><br></div>Hmm, I have to dig a bit into this. Any example of a GLSL shader with<br>mutlitexturing ?<br></blockquote><div><br>Several have been posted to the list.&nbsp; But below is a very basic one:<br>&nbsp;</div>varying vec2 texcoord1;
<br>varying vec2 texcoord2;<br><br>void main()<br>{<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; texcoord1 = gl_MultiTexCoord0.st;<br>&nbsp;&nbsp; // texcoord2 = gl_MultiTexCoord1.st;<br>&nbsp;&nbsp; // gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;<br><br>&nbsp;&nbsp;&nbsp; gl_Position = ftransform();
<br><br>}<br><br><br>uniform sampler2DRect MyTex;<br>uniform sampler2DRect MyTex1;<br><br>varying vec2 texcoord1;<br>varying vec2 texcoord2;<br><br>void main (void)<br>{<br><br>&nbsp;vec4 color = texture2DRect(MyTex, texcoord1);
<br>&nbsp;vec4 color2 = texture2DRect(MyTex1, texcoord1);<br>&nbsp;vec4 temp = color * color2;<br>&nbsp;gl_FragColor = temp;<br><br>}<br><br>Obviously, this only works correctly if the textures are the same dimensions.  <br><br><br><br>
</div><br>