mirror of
https://github.com/GayPizzaSpecifications/voxelotl-engine.git
synced 2025-08-02 13:00:53 +00:00
fail in a non crashy way for big chunk model generation
This commit is contained in:
parent
cfb985cff6
commit
f77b64cc85
@ -7,7 +7,8 @@ struct ChunkMeshBuilder {
|
||||
for side in [ Side.left, .right, .down, .up, .back, .front ] {
|
||||
let globalPos = chunk.origin &+ position
|
||||
if case .air = world.getBlock(at: globalPos.offset(by: side)).type {
|
||||
let orig = UInt16(vertices.count)
|
||||
//FIXME: use 32 bit indices for really big chunks
|
||||
let orig = UInt16(truncatingIfNeeded: vertices.count)
|
||||
vertices.append(contentsOf: cubeVertices[side]!.map {
|
||||
.init(
|
||||
position: SIMD3(position) + $0.position,
|
||||
|
Loading…
Reference in New Issue
Block a user