[SOLVED]In the GLSL, p3d_MultiTexCoord and texCoord seems

My vertex shader:


#version 150 core

in vec3 position;
in vec3 vertex;
in vec3 normal;
in vec2 texCoord;

uniform mat4 p3d_ModelViewProjectionMatrix;
uniform vec2 p3d_MultiTexCoord0;

out VertexData {
	vec2 texCoord;
	vec3 normal;
} VertexOut;

void main() {
  gl_Position = p3d_ModelViewProjectionMatrix * vec4(vertex, 1.0);
  //VertexOut.texCoord = p3d_MultiTexCoord0;
  VertexOut.texCoord = texCoord;

And my test fragment shader:


#version 150

in VertexData {
	vec2 texCoord;
	vec3 normal;
} VertexIn;

uniform sampler2D tex;

void main() {
  //gl_FragColor = texture2D(tex, VertexIn.texCoord);
  gl_FragColor = vec4(VertexIn.texCoord, 1, 1);

But I use VertexOut.texCoord = p3d_MultiTexCoord0 or VertexOut.texCoord = texCoord, my code both are wrong.

This is my use p3d_MultiTexCoord0:

This is my use texCoord:

It should be “in vec2 p3d_MultiTexCoord0;” (not a uniform) and you should then remove the “in vec2 texCoord;” which would conflict if it were actually bound to anything.

Thank you rdb!

But I encountered a new problem: [url][SOLVED] About texture with GLSL]