Well, bmap_blit/_blitpart is a function that overwrites the bmap's pixels (I guess it uses something like memcpy to copy the pixel's color values).
draw_quad, however, seems to use some kind of blending. It has to, since it supports an 'alpha'-parameter as blending opacity and does produce correct results when rendering directly onto the screen.

In my example above, the rgb-channels are blended correctly but the alpha channel is not.

I'm not sure if draw_quad uses something similar to a shader, but I know that you get the same, incorrect blending when using the wrong values for DestBlend and SrcBlend in a shader's pass.

The problem is really just related to draw_quad in combination with bmap_rendertarget.
When using panels with different layers, this problem does not occur.
Neither does it when draw_quad is being used to draw an image directly onto the screen (without bmap_rendertarget).

Edit: Thinking about it, the reason why it works when rendering onto the screen is most likely because the screen's buffer doesn't use an alpha channel, so there's nothing to mess up.
...which means that bmap_rendertarget is probably not the culprit here, it's the blending-op that 2D-drawing-functions use.


POTATO-MAN saves the day! - Random