Join GitHub today
Move from Painter's algorithm to actually removing hidden voxels #5
Tricky but I'm sure it's possible. Could you ask the projection if a voxel is hidden entirely by another one or set of them? How would you know what question to ask?
We could also try reverse painter's, where we draw the highest first and then don't draw anywhere we've drawn.
Maybe we can ask a perspective to do a filter pass for us? If we could eliminate even just direct matches (perspective gives the same coordinates and the same or smaller size) that'd make a big difference.
https://en.wikipedia.org/wiki/Z-buffering could be effective, too. The depth buffer's going to take up a lot of space, but such may be unavoidable.
Depending on how it's structured, there may be some overdraw, but there won't be a problem of underdraw, so if you sort your data right then it mostly works itself out, skipping costly rendering. It'd still be nice to fully remove voxels, though.