decrease memory usage by storing chunk colours as 8bit (at the cost of slower mesh generation)

This commit is contained in:
2024-09-09 02:34:04 +10:00
parent 53e1f9cc7e
commit d4b1377238
4 changed files with 6 additions and 6 deletions

View File

@ -13,7 +13,7 @@ struct ChunkMeshBuilder {
.init(
position: SIMD3(position) + $0.position,
normal: $0.normal,
color: SIMD4(color),
color: SIMD4(Color<Float>(color).linear),
texCoord: $0.texCoord)
})
indices.append(contentsOf: sideIndices.map { orig + $0 })