Improve floor sprite rendering
This PR does a couple of things:
- Removes some unused texture mapping code from the edge rasterizer. The software renderer doesn't need it, since it does the texture mapping itself.
- Projects floor sprites immediately after the parent sprite gets projected, so that the renderer knows how much "space" it takes on the screen. This may improve sorting performance, but I didn't check.
- Significantly improves the issue where floor sprites disappear if they are partially behind the camera. This is accomplished by splitting the polygon if it intersects the view frustum. Note that this may cause some imprecision of its own, depending on the size of the polygon.
- Attempts to split sprites vertically if they intersect other floor sprites. (TODO: It's possible to make it look more accurate with sloped floor sprites, but I left it out for now.)
- Maybe improves sorting. Again, didn't really check, but the above already reduces sorting cope.
For comparison, this is how vanilla deals with the last two cases:
The floor sprite disappears earlier than it should, and it can only render entirely above or under the other sprite.
This is how this PR deals with the last two cases instead:
The floor sprite does not disappear, and the other sprite is able to partially render above or under the polygon.
Since this is closer to what OpenGL renders, here's a comparison with it:
GIF recording begins with the software renderer, and then alternates between OpenGL and the software renderer.
Edited by Lactozilla