ok, it’s possible!
i just finished the test, i’ll email you the exe in a few seconds.
here i post the meaningful code:
alpha.use(); // glBindTexture(…)
image.use(); // glBindTexture(…)
then you draw the primitives by setting the texture coordinates of eevery TU:
it was not the way i first thought: you set the first TU to be processed (TU 0) as the alpha map.
the second TU (TU 1) then gets the alpha values from the first TU.
if i thougt better before, i would found why:
the current color fragment is made of r,g,b AND alpha values.
in modulate mode, the fragments are multiplied in cascade, so:
the TU0 has RGB=glColor (set to 1,1,1) and alpha channel wich varies from 0 to 1.
the TU1 instead has fixed alpha=1 and RGB is variable.
so from the calcs you get the final texture made out of TU0[alpha] and TU1[RGB].
hey, good looking indeed
PS: oops… just saw you have no email.
post or edit your address and i’ll send.
[This message has been edited by dmy (edited 05-19-2000).]