static const	char	vshh_shdwmap0[] =

	"ps.1.1 "

	"tex t0 "

	"tex t1 "

	"tex t2 "

	"texkill t3 "

	"mul_x2 r0.a, v0, t0 "

	"add_d2 r0.rgb, t0, t1 "

	"add_d2 r0.rgb, r0, t2 "

	"mul_x2 r0.rgb, v0, r0 "

	;

/*

	// Xbox Shader Assembler 1.00.4531.1


	D3DPIXELSHADERDEF psd;

	ZeroMemory(&psd, sizeof(psd));

	psd.PSCombinerCount=PS_COMBINERCOUNT(

	    4,

	    PS_COMBINERCOUNT_MUX_MSB | PS_COMBINERCOUNT_UNIQUE_C0 | PS_COMBINERCOUNT_UNIQUE_C1);

	psd.PSTextureModes=PS_TEXTUREMODES(

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_CLIPPLANE);

	psd.PSInputTexture=PS_INPUTTEXTURE(0,0,0,0);

	psd.PSDotMapping=PS_DOTMAPPING(

	    0,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE);

	psd.PSCompareMode=PS_COMPAREMODE(

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT);

	//------------- Stage 0 -------------

	psd.PSRGBInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_V0 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_T0 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[0] = 0x00000000;

	psd.PSConstant1[0] = 0x00000000;

	//------------- Stage 1 -------------

	psd.PSRGBInputs[1]=PS_COMBINERINPUTS(

	    PS_REGISTER_T0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_INVERT,

	    PS_REGISTER_T1 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_INVERT);

	psd.PSAlphaInputs[1]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[1]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_R0,

	    PS_COMBINEROUTPUT_SHIFTRIGHT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[1]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[1] = 0x00000000;

	psd.PSConstant1[1] = 0x00000000;

	//------------- Stage 2 -------------

	psd.PSRGBInputs[2]=PS_COMBINERINPUTS(

	    PS_REGISTER_R0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_INVERT,

	    PS_REGISTER_T2 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_INVERT);

	psd.PSAlphaInputs[2]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[2]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_R0,

	    PS_COMBINEROUTPUT_SHIFTRIGHT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[2]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[2] = 0x00000000;

	psd.PSConstant1[2] = 0x00000000;

	//------------- Stage 3 -------------

	psd.PSRGBInputs[3]=PS_COMBINERINPUTS(

	    PS_REGISTER_V0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_R0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[3]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[3]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[3]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[3] = 0x00000000;

	psd.PSConstant1[3] = 0x00000000;

	psd.PSC0Mapping = 0xffffffff;

	psd.PSC1Mapping = 0xffffffff;

	psd.PSFinalCombinerConstants = 0x000001ff;

*/



static const	char	vshh_mtex_1tex[] =

	"ps.1.1 "

	"tex t0 "

	"mul_x2 r0, t0, v0 "

	;

/*

	// Xbox Shader Assembler 1.00.4531.1


	D3DPIXELSHADERDEF psd;

	ZeroMemory(&psd, sizeof(psd));

	psd.PSCombinerCount=PS_COMBINERCOUNT(

	    1,

	    PS_COMBINERCOUNT_MUX_MSB | PS_COMBINERCOUNT_UNIQUE_C0 | PS_COMBINERCOUNT_UNIQUE_C1);

	psd.PSTextureModes=PS_TEXTUREMODES(

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_NONE,

	    PS_TEXTUREMODES_NONE,

	    PS_TEXTUREMODES_NONE);

	psd.PSInputTexture=PS_INPUTTEXTURE(0,0,0,0);

	psd.PSDotMapping=PS_DOTMAPPING(

	    0,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE);

	psd.PSCompareMode=PS_COMPAREMODE(

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT);

	//------------- Stage 0 -------------

	psd.PSRGBInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_T0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_V0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_T0 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_V0 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[0] = 0x00000000;

	psd.PSConstant1[0] = 0x00000000;

	psd.PSC0Mapping = 0xffffffff;

	psd.PSC1Mapping = 0xffffffff;

	psd.PSFinalCombinerConstants = 0x000001ff;

*/



