replace expensive srgb conversion with a simple gamma ramp in chunk mesh builder

This commit is contained in:
2024-09-09 03:02:31 +10:00
parent d4b1377238
commit d520623492
2 changed files with 15 additions and 3 deletions

View File

@ -13,7 +13,7 @@ struct ChunkMeshBuilder {
.init(
position: SIMD3(position) + $0.position,
normal: $0.normal,
color: SIMD4(Color<Float>(color).linear),
color: SIMD4(Color<Float>(color).pow(2.2)), //FIXME: Better sRGB approximation when I can be bothered
texCoord: $0.texCoord)
})
indices.append(contentsOf: sideIndices.map { orig + $0 })