pxp_color_key
Overview
The PXP color key project shows how to use the AS color key together with the alpha blend. In this example, the AS pixel format is RGB565, the global alpha is used for alpha blend.
The PS frame buffer is like this:
+———————————+———————————–+ | | | | | | | | | | | | | | | | | | | | | | BLUE | RED | | | | | | | | | | | | | | | | | | | | | | | | | | | | +———————————+———————————–+
The AS frame buffer is square like this:
+---------------------------------+
| |
| |
| GREEN |
| |
| +---------------+ |
| | | |
| | | |
| | | |
| | YELLOW | |
| | | |
| | | |
| | | |
| +---------------+ |
| |
| |
| |
+---------------------------------+
The AS is placed in the center of the screen. The AS color key is set to yellow color, the blend alpha value is set to 128. So in the output frame buffer, the originally yellow region shows PS color, the green region is blend with PS color. The screen shows the output frame like this:
+————-+——————-+——————-+—————+ | | | | | | | HALF CYAN | HALF YELLOW | | | | | | | | | | | | | | +——–+———+ | | | | | | | | | | | | | | | | | BLUE | | BLUE | RED | | RED | | | | | | | | | | | | | | | | | | | | | | | | +——–+———+ | | | | | | | | | | | | | | | | | | | | | | | | | | | +————-+——————-+——————-+—————+