problem with texture tile

Started by MichaelJPCT, January 05, 2016, 10:18:44 AM

Previous topic - Next topic

MichaelJPCT

i found texture tile to be not precisely repeating:
i have a plane created by

plane=ExtendedPrimitives.createPlane(4096,20); ExtendedPrimitives.transformUVCoords(plane,0,0,256,256,0,0);
tex.setClamping(0); plane.setTexture(tex); plane.compileAndStrip(); plane.build();

texture image size is 256x256.
say i look at position (0,0,0) of the plane, i see some part of the texture. then i translate the plane to (4096,0,0), in theory i should see the same texture, but i saw the texture changed. no matter what parameter i put into the transformUVCoords call. i don't know why.

MichaelJPCT

problem solved. i found the scale parameter should not be power of 2, but should be (20 * n)
this works correctly now: ExtendedPrimitives.transformUVCoords(plane,0,0,240,240,0,0);

EgonOlsen

I wasn't even aware that this method exists...(ExtendedPrimitives is a third party addition, not my own stuff)... ;D