Transparent blocks

This commit is contained in:
brausjonas
2022-05-15 21:49:50 +02:00
parent 61b6eb2ec3
commit 11c398d9e5
5 changed files with 42 additions and 6 deletions
@@ -81,6 +81,19 @@ public class Chunk
triangleIndex++;
}
AddUV(textures[f]);
}
else if(world.GetBlockID(new Vector3(x + Data.faceChecks[f].x + chunkPosition.x * Data.chunkWidth,
y + Data.faceChecks[f].y,
z + Data.faceChecks[f].z + chunkPosition.z * Data.chunkWidth)) == 6)
{
for (int v = 0; v < 6; v++)
{
vertices.Add(Data.vertices[Data.triangles[f, v]] + new Vector3(x, y, z));
triangles.Add(triangleIndex);
triangleIndex++;
}
AddUV(textures[f]);
}
}