Expand description
share preliminary surface levels across chunks
quart-aligned lookups agree on cached and raw paths, so neighbors can reuse them
Structsยง
- Preliminary
Surface Store - shared surface levels, one atomic word per entry reads see a complete entry or miss; collisions just mean recomputing
Constantsยง
- AXIS_
BITS ๐ - 512 quarts per axis, enough for a 128-chunk span without slot collisions
- AXIS_
MASK ๐ - COORD_
BITS ๐ - Packed slot layout:
valid (1) | quart_x (24) | quart_z (24) | level (15). - COORD_
MASK ๐ - COORD_
MAX ๐ - COORD_
MIN ๐ - LEVEL_
BITS ๐ - LEVEL_
MASK ๐ - LEVEL_
MAX ๐ - LEVEL_
MIN ๐ - VALID ๐
Functionsยง
- pack_
level ๐ - pack the level if it fits
- unpack_
level ๐ - unpack the level, keeping its sign