[GEM-dev] multitexture with shader
cyrille henry
cyrille.henry at la-kitchen.fr
Thu May 3 13:18:19 CEST 2007
hello,
i still have problem trying to have multiple texture on a shader to work.
i just adapt the pix_multitexture exemple jamie send month ago on this
list (see attachment).
my problem is that i can only access to my 1st texture in the shader.
the 2 textures have the same size.
i've test this patch on linux and osX with the same result.
my shader look like this :
void main()
{
gl_TexCoord[0] = gl_MultiTexCoord0;
// gl_TexCoord[1] = gl_MultiTexCoord1;
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}
and
uniform sampler2DRect txtur, txtur2;
void main (void)
{
vec4 color;
color = texture2DRect(txtur, gl_TexCoord[0].st) + texture2DRect(txtur2,
gl_TexCoord[0].st);
gl_FragColor = 0.5 * color + 0.1 ;
}
i'll be very happy if someone could help me.
thanks
Cyrille
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multitexture.zip
Type: application/zip
Size: 1853 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/gem-dev/attachments/20070503/2f1f04aa/attachment.zip>
More information about the GEM-dev
mailing list