Closed btipling closed 4 months ago
Given the packed voxels struct idea in https://github.com/btipling/zig-tests/blob/main/packed_to_u32_to_u8.zig empty voxels can have lighting! Fill empty voxels with lighting and then use the adjacent blocks light level to light the surface of non empty voxels.
Add opacity level instead of selected
const Voxel = packed struct { block_id: u8, // 256 different block types, andorment_id: u7, // 128 different adornments up_x: i2, up_y: i2, up_z: i2, health: u4, lighting: u4, opacity: u3, };
low opacity blocks can get lighting from adjacent lit bocks to emit themselves
This is done
Given the packed voxels struct idea in https://github.com/btipling/zig-tests/blob/main/packed_to_u32_to_u8.zig empty voxels can have lighting! Fill empty voxels with lighting and then use the adjacent blocks light level to light the surface of non empty voxels.
Add opacity level instead of selected
low opacity blocks can get lighting from adjacent lit bocks to emit themselves