static const	char	vshh_wmtex_emap[] =

	"ps.1.1 "

	"tex t0 "

	"tex t1 "

	"tex t2 "

	"mul_x2	r0.a,   t0,     v0 "

	"mul	    r1.rgb, t2,     t1.a "

	"mul		r0.rgb, t0,     v0 "

	"mad_x2  r0.rgb, r1,     v0,  r0 "

	;

/*

	// Xbox Shader Assembler 1.00.4531.1


	D3DPIXELSHADERDEF psd;

	ZeroMemory(&psd, sizeof(psd));

	psd.PSCombinerCount=PS_COMBINERCOUNT(

	    4,

	    PS_COMBINERCOUNT_MUX_MSB | PS_COMBINERCOUNT_UNIQUE_C0 | PS_COMBINERCOUNT_UNIQUE_C1);

	psd.PSTextureModes=PS_TEXTUREMODES(

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_NONE);

	psd.PSInputTexture=PS_INPUTTEXTURE(0,0,0,0);

	psd.PSDotMapping=PS_DOTMAPPING(

	    0,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE);

	psd.PSCompareMode=PS_COMPAREMODE(

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT);

	//------------- Stage 0 -------------

	psd.PSRGBInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_T0 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_V0 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[0] = 0x00000000;

	psd.PSConstant1[0] = 0x00000000;

	//------------- Stage 1 -------------

	psd.PSRGBInputs[1]=PS_COMBINERINPUTS(

	    PS_REGISTER_T2 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_T1 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[1]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[1]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R1,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[1]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[1] = 0x00000000;

	psd.PSConstant1[1] = 0x00000000;

	//------------- Stage 2 -------------

	psd.PSRGBInputs[2]=PS_COMBINERINPUTS(

	    PS_REGISTER_T0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_V0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[2]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[2]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[2]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[2] = 0x00000000;

	psd.PSConstant1[2] = 0x00000000;

	//------------- Stage 3 -------------

	psd.PSRGBInputs[3]=PS_COMBINERINPUTS(

	    PS_REGISTER_R1 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_V0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_INVERT,

	    PS_REGISTER_R0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY);

	psd.PSAlphaInputs[3]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[3]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_R0,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[3]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[3] = 0x00000000;

	psd.PSConstant1[3] = 0x00000000;

	psd.PSC0Mapping = 0xffffffff;

	psd.PSC1Mapping = 0xffffffff;

	psd.PSFinalCombinerConstants = 0x000001ff;

*/



static const	char	vshh_wmtex_bmap[] =

	"ps.1.1 "

	"tex t0 "

	"tex t1 "

	"tex t2 "

	"mul_x2 r0.a,    v0,     t0 "

	"sub    r0.rgb,  t1,     t2 "

	"mul_x2 r0.rgb,  r0,     v0 "

	"add    r0.rgb,  r0,     v0 "

	"mul_x2 r0.rgb,  r0,     t0 "

	;

