My material has a uvTransform matrix include translation and rotation made by other software, and the repeat\rotation\offset will be changed by users based on my modification. I’m not using
uvTransform matix or
Three.js made for me because my textures are reused.
Now I’m using this in
vUv = (userUvTransform * vec3(uv, 1)).xy; vUv = (myUvTransform * vec3(vUv, 1)).xy;
Before I allow users to modify
offset, it works fine as it’s a matrix multipliction of
But now users can modify offset too according to PM’s demand, I think this can’t work as it is
Should I make a tanslation matrix separately and multiply them by
vUv = (userUvTransform * vec3(uv, 1)).xy; vUv = (myUvTransform * vec3(vUv, 1)).xy; vUv = (translationUvTransform * vec3(vUv, 1)).xy;
Or should I detach repeat\offset information from
myUvTransform and make a new matrix with user’s modification? If that, how to detach them?