Jump to content

UVs from 3d max


Recommended Posts


have question regarding 3d max export.

I created rectangle plane in 3d max. Than tried to add custom shader material to it, and realised that uv.y is out of [0-1] range.

void main(void) {
    if(vUV.y > 0.5) {
        gl_FragColor = vec4( 1.0, 1.0, 0.0, 1.0);
    } else {
        gl_FragColor = vec4( 1.0, 0.0, 1.0, 1.0);

After checking exported babylon file saw that uv.x is from 0-1 but uv.y 1-2


Some scaling could be applied?

Is that desired behaviour ?


Link to comment
Share on other sites

It is the desired behavior. You need to turn wrapping on in the texture (wrapU and wrapV) to deal with these sets of UVs


In your case just use a modulo to get the value between 0  and 1

Link to comment
Share on other sites

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.

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.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...