Alright can someone tell me what I am missing here?
I have a surface being draw to the application surface. The surface being drawn is cleared black with a .5 alpha. If I draw this surface without blend modes the black region looks as it should. Basically it darkens the screen a little.
Now when I use this blend mode (I need the multiply blend for additive lighting):
All the black areas revert to full alpha and hide everything. In my mind the alpha should be:
(0.5 * 1) + (1*0) = .5
So it should work correctly. However I even tried this code:
Where the alpha should equate to:
(0.5 * 0) + (1*0) = 0
and yet the black portion is still at full alpha. What am I missing here?
I have a surface being draw to the application surface. The surface being drawn is cleared black with a .5 alpha. If I draw this surface without blend modes the black region looks as it should. Basically it darkens the screen a little.
Now when I use this blend mode (I need the multiply blend for additive lighting):
Code:
gpu_set_blendmode_ext_sepalpha(bm_dest_color, bm_zero, bm_one, bm_zero )
(0.5 * 1) + (1*0) = .5
So it should work correctly. However I even tried this code:
Code:
gpu_set_blendmode_ext_sepalpha(bm_dest_color, bm_zero, bm_zero, bm_zero )
(0.5 * 0) + (1*0) = 0
and yet the black portion is still at full alpha. What am I missing here?