/*

	// Xbox Shader Assembler 1.00.4531.1


	D3DPIXELSHADERDEF psd;

	ZeroMemory(&psd, sizeof(psd));

	psd.PSCombinerCount=PS_COMBINERCOUNT(

	    5,

	    PS_COMBINERCOUNT_MUX_MSB | PS_COMBINERCOUNT_UNIQUE_C0 | PS_COMBINERCOUNT_UNIQUE_C1);

	psd.PSTextureModes=PS_TEXTUREMODES(

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_NONE);

	psd.PSInputTexture=PS_INPUTTEXTURE(0,0,0,0);

	psd.PSDotMapping=PS_DOTMAPPING(

	    0,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE);

	psd.PSCompareMode=PS_COMPAREMODE(

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT);

	//------------- Stage 0 -------------

	psd.PSRGBInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_V0 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_T0 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[0] = 0x00000000;

	psd.PSConstant1[0] = 0x00000000;

	//------------- Stage 1 -------------

	psd.PSRGBInputs[1]=PS_COMBINERINPUTS(

	    PS_REGISTER_T1 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_INVERT,

	    PS_REGISTER_T2 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_EXPAND_NORMAL);

	psd.PSAlphaInputs[1]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[1]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_R0,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[1]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[1] = 0x00000000;

	psd.PSConstant1[1] = 0x00000000;

	//------------- Stage 2 -------------

	psd.PSRGBInputs[2]=PS_COMBINERINPUTS(

	    PS_REGISTER_R0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_V0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[2]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[2]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[2]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[2] = 0x00000000;

	psd.PSConstant1[2] = 0x00000000;

	//------------- Stage 3 -------------

	psd.PSRGBInputs[3]=PS_COMBINERINPUTS(

	    PS_REGISTER_R0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_INVERT,

	    PS_REGISTER_V0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_INVERT);

	psd.PSAlphaInputs[3]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[3]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_R0,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[3]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[3] = 0x00000000;

	psd.PSConstant1[3] = 0x00000000;

	//------------- Stage 4 -------------

	psd.PSRGBInputs[4]=PS_COMBINERINPUTS(

	    PS_REGISTER_R0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_T0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[4]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[4]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[4]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[4] = 0x00000000;

	psd.PSConstant1[4] = 0x00000000;

	psd.PSC0Mapping = 0xffffffff;

	psd.PSC1Mapping = 0xffffffff;

	psd.PSFinalCombinerConstants = 0x000001ff;

*/



static const	char	vshh_mtex_gray[] =

	"ps.1.1 "

	"def c0, 0.30f, 0.59f, 0.11f, 1.0f "

	"def c1, 0, 0, 0, 0 "

	"tex t0 "

	"dp3    r0.rgb, c0, t0 "

	"add    r0.rgb, r0, c1 "

	"mov    r0.a, c0.a "

	;

/*

	// Xbox Shader Assembler 1.00.4531.1


	D3DPIXELSHADERDEF psd;

	ZeroMemory(&psd, sizeof(psd));

	psd.PSCombinerCount=PS_COMBINERCOUNT(

	    3,

	    PS_COMBINERCOUNT_MUX_MSB | PS_COMBINERCOUNT_UNIQUE_C0 | PS_COMBINERCOUNT_UNIQUE_C1);

	psd.PSTextureModes=PS_TEXTUREMODES(

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_NONE,

	    PS_TEXTUREMODES_NONE,

	    PS_TEXTUREMODES_NONE);

	psd.PSInputTexture=PS_INPUTTEXTURE(0,0,0,0);

	psd.PSDotMapping=PS_DOTMAPPING(

	    0,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE);

	psd.PSCompareMode=PS_COMPAREMODE(

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT);

	//------------- Stage 0 -------------

	psd.PSRGBInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_C0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_T0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_DOT_PRODUCT | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[0] = 0xff4d961c;

	psd.PSConstant1[0] = 0x00000000;

	//------------- Stage 1 -------------

	psd.PSRGBInputs[1]=PS_COMBINERINPUTS(

	    PS_REGISTER_R0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_INVERT,

	    PS_REGISTER_C0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_INVERT);

	psd.PSAlphaInputs[1]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[1]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_R0,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[1]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[1] = 0x00000000;

	psd.PSConstant1[1] = 0x00000000;

	//------------- Stage 2 -------------

	psd.PSRGBInputs[2]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[2]=PS_COMBINERINPUTS(

	    PS_REGISTER_C0 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_INVERT,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[2]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[2]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[2] = 0xff4d961c;

	psd.PSConstant1[2] = 0x00000000;

	psd.PSC0Mapping = 0xfffff010;

	psd.PSC1Mapping = 0xffffffff;

	psd.PSFinalCombinerConstants = 0x000001ff;

*/



static const	char	vshh_wmtex_smap[] =

	"ps.1.1 "

	"tex t2 "

	"mul_x2		r0, v0, t2 "

	;

