Previous | Next --- Slide 33 of 63
Back to Lecture Thumbnails
echo

From my understanding, the original color is a matrix of vectors with one vector for each pixel. And the alpha channel is a matrix is a matrix of values, 0 for black(100% transparency) and 1 for white(0% transparency).

keenan

@echo Yep, that's a totally reasonable way of thinking about it. When it comes to actually encoding it in memory, there are a few ways to do it. For instance, you could store the colors and alpha values as interleaved values RGBARGBARGBA... or you could store them as contiguous chunks RRRR...GGGG....BBBB....AAAA....

(For reasons I don't entirely understand, many hardware implementations actually use the ordering BGRA)