Transparent blocks
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user