esnho Posted January 7, 2016 Share Posted January 7, 2016 Hello,how is possible to change the UV wrapping mode in a shaderMaterial?I'm tryng to change it in the texture but it seems it's not working.I'm using this line of code trying to achieve a mirror sampling but is not working: texture.updateSamplingMode(BABYLON.Texture.MIRROR_ADDRESSMODE);Thank you very much Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 7, 2016 Share Posted January 7, 2016 This should work. Can you provide a playground? Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted January 7, 2016 Share Posted January 7, 2016 hi i don't sure about understand what you need but in shader material you can change UV like this vec3 textureColor = texture2D( texture , UV); so mirror result is vec3 textureColor = texture2D( texture , vec2(1.-UV.x , 1.-UV.y)); 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.