add voxel regions layer chunk structure specification
This commit is contained in:
parent
ea3d8b2c08
commit
3d3679c8b1
26
doc/specs/region_voxels_chunk_spec.md
Normal file
26
doc/specs/region_voxels_chunk_spec.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Voxels Chunk (version 1)
|
||||||
|
|
||||||
|
Voxel regions layer chunk structure.
|
||||||
|
|
||||||
|
Values are separated for extRLE8 compression efficiency.
|
||||||
|
|
||||||
|
File format BNF (RFC 5234):
|
||||||
|
|
||||||
|
```bnf
|
||||||
|
chunk = (65536*byte) block indices (most significant bytes)
|
||||||
|
(65536*byte) block indices (least significant bytes)
|
||||||
|
(65536*byte) block states (most significant bytes)
|
||||||
|
(65536*byte) block states (least significant bytes)
|
||||||
|
|
||||||
|
byte = %x00-FF 8 bit unsigned integer
|
||||||
|
```
|
||||||
|
|
||||||
|
65536 is number of voxels per chunk (16\*256\*16)
|
||||||
|
|
||||||
|
## Block state
|
||||||
|
|
||||||
|
Block state is encoded in 16 bits:
|
||||||
|
- 0-2 bits (3) - block rotation index
|
||||||
|
- 3-5 bits (3) - segment block bits
|
||||||
|
- 6-7 bits (2) - reserved
|
||||||
|
- 8-15 bits (8) - user bits
|
||||||
Loading…
x
Reference in New Issue
Block a user