I tried to use second UV from imported FBX, but it does not work ?
Vertex code :
//Attributes
...
in vec2 vertex_texcoords0;
in vec2 vertex_texcoords1;
...
//Outputs
out vec4 ex_color;
out vec2 ex_texcoords0;
out vec2 ex_texcoords1;
...
void main()
...
ex_texcoords0 = vertex_texcoords0;
ex_texcoords1 = vertex_texcoords1;
Fragment :
//Uniforms
uniform sampler2D texture0;//diffuse map
uniform sampler2D texture1;//lightmap
...
//Inputs
in vec2 ex_texcoords0;
in vec2 ex_texcoords1;
....
//Modulate blend with diffuse map
outcolor *= texture(texture0,ex_texcoords0) ;
outcolor *= texture(texture1,ex_texcoords1) *0.5 ;