/*

	// Xbox Shader Assembler 1.00.4531.1


	D3DPIXELSHADERDEF psd;

	ZeroMemory(&psd, sizeof(psd));

	psd.PSCombinerCount=PS_COMBINERCOUNT(

	    1,

	    PS_COMBINERCOUNT_MUX_MSB | PS_COMBINERCOUNT_UNIQUE_C0 | PS_COMBINERCOUNT_UNIQUE_C1);

	psd.PSTextureModes=PS_TEXTUREMODES(

	    PS_TEXTUREMODES_NONE,

	    PS_TEXTUREMODES_NONE,

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_NONE);

	psd.PSInputTexture=PS_INPUTTEXTURE(0,0,0,0);

	psd.PSDotMapping=PS_DOTMAPPING(

	    0,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE);

	psd.PSCompareMode=PS_COMPAREMODE(

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT);

	//------------- Stage 0 -------------

	psd.PSRGBInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_V0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_T2 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_V0 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_T2 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[0] = 0x00000000;

	psd.PSConstant1[0] = 0x00000000;

	psd.PSC0Mapping = 0xffffffff;

	psd.PSC1Mapping = 0xffffffff;

	psd.PSFinalCombinerConstants = 0x000001ff;

*/



static const	char	vshh_wmtex_emap2[] =

	"ps.1.1 "

	"tex t0 "

	"tex t2 "

	"mul_x2 r0.a,   t0,     v0 "

	"mul_x2 r0.rgb, t2,     v0 "

	;

/*

	// Xbox Shader Assembler 1.00.4531.1


	D3DPIXELSHADERDEF psd;

	ZeroMemory(&psd, sizeof(psd));

	psd.PSCombinerCount=PS_COMBINERCOUNT(

	    2,

	    PS_COMBINERCOUNT_MUX_MSB | PS_COMBINERCOUNT_UNIQUE_C0 | PS_COMBINERCOUNT_UNIQUE_C1);

	psd.PSTextureModes=PS_TEXTUREMODES(

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_NONE,

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_NONE);

	psd.PSInputTexture=PS_INPUTTEXTURE(0,0,0,0);

	psd.PSDotMapping=PS_DOTMAPPING(

	    0,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE);

	psd.PSCompareMode=PS_COMPAREMODE(

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT);

	//------------- Stage 0 -------------

	psd.PSRGBInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_T0 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_V0 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[0] = 0x00000000;

	psd.PSConstant1[0] = 0x00000000;

	//------------- Stage 1 -------------

	psd.PSRGBInputs[1]=PS_COMBINERINPUTS(

	    PS_REGISTER_T2 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_V0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[1]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[1]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[1]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[1] = 0x00000000;

	psd.PSConstant1[1] = 0x00000000;

	psd.PSC0Mapping = 0xffffffff;

	psd.PSC1Mapping = 0xffffffff;

	psd.PSFinalCombinerConstants = 0x000001ff;

*/



static const	char	vshh_wmtex_emap3[] =

	"ps.1.1 "

	"tex t1 "

	"tex t2 "

	"mul_x2 r0.a,   t1,     v0 "

	"add    r0.rgb, t1,     t2 "

	"mul_x2 r0.rgb, r0,     v0 "

	;

