[SOLVED] About texture with GLSL

This is my model:

But this is my game:

I used shader, here is my vshader, gshader and fshader:

//GLSL

#version 150 core

//vshader

uniform mat4 p3d_ModelViewProjectionMatrix;
in vec2 p3d_MultiTexCoord0;
in vec4 p3d_Vertex;

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

void main() {
  gl_Position = p3d_ModelViewProjectionMatrix * p3d_Vertex;
  VertexOut.texCoord = p3d_MultiTexCoord0;
}
//GLSL

#version 150

//gshader

in VertexData {
	vec2 texCoord;
	vec3 normal;
} VertexIn[3];

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

void main() {
	for(int i = 0; i < gl_in.length(); i++)
	{
		gl_Position = gl_in[i].gl_Position;
		VertexOut.normal = VertexIn[i].normal;
		VertexOut.texCoord = VertexIn[i].texCoord;
		EmitVertex();
	}
	EndPrimitive();
  
    gl_Position =  (vec4(-0.1,0,0.0,0.0) + gl_in[0].gl_Position);  
	VertexOut.texCoord = vec2(0,0);
    EmitVertex();  
  
    gl_Position =  (vec4(0.1,0,0.0,0.0) + gl_in[0].gl_Position); 
	VertexOut.texCoord = vec2(1.0,0); 
    EmitVertex();  
  
    gl_Position =  (vec4(0,5,0.0,0.0) + gl_in[0].gl_Position);  
	VertexOut.texCoord = vec2(1.0,1.0); 
    EmitVertex();  
    
    EndPrimitive(); 
}
//GLSL

#version 150

//fshader

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

uniform sampler2D tex;

void main() {
  gl_FragColor = texture2D(tex, VertexIn.texCoord);
}

en … The “tex” seems to come from another model.

It has no way of knowing which texture you would like to refer to using your “uniform sampler2D tex;” declartion. Either use p3d_Texture0 as texture name and Panda will automatically assign it or supply the texture using setShaderInput(“tex”, myTexture)

Thank you!