Hello,
I am very beginner in OpenGL.
I am trying to mix two textures in fragment shader for the same vertices but different texture coordinates like this,
Fragment Shader:
uniform sampler2D tex0;
uniform sampler2D tex1;
in vec2 coord0;
in vec2 coord1;
mix(texture2D(tex0,coord0),texture2D(tex1,coord1),0.6);
and in my client code I am driving the vertex shader with following VBO structure.
{vertices, coordinates for tex0, coordinates for tex1}
The problem is that although I am sampling tex1 with coord1 it seems that it is also being sampled by coord0 coordinates. What am I doing worng? or Could you please suggest a way to sample different textures with different texture coordinates but for the same vertices ?
Thank you in advance