You are not logged in.
Pages: 1
A GMC member riddled me with questions about blend modes and the sprite_set_alpha_from_sprite
function. Answering them involved a number of tests that clarified and confirmed some things for me. I'll just post here what I told him.
For clarity of the following, let us say that using
sprite_set_alpha_from_sprite(sprite1,sprite2)
alters the alpha ofsprite1
using the pixels ofsprite2
. From my GM8 tests it appears that only the RGB channels of thesprite2
are used to calculate the alpha applied to thesprite1
. The alpha ofsprite2
has no effect on the calculated alpha. When the calculated alpha is applied tosprite1
, the existing alpha ofsprite1
is multiplied by it, rather than replaced by it. If the alpha ofsprite1
is0.7
, and the calculated alpha fromsprite2
is0.3
, the resulting alpha ofsprite1
will be0.21
.
I have not yet tested the background-based variant of this function, nor earlier versions of Game Maker. I presume they all work identically.
Abusing forum power since 1986.
Offline
Pages: 1