i don’t have the complete shader yet
textures/aztec/beam
{
qer_editorimage textures/fraco/beam
surfaceparm noimpact
surfaceparm nomarks
q3map_nolightmap
cull disable
{
map textures/fraco/beam
blendfunc blend
tcMod turb 0 0.05 0 0.04
tcMod scroll -0.02 0.02
alphaGen wave sin 0.7 0.3 0 0.05
}
{
map textures/fraco/beam
blendfunc blend
tcMod turb 0 0.07 0 0.1
tcMod scroll 0.02 0.04
alphaGen wave sin 0.8 0.35 25 0.06
}
}
the beam texture is a cloudy texture (puffs of smoke), with a similar alpha channel (the alpha is a bit darker and has more contrast). The result is like smoke going up.

Now what I really want to make is like a smoky light beam. I want to put this around a spotlight.
The first two stages make the alpha (and rgb of course) channel scroll, so i need a non-moving alpha channel, to make the left and right edges of the texture non-transparant.
This is the alpha channel I want to add:

another way to explain what i want to do
define
out = output for shader
in=background, what is seen through the shader
t1,a1=rgb and alpha of the first stage, moving clouds
t2,a2 = rgb and alpha of second stage, clouds moving other way
a3 = the extra alpha channel i want to add
what my shader does up till now:
out=in*(1-a1)(1-a2)+t1a1*(1-a2)+t2*a2
what i actually intend:
out = in*(1-a1a2a3)+t1a1(1-a2)a3+t2a2*a3
[EDIT] fixed this expression
or something alike, that defines the final transparancy as a blend between that extra image and the two other moving alphas.
this making sense?
I’ve been thinking and trying some based on the example i linked to in the previous post. I thought that destination blending might allow me to at least create that first factor (1-a1a2a3). But now I’m completely confused.
any help welcome
thnx
fraco