FrenkelS / Doom8088

Doom for 16-bit DOS computers
GNU General Public License v2.0
140 stars 5 forks source link

Flat span performance improvement by completely ignoring visplanes #35

Open mindbleach opened 7 months ago

mindbleach commented 7 months ago

By drawing solid color directly instead of searching for / adding to / rendering out an untextured visplane, overall performance with FLAT_SPAN is 10% faster. The memory used by visplanes (and visplane functions) is no longer required. This commit only reduces the number of visplanes allocated, though.

Additionally: unrolling R_DrawColumnFlat is 5% faster.

Additionally: a naive loop writing individual bytes was faster than an unrolled loop calling R_DrawColumnPixel. An unrolled loop writing individual bytes was faster still.

These are 32-bit Open Watcom results, in DOSbox-X, acting as a 25 MHz 386DX. Nonetheless it has gone from 14 FPS to 19 FPS on demo3.

FrenkelS commented 7 months ago

I've removed all visplanes. The sky is rendered as a regular texture.