[osg-users] TexCoords and texture unit

"Martin Großer" Grosser.Martin at gmx.de
Fri Nov 13 05:11:28 PST 2009


I'm so sorry! I send a empty mail. Sorry.
Now the correct mail.

My Problem: I have 2 Textures for a Objekt. The Objekt has one set of texture coordinates. The state set have the textures (unit 0 and unit1). The texture unit 0 use the right TexCoords, but not the TexCoord unit 1. How can I make that the texture (unit 1) use the TexCoords from unit 0??

In a Shader I would like do this:


gl_TexCoord[0]  = gl_MultiTexCoord0;


vec4 color0 = texture2D(texture0,gl_TexCoord[0].st);
vec4 color1 = texture2D(texture1,gl_TexCoord[0].st);

Can I do this without a glsl shader? A set of textures dependend on one TexCoordArray?


Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser

More information about the osg-users mailing list