Voxel Space(s-macke.github.io) |
Voxel Space(s-macke.github.io) |
For 1992, this was mind-boggling though.
Wait why do they say painter's algorithm. Comanche and other such voxel terrain engines went front to back and never had overdraw.
it tracks how tall each columns write is so you can use it to only write the diff between it and the voxel behind it, skipping writing anything at all if the voxel behind is shorter than the current height.
So once you're done rendering front-to-back, you've got a y-buffer of highest-writes you can slap your blue sky across from highest-to-screentop on each line, avoiding the need to clear by write the sky to the full screen before starting the render.