I’m trying to apply a texture over a wall of cubes like this: https://playground.babylonjs.com/#V9FSLG#1
As you can see, the whole image is displayed, as each cube gets a little part of the texture. This is the correct look.
But now i’m trying to do the same thing with the SPS, and it ‘kind of’ works, but each 2nd row is inverted. I’m fairly sure the math is correct, but I suspect it has something to do with how textures are applied on the mesh. https://playground.babylonjs.com/#US03I4#5
Yeah I tried using UV faces and any setting I could find regarding this, this might just be a actual bug. I can’t make any reason why only every 2nd row would be inverted…
I would say that there is something wrong in the way how you lay your cubes. You should lay them in the same order as you map the uvs.
I have changed the coordinates for the front side and it looks ok (adding counters instead of subtracting and changed them). I would also lay all sides the same way and then rotate particles for each side around pivot point.
I did exactly as you described regarding pivot and rotating, but it increases complexity quite alot, because you lose the positioning and everything needs to be adjusted and computed via that pivot.
I’m thinking ill try to create a separate shape, and swap the faces, and then apply the texture. Ill see if it works…