Z-Buffer Implementation In Flash Alchemy

One way to perform a perspective correct texture map is via an actual calculation of the z-value at every pixel of the triangle to be rendered. That made me wonder if someone has implemented a simultaneous texture mapping and z-buffer in Flash using Alchemy. It seems that no one has done that yet so I decided to put together a demo (to code it as fast as possible I used PTPOLY1.CPP for the triangle rendering).

The demo shows 100 random (intersecting) triangles textured with a Lena image and is rendering at about 30FPS on my Windows 7/Intel Xeon 5160.

Grab the source code!

  • http://blog.badnoob.com/index.php Bastian Schneider

    Basing on the idea to perform perspectively correct texture mapping supported by a framebuffer within flash, we’ve developed a complete 3D Engine using Alchemy. The performance results are great, checkout http://blog.badnoob.com/index.php/topic,31.0.html