I have been screwing with this a little too. To see Pass p0 an p1 you will
need to look at the fixed-function multitex at my site/





The basic way I am adding a shadow map is this way, and it is happening
in Pass p2:

Pass p0
{
.... lay down the base skin
.... using tex[0]
}

Pass p1
{
.... Add a second texture using an alphamap
.... Using Texture 0,1
}

Pass p2
{

alphaop[0]=disable; // Frame buffer is filled, but no alphaops wanted

alphablendenable=true;

SRCBLEND=ZERO; // <<<<<<<<<<<<<
DESTBLEND=SRCCOLOR; // <<<<<<<<<<<<<

zenable=true;
zwriteenable=true;
ditherenable=true;

Texture[1] = <mtlSkin2>;

magFilter[1]=linear;
minFilter[1]=linear;
mipFilter[1]=linear;

TextureTransformFlags[1] = disable;

texcoordindex[1]=1;

}