3 ms·
The way you would do this in practice would be: 1. Start with the abstraction that every shape is actually a group of one or more sub-shapes. (Well-understood
by munchbunny 10y ago
The way you would do this in practice would be:
1. Start with the abstraction that every shape is actually a group of one or more sub-shapes. (Well-understood and pretty much universally applied abstraction.)
2. Pre-process all of your geometry so that you won't get cycles of occlusion, which is the corner case the author mentioned. If you do have a cycle, then subdivide and group as mentioned in #1.
3. Use some fast but crude algorithm to preemptively reject non-visible shapes.
4. Apply painter's algorithm. to "probably visible" shapes.