mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 11:17:05 -04:00
Fix small mistake that messed up texturing.
This commit is contained in:
parent
3d19feae42
commit
3c638017f9
@ -69,7 +69,7 @@ const vec3[6] normals = vec3[6](
|
||||
);
|
||||
|
||||
int getVoxel(ivec3 voxelPos) {
|
||||
int voxelIndex = (voxelPos.x) | (voxelPos.y << 4) | (voxelPos.z << 8);
|
||||
int voxelIndex = (voxelPos.x << 8) | (voxelPos.y << 4) | (voxelPos.z);
|
||||
int shift = 4*(voxelIndex & 7);
|
||||
int arrayIndex = voxelIndex >> 3;
|
||||
return (int(voxelModels[modelIndex].bitPackedData[arrayIndex])>>shift & 15) - 6;
|
||||
|
Loading…
x
Reference in New Issue
Block a user