Eruanna wrote:ZDoom's polymost renderer was going to handle that to some extent, as well - maybe, someday, I should resurrect that. (Necrocoding? >_>) But in the end, there was a reason why it was abandoned, although it's nothing I can't learn from if I look at it, I am sure.
Pretty sure the reason why polymost was dropped is because no one wanted to write texture mapping code, as original polymost didn't need it (it outputted triangles into OpenGL).
I mean, I don't think it's related to the fact that there are no rendering tricks in polymost.
Eruanna wrote:... but then you won't easily get the sprite non-clipping.
I've once been thinking of this algorithm (for each subsector, assuming things are drawn strictly back to front):
1. draw floors and ceilings, don't write into Z-buffer
2. enable Z-buffer writing
3. for each 2-sided wall with differing heights at it's sides, draw infinitely tall invisible (but solid in Z-buffer) quad starting at real height and up (ceiling) or down (floor); this is used to clip solid geometry against ledges
4. draw solid geometry (top/bottom textures of 2-sided walls, 1-sided walls)
5. draw 3D floors
6. draw non-solid geometry (sprites, masked walls)
Didn't try, but it should work for Doom-like sprite handling where floors don't clip things directly.
Walls will still clip though, but pretty sure this is possible to fix with Z-buffer hacks as well (or just using polymost method, where you calculate clipping manually and then just output polygons into OpenGL for rendering).
And either way walls aren't that important compared to planes.
P.S. just saying, the above list should work even on the most ancient OpenGL versions, so not sure why it wasn't implemented and instead esoteric smart clipping logic was introduced.
Especially when people were using glBegin/glEnd actively and drawcall optimization was nonexistent.
Would be nice to have some person that understands OGL comment this.