/*

	// Xbox Shader Assembler 1.00.4531.1


	D3DPIXELSHADERDEF psd;

	ZeroMemory(&psd, sizeof(psd));

	psd.PSCombinerCount=PS_COMBINERCOUNT(

	    3,

	    PS_COMBINERCOUNT_MUX_MSB | PS_COMBINERCOUNT_UNIQUE_C0 | PS_COMBINERCOUNT_UNIQUE_C1);

	psd.PSTextureModes=PS_TEXTUREMODES(

	    PS_TEXTUREMODES_NONE,

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_NONE);

	psd.PSInputTexture=PS_INPUTTEXTURE(0,0,0,0);

	psd.PSDotMapping=PS_DOTMAPPING(

	    0,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE);

	psd.PSCompareMode=PS_COMPAREMODE(

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT);

	//------------- Stage 0 -------------

	psd.PSRGBInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_T1 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_V0 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[0] = 0x00000000;

	psd.PSConstant1[0] = 0x00000000;

	//------------- Stage 1 -------------

	psd.PSRGBInputs[1]=PS_COMBINERINPUTS(

	    PS_REGISTER_T1 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_INVERT,

	    PS_REGISTER_T2 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_INVERT);

	psd.PSAlphaInputs[1]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[1]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_R0,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[1]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[1] = 0x00000000;

	psd.PSConstant1[1] = 0x00000000;

	//------------- Stage 2 -------------

	psd.PSRGBInputs[2]=PS_COMBINERINPUTS(

	    PS_REGISTER_R0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_V0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[2]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[2]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[2]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[2] = 0x00000000;

	psd.PSConstant1[2] = 0x00000000;

	psd.PSC0Mapping = 0xffffffff;

	psd.PSC1Mapping = 0xffffffff;

	psd.PSFinalCombinerConstants = 0x000001ff;

*/



static const	char	vshh_wmtex_emap4[] =

	"ps.1.1 "

	"tex t0 "

	"tex t2 "

	"mul_x2 r0.a,   t0,     v0 "

	"add    r0.rgb, t0,     t2 "

	"mul_x2 r0.rgb, r0,     v0 "

	;

/*

	// Xbox Shader Assembler 1.00.4531.1


	D3DPIXELSHADERDEF psd;

	ZeroMemory(&psd, sizeof(psd));

	psd.PSCombinerCount=PS_COMBINERCOUNT(

	    3,

	    PS_COMBINERCOUNT_MUX_MSB | PS_COMBINERCOUNT_UNIQUE_C0 | PS_COMBINERCOUNT_UNIQUE_C1);

	psd.PSTextureModes=PS_TEXTUREMODES(

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_NONE,

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_NONE);

	psd.PSInputTexture=PS_INPUTTEXTURE(0,0,0,0);

	psd.PSDotMapping=PS_DOTMAPPING(

	    0,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE);

	psd.PSCompareMode=PS_COMPAREMODE(

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT);

	//------------- Stage 0 -------------

	psd.PSRGBInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_T0 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_V0 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[0] = 0x00000000;

	psd.PSConstant1[0] = 0x00000000;

	//------------- Stage 1 -------------

	psd.PSRGBInputs[1]=PS_COMBINERINPUTS(

	    PS_REGISTER_T0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_INVERT,

	    PS_REGISTER_T2 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_INVERT);

	psd.PSAlphaInputs[1]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[1]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_R0,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[1]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[1] = 0x00000000;

	psd.PSConstant1[1] = 0x00000000;

	//------------- Stage 2 -------------

	psd.PSRGBInputs[2]=PS_COMBINERINPUTS(

	    PS_REGISTER_R0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_V0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[2]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[2]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[2]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[2] = 0x00000000;

	psd.PSConstant1[2] = 0x00000000;

	psd.PSC0Mapping = 0xffffffff;

	psd.PSC1Mapping = 0xffffffff;

	psd.PSFinalCombinerConstants = 0x000001ff;

*/



static const	char	vshh_ps_irmode[] =

	"ps.1.1 "

	"def		c0, 0.5f, 0.5f, 0.5f, 0.5f "

	"tex			t0 "

	"texreg2gb	t1, t0 "

	"mov		r0.a, v0 "

	"mul_x2	r0.rgb,	v0, t1 "

	;

