Does everyone just alpha blend there sprites now ?

BlitzMax Forums/BlitzMax Beginners Area/Does everyone just alpha blend there sprites now ?

In OpenGL terms at least, here's some things to keep in mind:

Having the ability to draw masked and having the ability to draw with alpha blending consumes the same amount of video ram regardless. A 24-bit RGB image is going to have an 8-bit alpha channel regardless of whether you use it to alphablend or to do masking. The main difference between masking or alpha blending is how the alpha channel data is used. You aren't saving any memory by just using masking, but you are saving some speed...

Doing alpha blending is slower because it has to switch on `blending` in the graphics pipeline, which means reading the content of the destination pixels and combining them with the incoming value for the new pixels using the source image, the ratio of which is determined by the alpha channel value. When you just do masking, blending is not required, and instead the `alpha test` is used to just look at the incoming alpha channel value and see if it meets a given threshold (ie 0.5 (127)). It doesn't require reading the backbuffer or doing a crossfade with blending. So masking is usually faster than alphablending but then you only get `either on or off` behavior rather than multiple levels of transparency (as in antialiasing). But alphablending is generally nicer and more flexible. You technically can actually do both masking and alphablending at the same time - you could accept only pixels with alpha values >0.5 (half intensity) and then alpha-blend those pixels with the destination. But that's not part of the standard Max commands.