another try to get the head around it:
in default blend mode particle colors and background colors (what already is in the renderer) are blended according to the alpha value of the particle.
C = Cparticle * Aparticle + Cbackground * (1-Aparticle)
so if alpha of the particle in that point is 70% = 0.7 then the color output is determined by 70% of the particle color and by 30% by the backgroundcolor.
that’s independent of the alpha stored in the background.
however i would say that’s what you want in most cases.
if you now want to have a transparent texture is more difficult.
do you want to have the alpha multiplied into the color like above? then all the colors are already mixed in the way you want. what exactly should happen with the alpha channel? should t be 1 for all parts where drawing has occurred and 0 for the holes in between the particles?
if you say “no, it should be more clever”!
then maybe you don’t want to mix/composite/blend the colors when drawing into the texture, but later when using the texture?
- so when filling the texture just overdraw always and therefore write new colors and alpha values into the texture at the overdrawn areas. use a blend (advanced) with alpha blending = 0 for drawing the particle into the texture.
- sampling the texture should now give you only the colors and alpha values you wrote into.
have a look at the at the patch here (disable alpha iobox) and at the page under default blend mode…
Transparency
Blend (EX9.RenderState Advanced) help.v4p (18.7 kB)