function packCover
universe/src/cover.ts:513
The channels as bytes, in the order the vertex attributes carry them: the
first four in terrainCover, the second four in terrainCover2.
Math.round rather than a truncating multiply, because the ends have to
survive: a cover of exactly 1 truncated by value * 255 | 0 is 255 only if
the multiply lands on it, and a 254 where the field says "wholly ice" is a
one-part-in-255 seam wherever a fully covered patch meets one that rounded
the other way.
The last two bytes are written as zero and read by nothing. A vertex buffer stride has to be a multiple of four, so six channels cost eight bytes whatever is put in them, and the two spare are where the canonical slope the deposits still want will go.
- coverSurfaceCover
- Undocumented
- outUint8Array
- Undocumented
- atnumber
- Undocumented
Returnsvoid