/*

	// Xbox Shader Assembler 1.00.4531.1


	D3DPIXELSHADERDEF psd;

	ZeroMemory(&psd, sizeof(psd));

	psd.PSCombinerCount=PS_COMBINERCOUNT(

	    2,

	    PS_COMBINERCOUNT_MUX_MSB | PS_COMBINERCOUNT_UNIQUE_C0 | PS_COMBINERCOUNT_UNIQUE_C1);

	psd.PSTextureModes=PS_TEXTUREMODES(

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_DPNDNT_GB,

	    PS_TEXTUREMODES_NONE,

	    PS_TEXTUREMODES_NONE);

	psd.PSInputTexture=PS_INPUTTEXTURE(0,0,0,0);

	psd.PSDotMapping=PS_DOTMAPPING(

	    0,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE);

	psd.PSCompareMode=PS_COMPAREMODE(

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT);

	//------------- Stage 0 -------------

	psd.PSRGBInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_V0 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_INVERT,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[0] = 0x00000000;

	psd.PSConstant1[0] = 0x00000000;

	//------------- Stage 1 -------------

	psd.PSRGBInputs[1]=PS_COMBINERINPUTS(

	    PS_REGISTER_V0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_T1 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[1]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[1]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[1]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[1] = 0x00000000;

	psd.PSConstant1[1] = 0x00000000;

	psd.PSC0Mapping = 0xffffffff;

	psd.PSC1Mapping = 0xffffffff;

	psd.PSFinalCombinerConstants = 0x000001ff;

*/



static const	char	vshh_wshdwmap0_1tex[] =

	"ps.1.1 "

	"tex t0 "

	"mul_x2 r0.a, v0, t0 "

	"mul_x2 r0.rgb, v0, t0 "

	;

/*

	// Xbox Shader Assembler 1.00.4531.1


	D3DPIXELSHADERDEF psd;

	ZeroMemory(&psd, sizeof(psd));

	psd.PSCombinerCount=PS_COMBINERCOUNT(

	    2,

	    PS_COMBINERCOUNT_MUX_MSB | PS_COMBINERCOUNT_UNIQUE_C0 | PS_COMBINERCOUNT_UNIQUE_C1);

	psd.PSTextureModes=PS_TEXTUREMODES(

	    PS_TEXTUREMODES_PROJECT2D,

	    PS_TEXTUREMODES_NONE,

	    PS_TEXTUREMODES_NONE,

	    PS_TEXTUREMODES_NONE);

	psd.PSInputTexture=PS_INPUTTEXTURE(0,0,0,0);

	psd.PSDotMapping=PS_DOTMAPPING(

	    0,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE,

	    PS_DOTMAPPING_ZERO_TO_ONE);

	psd.PSCompareMode=PS_COMPAREMODE(

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT,

	    PS_COMPAREMODE_S_LT | PS_COMPAREMODE_T_LT | PS_COMPAREMODE_R_LT | PS_COMPAREMODE_Q_LT);

	//------------- Stage 0 -------------

	psd.PSRGBInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[0]=PS_COMBINERINPUTS(

	    PS_REGISTER_V0 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_T0 | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_ALPHA | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[0]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[0] = 0x00000000;

	psd.PSConstant1[0] = 0x00000000;

	//------------- Stage 1 -------------

	psd.PSRGBInputs[1]=PS_COMBINERINPUTS(

	    PS_REGISTER_V0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_T0 | PS_CHANNEL_RGB | PS_INPUTMAPPING_SIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_RGB | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSAlphaInputs[1]=PS_COMBINERINPUTS(

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY,

	    PS_REGISTER_ZERO | PS_CHANNEL_BLUE | PS_INPUTMAPPING_UNSIGNED_IDENTITY);

	psd.PSRGBOutputs[1]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_R0,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_SHIFTLEFT_1 | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSAlphaOutputs[1]=PS_COMBINEROUTPUTS(

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_REGISTER_DISCARD,

	    PS_COMBINEROUTPUT_IDENTITY | PS_COMBINEROUTPUT_AB_MULTIPLY | PS_COMBINEROUTPUT_CD_MULTIPLY | PS_COMBINEROUTPUT_AB_CD_SUM);

	psd.PSConstant0[1] = 0x00000000;

	psd.PSConstant1[1] = 0x00000000;

	psd.PSC0Mapping = 0xffffffff;

	psd.PSC1Mapping = 0xffffffff;

	psd.PSFinalCombinerConstants = 0x000001ff;

*/



