Skip to content
Myr

clarify what "largest memory usage" case of vheight is

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Barrett · committed by Sean Barrett · parent 3629a60 · Browse files · 1 file+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:stb_voxel_render.h+4 added-4 removed
1017 unmodified lines
1018// look, choose the edge based on actual vertex heights.1019//1020// The four vertex heights can come from several places. The simplest1021// encoding is to just use the 'vheight' parameter which stores four1022// explicit vertex heights for every block. This allows total indepdence,1023// but at the cost of the most memory usage. Encode this with1024// STBVOX_MAKE_VHEIGHT(vh_sw, vh_se, vh_nw, vh_ne). These coordinates1025// are absolute, not affected by block rotations.1022// explicit vertex heights for every block. This allows total independence,1023// but at the cost of the largest memory usage, 1 byte per 3D block.1024// Encode this with STBVOX_MAKE_VHEIGHT(vh_sw, vh_se, vh_nw, vh_ne).1025// These coordinates are absolute, not affected by block rotations.1026//1027// An alternative if you just want to encode some very specific block1028// types, not all the possibilities--say you just want half-height slopes,1029// so you want (0,0,1,1) and (1,1,2,2)--then you can use block_vheight
2615 unmodified lines