Closed deathcap closed 10 years ago
Hm, I'm not sure if the side calculation is correct, it seems side
passed to voxelTexture
is always either 0 or 3 (if flipped). Testing texturing each of the six faces differently, but only the right-facing face (side 3) has a different texture, all others use the side 0 index:
Fixed =) d+(flip?3:0)
Thanks! Merged
Currently, the texture index is extracted directly from the voxel ID (voxel&0xff), so all faces have the same texture. This PR adds an optional
voxelSideTextureIDs
2d ndarray argument tocomputeMesh()
, which can be used to assign different textures to each of the sides.Using this in https://github.com/deathcap/voxel-stitch/commit/c05021b5efe433da8a935f8a8c58d049021315e8