Yea I forgot about alpha test. The overlay you missed my point completely.
.5*healthbar + .5*your_background texture == .5*your_background texture + .5*healthbar
If you put the background drawn first, without alpha blending, it will be in the background. If you blend your health bar on top, the amount of pixels you are blending is only the health bar pixels. (A lot less pixels blending).
Your original image, is the background blended on top, or the healthbar blending on top?....... the user won't know because its the same result. This doesn't hold true for 99% of games, but if that is the extent of your games art design, you can pull off doing this order instead(drawing BG without blending first, then applying blending with the BG). The other 99% of games don't work because usually stuff is drawn in front of stuff behind stuff etc, where they would blend and blend and blend, but since you have only BG blending with really 1 sprite at a time(at each pixel), it doesnt matter which of the 2 images is the SRC and which is the DST. Same math.
dpadam450Member Since 18 Nov 2005
Offline Last Active Today, 04:05 PM