Texture is being stretched when offsetting

Hey, so I’m trying to offset texture but it gets stretched

here’s the code

const {nodes, materials} = useGLTF(‘/shirt_baked.glb’)

const logoTexutre = useTexture(frontLogoImg?.contents || './test.png',  )
const backTexture =  useTexture(backLogoImg?.contents || './test.png')
logoTexutre.offset.set(offSetXFront/100, offSetYFront/100)

How can I fix this?

image

The ratio could be different depending on resolution; for example, if you divided it by 100, maybe the test.png resolution is 100x200, so it appears stretched; the correct ratio would be 100/200 = 1/2 in this example.

If the resolution (L x B) is not equal, it might appear stretched. Hope this helps.

1 Like