mirror of
https://github.com/GayPizzaSpecifications/voxelotl-engine.git
synced 2025-08-03 13:11:33 +00:00
decrease memory usage by storing chunk colours as 8bit (at the cost of slower mesh generation)
This commit is contained in:
@ -19,11 +19,11 @@ struct TerrorTowerGenerator: WorldGenerator {
|
||||
let gradient = simd_length(fpos.xz) / 14.0
|
||||
let value = self.noise1.get(fpos) - 0.25
|
||||
return if gradient + value < threshold {
|
||||
.solid(.init(
|
||||
.solid(Color<UInt8>(.init(
|
||||
hue: ((fpos.x * 0.5 + fpos.y) / 30.0) * 360.0,
|
||||
saturation: 0.2 + noise2.get(fpos) * 0.2,
|
||||
value: 0.75 + noise2.get(SIMD4(fpos, 1) * 0.25)
|
||||
).linear)
|
||||
)))
|
||||
} else {
|
||||
.air
|
||||
}
|
||||
|
Reference in New Issue
Block a user