Hersir Posted June 20, 2018 Share Posted June 20, 2018 Hi, 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 [0,1,1,1,1,2,1,2,0,2,0,1] Some scaling could be applied? Is that desired behaviour ? Thanks. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted June 20, 2018 Share Posted June 20, 2018 Adding @noalak ? Quote Link to comment Share on other sites More sharing options...
Guest Posted June 21, 2018 Share Posted June 21, 2018 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 Quote Link to comment Share on other sites More sharing options...
Hersir Posted June 22, 2018 Author Share Posted June 22, 2018 @Deltakosh thanks for clarifications Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.