UV coordinates maaping in weird patterns

Hello, I have a grid of 32*32 quads each made of two triangles of the XY plane (or z-forward, not sure which is correct) even though each quad has the same uv mapping i get this monstrosity forming patterns on a macro scale but gibberish on a small scale my only guess is i messed up during getting the uv coordinates but other than that i have no other ideas


forgot to mention this is what the texture should look like on each quad

close-up:

Hi!
Would be cool to provide a working live code example, that demonstrates the issue (jsfiddle, codepen, codesandbox etc.)
Nobody, except you, knows the algorithm you set UV on quads.

oh sorry about that, will get on it :slight_smile:

1 Like

huh this is odd… jsfiddle is returning the error ’ * “209:16 Uncaught TypeError: geometry.setAttribute is not a function”’

BufferGeometry.addAttribute() has been renamed to BufferGeometry.setAttribute() version 110

due to JSfiddle not being cooperative here is the code in question indexes.push(vertexFromCoords(x+1,y,z+1),vertexFromCoords(x ,y ,z+1),vertexFromCoords(x,y+1,z+1));
indexes.push(vertexFromCoords(x+1,y+1,z+1),vertexFromCoords(x+1,y,z+1),vertexFromCoords(x,y+1,z+1));
uvs.push(1,0,0,0,0,1);
uvs.push(1,1,1,0,0,1);

note that this is for the Z+ face