logoalt Hacker News

vardump10/02/20241 replyview on HN

Agreed on other counts except for FPU.

Quake performs one FPU divide per pixel for texture mapping perspective correction.

ARM7TDMI does not have any kind of divide, so perspective correction is tricky, even if it's just 120 px horizontally.


Replies

marlone9310/02/2024

Afaik, Quake does not do one divide per pixel, it is in steps of 8 pixels (see dscan.c in winquake). Yes, there is non divide but instead of taking hundreds of cycles, tables and other approximations could be used. Of course, div/vdiv which take only 14 cycles or less are a strong boost on CM4/33.

show 1 reply