by mankrip » Thu Apr 17, 2014 11:28 pm
MDL models features polygons that always have 3 edges (i.e. triangles), but the polygons in BSP models (i.e. faces) can have many more. As I understand, D_DrawPoly was made to draw BSP faces on the screen, similarly to how MDL triangles are rendered but most likely featuring perspective correction.
IIRC, the code to get D_DrawPoly to run seems to be incomplete. I've tried to enable it a few times without success.
Anyway, the difference would certainly be that it used absolutely no optimization to prevent overdraw. I'm sure D_DrawPoly used Z buffer checks for each pixel instead, just like the MDL triangle renderer does. This also means that the BSP renderer didn't render the Z buffer values of BSP faces's pixels in a separated step at the time.
I suspect that translucent BSP faces in the software renderer of Quake 2 are rendered in a similar way.
And I was also aiming to figure out how to bypass the whole optimized rendering code for BSP faces, so specific BSP faces could be rendered individually as fast as possible. That would allow for "fence textures", and would probably help to make translucent water a bit faster in some areas. I'd still use the optimized BSP code on translucent BSP entities though, because I don't like when translucent entities overdraw themselves.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
/ /