Close

Alpha-blending optimization

A project log for Anacon-xC

Analog video console based on XMOS xCore with VGA/NTSC/PAL video output and PS/2 mouse/keyboard input. 32-bit scanline-based rendering.

kevin-h-pattersonKevin H. Patterson 03/03/2017 at 01:530 Comments

Spent some time last night coding a circle-drawing "Rect" with anti-aliased edges. Rolled in a super fast LUT-based integer square root method, and optimized the daylights out of the Pixel::Blend() code. I now have a 64-bit wide calculation in there that handles all three color channels in single vector operations. Should be even faster on XS-200, which has some native 64-bit math. Even so, the 64-bit variant outperformed by best 32-bit incarnation on XS-1 by a small margin.

Discussions