Jump to content

Recommended Posts

Posted

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 ;

Stop toying and make games

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...