[AD] PTEX function in C version

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I noticed that ASM functions don't do *true* perspective correct texture
mapping : they use the scanline subdivision algorithm which is less accurate
and much more more faster than the true perspective algorithm.Scanline
subdivisions are 4 pixels width which is a good compromise between speed and
accuracy.
Nevertheless, C functions for texture mapping did *true* perspective mapping
(2 floating point divisions every pixel : it's slooowww). So, in order to be
compliant with ASM functions, here is a patch which insert the scanline
subdivision algorithm into the cscan.h file. C perspective texture mapping
functions are then 300% faster...

Bertrand.

Attachment: ptex.diff
Description: Binary data



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/