//
// Project:
//
//   D3D RightMark
//
// Description:
//   Effect file for "Pixel Filling" test.
//
// Effect Version: 
//
//   DirectX 9.0 (Summer 2003 SDK Update)
//
// Shader Profile:
//
//   Fixed-Function Pixel Shader
//
//   Vertex Shaders 1.1 ( Vertex Shader Assembler )
//

matrix mWVP;
vector vRot;

FLOAT fFilter;
FLOAT fMipFilter;

FLOAT fAnisotropy;

DWORD dwTextureFactor = 0x80808080;

#define InPosition    v0
#define InNormal      v3
#define InTexCoord    v7

#define OutPosition   oPos
#define OutTexCoord0  oT0
#define OutTexCoord1  oT1
#define OutTexCoord2  oT2
#define OutTexCoord3  oT3
#define OutTexCoord4  oT4
#define OutTexCoord5  oT5
#define OutTexCoord6  oT6
#define OutTexCoord7  oT7

#define Temp          r0

#define MatWVP        0
#define Rot           10

vertexshader VSDefault =
	asm {	
		vs_1_1

		dcl_position InPosition
		dcl_normal   InNormal
		dcl_texcoord InTexCoord

		// Position

		mul  Temp, InNormal, c[Rot]
		add  Temp, Temp, InPosition
		m4x4 OutPosition, Temp, c[MatWVP]

		// Texture Coords Setup

		mov OutTexCoord0.xy, InTexCoord.xy
		mov OutTexCoord1.xy, InTexCoord.xy
		mov OutTexCoord2.xy, InTexCoord.xy
		mov OutTexCoord3.xy, InTexCoord.xy
		mov OutTexCoord4.xy, InTexCoord.xy
		mov OutTexCoord5.xy, InTexCoord.xy
		mov OutTexCoord6.xy, InTexCoord.xy
		mov OutTexCoord7.xy, InTexCoord.xy
	};

technique TFillRate0
{   
	pass p0
	{
		// Common States

		CullMode		 = None;
		AlphaBlendEnable	 = False;
		ZWriteEnable		 = True;
		ZEnable			 = False;

		ColorOp[ 0 ]             = SelectArg1;
	        ColorArg1[ 0 ] 		 = Diffuse;

		AlphaOp[ 0 ]             = SelectArg1;
	        AlphaArg1[ 0 ] 		 = Diffuse;
        
	        ColorOp[ 1 ]   		 = Disable;
        	AlphaOp[ 1 ]   		 = Disable;

		TextureFactor		 = <dwTextureFactor>;

		// Shader Constants

		VertexShaderConstant[ MatWVP ] = <mWVP>;
		VertexShaderConstant[ Rot ]    = <vRot>;

		// Shaders

		VertexShader = <VSDefault>;
	}
}

technique TFillRate1
{   
	pass p0
	{
		// Common States

		CullMode		 = None;
		AlphaBlendEnable	 = False;
		ZWriteEnable		 = False;
		ZEnable			 = False;

		ColorOp[ 0 ]             = SelectArg1;
	        ColorArg1[ 0 ] 		 = Texture;

		AlphaOp[ 0 ]             = SelectArg1;
	        AlphaArg1[ 0 ] 		 = Texture;

		MinFilter[ 0 ]           = <fFilter>;
		MagFilter[ 0 ]           = <fFilter>;
		MipFilter[ 0 ]           = <fMipFilter>;

		MaxAnisotropy[ 0 ]	 = <fAnisotropy>;

	        ColorOp[ 1 ]   		 = Disable;
        	AlphaOp[ 1 ]   		 = Disable;

		TextureFactor		 = <dwTextureFactor>;

		// Shader Constants

		VertexShaderConstant[ MatWVP ] = <mWVP>;
		VertexShaderConstant[ Rot ]    = <vRot>;

		// Shaders

		VertexShader = <VSDefault>;
	}
}

technique TFillRate2
{   
	pass p0
	{
		// Common States

		CullMode		 = None;
		AlphaBlendEnable	 = False;
		ZWriteEnable		 = False;
		ZEnable			 = False;

		ColorOp[ 0 ]             = SelectArg1;
	        ColorArg1[ 0 ] 		 = Texture;

		AlphaOp[ 0 ]             = SelectArg1;
	        AlphaArg1[ 0 ] 		 = Texture;

		MinFilter[ 0 ]           = <fFilter>;
		MagFilter[ 0 ]           = <fFilter>;
		MipFilter[ 0 ]           = <fMipFilter>;

		MaxAnisotropy[ 0 ]	 = <fAnisotropy>;

		ColorOp[ 1 ]             = Lerp;
	        ColorArg1[ 1 ] 		 = Current;
	        ColorArg2[ 1 ] 		 = Texture;
	        ColorArg0[ 1 ] 		 = TFactor;

		AlphaOp[ 1 ]             = Lerp;
	        AlphaArg1[ 1 ] 		 = Current;
	        AlphaArg2[ 1 ] 		 = Texture;
	        AlphaArg0[ 1 ] 		 = TFactor;

		MinFilter[ 1 ]           = <fFilter>;
		MagFilter[ 1 ]           = <fFilter>;
		MipFilter[ 1 ]           = <fMipFilter>;

		MaxAnisotropy[ 1 ]	 = <fAnisotropy>;

	        ColorOp[ 2 ]   		 = Disable;
        	AlphaOp[ 2 ]   		 = Disable;

		TextureFactor		 = <dwTextureFactor>;

		// Shader Constants

		VertexShaderConstant[ MatWVP ] = <mWVP>;
		VertexShaderConstant[ Rot ]    = <vRot>;

		// Shaders

		VertexShader = <VSDefault>;
	}
}

technique TFillRate3
{   
	pass p0
	{
		// Common States

		CullMode		 = None;
		AlphaBlendEnable	 = False;
		ZWriteEnable		 = False;
		ZEnable			 = False;

		ColorOp[ 0 ]             = SelectArg1;
	        ColorArg1[ 0 ] 		 = Texture;

		AlphaOp[ 0 ]             = SelectArg1;
	        AlphaArg1[ 0 ] 		 = Texture;

		MinFilter[ 0 ]           = <fFilter>;
		MagFilter[ 0 ]           = <fFilter>;
		MipFilter[ 0 ]           = <fMipFilter>;

		MaxAnisotropy[ 0 ]	 = <fAnisotropy>;

		ColorOp[ 1 ]             = Lerp;
	        ColorArg1[ 1 ] 		 = Current;
	        ColorArg2[ 1 ] 		 = Texture;
	        ColorArg0[ 1 ] 		 = TFactor;

		AlphaOp[ 1 ]             = Lerp;
	        AlphaArg1[ 1 ] 		 = Current;
	        AlphaArg2[ 1 ] 		 = Texture;
	        AlphaArg0[ 1 ] 		 = TFactor;

		MinFilter[ 1 ]           = <fFilter>;
		MagFilter[ 1 ]           = <fFilter>;
		MipFilter[ 1 ]           = <fMipFilter>;

		MaxAnisotropy[ 1 ]	 = <fAnisotropy>;

		ColorOp[ 2 ]             = Lerp;
	        ColorArg1[ 2 ] 		 = Current;
	        ColorArg2[ 2 ] 		 = Texture;
	        ColorArg0[ 2 ] 		 = TFactor;

		AlphaOp[ 2 ]             = Lerp;
	        AlphaArg1[ 2 ] 		 = Current;
	        AlphaArg2[ 2 ] 		 = Texture;
	        AlphaArg0[ 2 ] 		 = TFactor;

		MinFilter[ 2 ]           = <fFilter>;
		MagFilter[ 2 ]           = <fFilter>;
		MipFilter[ 2 ]           = <fMipFilter>;

		MaxAnisotropy[ 2 ]	 = <fAnisotropy>;

	        ColorOp[ 3 ]   		 = Disable;
        	AlphaOp[ 3 ]   		 = Disable;

		TextureFactor		 = <dwTextureFactor>;

		// Shader Constants

		VertexShaderConstant[ MatWVP ] = <mWVP>;
		VertexShaderConstant[ Rot ]    = <vRot>;

		// Shaders

		VertexShader = <VSDefault>;
	}
}

technique TFillRate4
{   
	pass p0
	{
		// Common States

		CullMode		 = None;
		AlphaBlendEnable	 = False;
		ZWriteEnable		 = False;
		ZEnable			 = False;

		ColorOp[ 0 ]             = SelectArg1;
	        ColorArg1[ 0 ] 		 = Texture;

		AlphaOp[ 0 ]             = SelectArg1;
	        AlphaArg1[ 0 ] 		 = Texture;

		MinFilter[ 0 ]           = <fFilter>;
		MagFilter[ 0 ]           = <fFilter>;
		MipFilter[ 0 ]           = <fMipFilter>;

		MaxAnisotropy[ 0 ]	 = <fAnisotropy>;

		ColorOp[ 1 ]             = Lerp;
	        ColorArg1[ 1 ] 		 = Current;
	        ColorArg2[ 1 ] 		 = Texture;
	        ColorArg0[ 1 ] 		 = TFactor;

		AlphaOp[ 1 ]             = Lerp;
	        AlphaArg1[ 1 ] 		 = Current;
	        AlphaArg2[ 1 ] 		 = Texture;
	        AlphaArg0[ 1 ] 		 = TFactor;

		MinFilter[ 1 ]           = <fFilter>;
		MagFilter[ 1 ]           = <fFilter>;
		MipFilter[ 1 ]           = <fMipFilter>;

		MaxAnisotropy[ 1 ]	 = <fAnisotropy>;

		ColorOp[ 2 ]             = Lerp;
	        ColorArg1[ 2 ] 		 = Current;
	        ColorArg2[ 2 ] 		 = Texture;
	        ColorArg0[ 2 ] 		 = TFactor;

		AlphaOp[ 2 ]             = Lerp;
	        AlphaArg1[ 2 ] 		 = Current;
	        AlphaArg2[ 2 ] 		 = Texture;
	        AlphaArg0[ 2 ] 		 = TFactor;

		MinFilter[ 2 ]           = <fFilter>;
		MagFilter[ 2 ]           = <fFilter>;
		MipFilter[ 2 ]           = <fMipFilter>;

		MaxAnisotropy[ 2 ]	 = <fAnisotropy>;

		ColorOp[ 3 ]             = Lerp;
	        ColorArg1[ 3 ] 		 = Current;
	        ColorArg2[ 3 ] 		 = Texture;
	        ColorArg0[ 3 ] 		 = TFactor;

		AlphaOp[ 3 ]             = Lerp;
	        AlphaArg1[ 3 ] 		 = Current;
	        AlphaArg2[ 3 ] 		 = Texture;
	        AlphaArg0[ 3 ] 		 = TFactor;

		MinFilter[ 3 ]           = <fFilter>;
		MagFilter[ 3 ]           = <fFilter>;
		MipFilter[ 3 ]           = <fMipFilter>;

		MaxAnisotropy[ 3 ]	 = <fAnisotropy>;

	        ColorOp[ 4 ]   		 = Disable;
        	AlphaOp[ 4 ]   		 = Disable;

		TextureFactor		 = <dwTextureFactor>;

		// Shader Constants

		VertexShaderConstant[ MatWVP ] = <mWVP>;
		VertexShaderConstant[ Rot ]    = <vRot>;

		// Shaders

		VertexShader = <VSDefault>;
	}
}

technique TFillRate5
{   
	pass p0
	{
		// Common States

		CullMode		 = None;
		AlphaBlendEnable	 = False;
		ZWriteEnable		 = False;
		ZEnable			 = False;

		ColorOp[ 0 ]             = SelectArg1;
	        ColorArg1[ 0 ] 		 = Texture;

		AlphaOp[ 0 ]             = SelectArg1;
	        AlphaArg1[ 0 ] 		 = Texture;

		MinFilter[ 0 ]           = <fFilter>;
		MagFilter[ 0 ]           = <fFilter>;
		MipFilter[ 0 ]           = <fMipFilter>;

		MaxAnisotropy[ 0 ]	 = <fAnisotropy>;

		ColorOp[ 1 ]             = Lerp;
	        ColorArg1[ 1 ] 		 = Current;
	        ColorArg2[ 1 ] 		 = Texture;
	        ColorArg0[ 1 ] 		 = TFactor;

		AlphaOp[ 1 ]             = Lerp;
	        AlphaArg1[ 1 ] 		 = Current;
	        AlphaArg2[ 1 ] 		 = Texture;
	        AlphaArg0[ 1 ] 		 = TFactor;

		MinFilter[ 1 ]           = <fFilter>;
		MagFilter[ 1 ]           = <fFilter>;
		MipFilter[ 1 ]           = <fMipFilter>;

		MaxAnisotropy[ 1 ]	 = <fAnisotropy>;

		ColorOp[ 2 ]             = Lerp;
	        ColorArg1[ 2 ] 		 = Current;
	        ColorArg2[ 2 ] 		 = Texture;
	        ColorArg0[ 2 ] 		 = TFactor;

		AlphaOp[ 2 ]             = Lerp;
	        AlphaArg1[ 2 ] 		 = Current;
	        AlphaArg2[ 2 ] 		 = Texture;
	        AlphaArg0[ 2 ] 		 = TFactor;

		MinFilter[ 2 ]           = <fFilter>;
		MagFilter[ 2 ]           = <fFilter>;
		MipFilter[ 2 ]           = <fMipFilter>;

		MaxAnisotropy[ 2 ]	 = <fAnisotropy>;
		
		ColorOp[ 3 ]             = Lerp;
	        ColorArg1[ 3 ] 		 = Current;
	        ColorArg2[ 3 ] 		 = Texture;
	        ColorArg0[ 3 ] 		 = TFactor;

		AlphaOp[ 3 ]             = Lerp;
	        AlphaArg1[ 3 ] 		 = Current;
	        AlphaArg2[ 3 ] 		 = Texture;
	        AlphaArg0[ 3 ] 		 = TFactor;

		MinFilter[ 3 ]           = <fFilter>;
		MagFilter[ 3 ]           = <fFilter>;
		MipFilter[ 3 ]           = <fMipFilter>;

		MaxAnisotropy[ 3 ]	 = <fAnisotropy>;

		ColorOp[ 4 ]             = Lerp;
	        ColorArg1[ 4 ] 		 = Current;
	        ColorArg2[ 4 ] 		 = Texture;
	        ColorArg0[ 4 ] 		 = TFactor;

		AlphaOp[ 4 ]             = Lerp;
	        AlphaArg1[ 4 ] 		 = Current;
	        AlphaArg2[ 4 ] 		 = Texture;
	        AlphaArg0[ 4 ] 		 = TFactor;

		MinFilter[ 4 ]           = <fFilter>;
		MagFilter[ 4 ]           = <fFilter>;
		MipFilter[ 4 ]           = <fMipFilter>;

		MaxAnisotropy[ 4 ]	 = <fAnisotropy>;

	        ColorOp[ 5 ]   		 = Disable;
        	AlphaOp[ 5 ]   		 = Disable;

		TextureFactor		 = <dwTextureFactor>;

		// Shader Constants

		VertexShaderConstant[ MatWVP ] = <mWVP>;
		VertexShaderConstant[ Rot ]    = <vRot>;

		// Shaders

		VertexShader = <VSDefault>;
	}
}

technique TFillRate6
{   
	pass p0
	{
		// Common States

		CullMode		 = None;
		AlphaBlendEnable	 = False;
		ZWriteEnable		 = False;
		ZEnable			 = False;

		ColorOp[ 0 ]             = SelectArg1;
	        ColorArg1[ 0 ] 		 = Texture;

		AlphaOp[ 0 ]             = SelectArg1;
	        AlphaArg1[ 0 ] 		 = Texture;

		MinFilter[ 0 ]           = <fFilter>;
		MagFilter[ 0 ]           = <fFilter>;
		MipFilter[ 0 ]           = <fMipFilter>;

		MaxAnisotropy[ 0 ]	 = <fAnisotropy>;

		ColorOp[ 1 ]             = Lerp;
	        ColorArg1[ 1 ] 		 = Current;
	        ColorArg2[ 1 ] 		 = Texture;
	        ColorArg0[ 1 ] 		 = TFactor;

		AlphaOp[ 1 ]             = Lerp;
	        AlphaArg1[ 1 ] 		 = Current;
	        AlphaArg2[ 1 ] 		 = Texture;
	        AlphaArg0[ 1 ] 		 = TFactor;

		MinFilter[ 1 ]           = <fFilter>;
		MagFilter[ 1 ]           = <fFilter>;
		MipFilter[ 1 ]           = <fMipFilter>;

		MaxAnisotropy[ 1 ]	 = <fAnisotropy>;

		ColorOp[ 2 ]             = Lerp;
	        ColorArg1[ 2 ] 		 = Current;
	        ColorArg2[ 2 ] 		 = Texture;
	        ColorArg0[ 2 ] 		 = TFactor;

		AlphaOp[ 2 ]             = Lerp;
	        AlphaArg1[ 2 ] 		 = Current;
	        AlphaArg2[ 2 ] 		 = Texture;
	        AlphaArg0[ 2 ] 		 = TFactor;

		MinFilter[ 2 ]           = <fFilter>;
		MagFilter[ 2 ]           = <fFilter>;
		MipFilter[ 2 ]           = <fMipFilter>;

		MaxAnisotropy[ 2 ]	 = <fAnisotropy>;

		ColorOp[ 3 ]             = Lerp;
	        ColorArg1[ 3 ] 		 = Current;
	        ColorArg2[ 3 ] 		 = Texture;
	        ColorArg0[ 3 ] 		 = TFactor;

		AlphaOp[ 3 ]             = Lerp;
	        AlphaArg1[ 3 ] 		 = Current;
	        AlphaArg2[ 3 ] 		 = Texture;
	        AlphaArg0[ 3 ] 		 = TFactor;

		MinFilter[ 3 ]           = <fFilter>;
		MagFilter[ 3 ]           = <fFilter>;
		MipFilter[ 3 ]           = <fMipFilter>;

		MaxAnisotropy[ 3 ]	 = <fAnisotropy>;

		ColorOp[ 4 ]             = Lerp;
	        ColorArg1[ 4 ] 		 = Current;
	        ColorArg2[ 4 ] 		 = Texture;
	        ColorArg0[ 4 ] 		 = TFactor;

		AlphaOp[ 4 ]             = Lerp;
	        AlphaArg1[ 4 ] 		 = Current;
	        AlphaArg2[ 4 ] 		 = Texture;
	        AlphaArg0[ 4 ] 		 = TFactor;

		MinFilter[ 4 ]           = <fFilter>;
		MagFilter[ 4 ]           = <fFilter>;
		MipFilter[ 4 ]           = <fMipFilter>;

		MaxAnisotropy[ 4 ]	 = <fAnisotropy>;

		ColorOp[ 5 ]             = Lerp;
	        ColorArg1[ 5 ] 		 = Current;
	        ColorArg2[ 5 ] 		 = Texture;
	        ColorArg0[ 5 ] 		 = TFactor;

		AlphaOp[ 5 ]             = Lerp;
	        AlphaArg1[ 5 ] 		 = Current;
	        AlphaArg2[ 5 ] 		 = Texture;
	        AlphaArg0[ 5 ] 		 = TFactor;

		MinFilter[ 5 ]           = <fFilter>;
		MagFilter[ 5 ]           = <fFilter>;
		MipFilter[ 5 ]           = <fMipFilter>;

		MaxAnisotropy[ 5 ]	 = <fAnisotropy>;

	        ColorOp[ 6 ]   		 = Disable;
        	AlphaOp[ 6 ]   		 = Disable;

		TextureFactor		 = <dwTextureFactor>;

		// Shader Constants

		VertexShaderConstant[ MatWVP ] = <mWVP>;
		VertexShaderConstant[ Rot ]    = <vRot>;

		// Shaders

		VertexShader = <VSDefault>;
	}
}

technique TFillRate7
{   
	pass p0
	{
		// Common States

		CullMode		 = None;
		AlphaBlendEnable	 = False;
		ZWriteEnable		 = False;
		ZEnable			 = False;

		ColorOp[ 0 ]             = SelectArg1;
	        ColorArg1[ 0 ] 		 = Texture;

		AlphaOp[ 0 ]             = SelectArg1;
	        AlphaArg1[ 0 ] 		 = Texture;

		MinFilter[ 0 ]           = <fFilter>;
		MagFilter[ 0 ]           = <fFilter>;
		MipFilter[ 0 ]           = <fMipFilter>;

		MaxAnisotropy[ 0 ]	 = <fAnisotropy>;

		ColorOp[ 1 ]             = Lerp;
	        ColorArg1[ 1 ] 		 = Current;
	        ColorArg2[ 1 ] 		 = Texture;
	        ColorArg0[ 1 ] 		 = TFactor;

		AlphaOp[ 1 ]             = Lerp;
	        AlphaArg1[ 1 ] 		 = Current;
	        AlphaArg2[ 1 ] 		 = Texture;
	        AlphaArg0[ 1 ] 		 = TFactor;

		MinFilter[ 1 ]           = <fFilter>;
		MagFilter[ 1 ]           = <fFilter>;
		MipFilter[ 1 ]           = <fMipFilter>;

		MaxAnisotropy[ 1 ]	 = <fAnisotropy>;
		
		ColorOp[ 2 ]             = Lerp;
	        ColorArg1[ 2 ] 		 = Current;
	        ColorArg2[ 2 ] 		 = Texture;
	        ColorArg0[ 2 ] 		 = TFactor;

		AlphaOp[ 2 ]             = Lerp;
	        AlphaArg1[ 2 ] 		 = Current;
	        AlphaArg2[ 2 ] 		 = Texture;
	        AlphaArg0[ 2 ] 		 = TFactor;

		MinFilter[ 2 ]           = <fFilter>;
		MagFilter[ 2 ]           = <fFilter>;
		MipFilter[ 2 ]           = <fMipFilter>;

		MaxAnisotropy[ 2 ]	 = <fAnisotropy>;

		ColorOp[ 3 ]             = Lerp;
	        ColorArg1[ 3 ] 		 = Current;
	        ColorArg2[ 3 ] 		 = Texture;
	        ColorArg0[ 3 ] 		 = TFactor;

		AlphaOp[ 3 ]             = Lerp;
	        AlphaArg1[ 3 ] 		 = Current;
	        AlphaArg2[ 3 ] 		 = Texture;
	        AlphaArg0[ 3 ] 		 = TFactor;

		MinFilter[ 3 ]           = <fFilter>;
		MagFilter[ 3 ]           = <fFilter>;
		MipFilter[ 3 ]           = <fMipFilter>;

		MaxAnisotropy[ 3 ]	 = <fAnisotropy>;

		ColorOp[ 4 ]             = Lerp;
	        ColorArg1[ 4 ] 		 = Current;
	        ColorArg2[ 4 ] 		 = Texture;
	        ColorArg0[ 4 ] 		 = TFactor;

		AlphaOp[ 4 ]             = Lerp;
	        AlphaArg1[ 4 ] 		 = Current;
	        AlphaArg2[ 4 ] 		 = Texture;
	        AlphaArg0[ 4 ] 		 = TFactor;

		MinFilter[ 4 ]           = <fFilter>;
		MagFilter[ 4 ]           = <fFilter>;
		MipFilter[ 4 ]           = <fMipFilter>;

		MaxAnisotropy[ 4 ]	 = <fAnisotropy>;

		ColorOp[ 5 ]             = Lerp;
	        ColorArg1[ 5 ] 		 = Current;
	        ColorArg2[ 5 ] 		 = Texture;
	        ColorArg0[ 5 ] 		 = TFactor;

		AlphaOp[ 5 ]             = Lerp;
	        AlphaArg1[ 5 ] 		 = Current;
	        AlphaArg2[ 5 ] 		 = Texture;
	        AlphaArg0[ 5 ] 		 = TFactor;

		MinFilter[ 5 ]           = <fFilter>;
		MagFilter[ 5 ]           = <fFilter>;
		MipFilter[ 5 ]           = <fMipFilter>;

		MaxAnisotropy[ 5 ]	 = <fAnisotropy>;

		ColorOp[ 6 ]             = Lerp;
	        ColorArg1[ 6 ] 		 = Current;
	        ColorArg2[ 6 ] 		 = Texture;
	        ColorArg0[ 6 ] 		 = TFactor;

		AlphaOp[ 6 ]             = Lerp;
	        AlphaArg1[ 6 ] 		 = Current;
	        AlphaArg2[ 6 ] 		 = Texture;
	        AlphaArg0[ 6 ] 		 = TFactor;

		MinFilter[ 6 ]           = <fFilter>;
		MagFilter[ 6 ]           = <fFilter>;
		MipFilter[ 6 ]           = <fMipFilter>;

		MaxAnisotropy[ 6 ]	 = <fAnisotropy>;

	        ColorOp[ 7 ]   		 = Disable;
        	AlphaOp[ 7 ]   		 = Disable;

		TextureFactor		 = <dwTextureFactor>;

		// Shader Constants

		VertexShaderConstant[ MatWVP ] = <mWVP>;
		VertexShaderConstant[ Rot ]    = <vRot>;

		// Shaders

		VertexShader = <VSDefault>;
	}
}

technique TFillRate8
{   
	pass p0
	{
		// Common States

		CullMode		 = None;
		AlphaBlendEnable	 = False;
		ZWriteEnable		 = False;
		ZEnable			 = False;

		ColorOp[ 0 ]             = SelectArg1;
	        ColorArg1[ 0 ] 		 = Texture;

		AlphaOp[ 0 ]             = SelectArg1;
	        AlphaArg1[ 0 ] 		 = Texture;

		MinFilter[ 0 ]           = <fFilter>;
		MagFilter[ 0 ]           = <fFilter>;
		MipFilter[ 0 ]           = <fMipFilter>;

		MaxAnisotropy[ 0 ]	 = <fAnisotropy>;
		
		ColorOp[ 1 ]             = Lerp;
	        ColorArg1[ 1 ] 		 = Current;
	        ColorArg2[ 1 ] 		 = Texture;
	        ColorArg0[ 1 ] 		 = TFactor;

		AlphaOp[ 1 ]             = Lerp;
	        AlphaArg1[ 1 ] 		 = Current;
	        AlphaArg2[ 1 ] 		 = Texture;
	        AlphaArg0[ 1 ] 		 = TFactor;

		MinFilter[ 1 ]           = <fFilter>;
		MagFilter[ 1 ]           = <fFilter>;
		MipFilter[ 1 ]           = <fMipFilter>;

		MaxAnisotropy[ 1 ]	 = <fAnisotropy>;

		ColorOp[ 2 ]             = Lerp;
	        ColorArg1[ 2 ] 		 = Current;
	        ColorArg2[ 2 ] 		 = Texture;
	        ColorArg0[ 2 ] 		 = TFactor;

		AlphaOp[ 2 ]             = Lerp;
	        AlphaArg1[ 2 ] 		 = Current;
	        AlphaArg2[ 2 ] 		 = Texture;
	        AlphaArg0[ 2 ] 		 = TFactor;

		MinFilter[ 2 ]           = <fFilter>;
		MagFilter[ 2 ]           = <fFilter>;
		MipFilter[ 2 ]           = <fMipFilter>;

		MaxAnisotropy[ 2 ]	 = <fAnisotropy>;

		ColorOp[ 3 ]             = Lerp;
	        ColorArg1[ 3 ] 		 = Current;
	        ColorArg2[ 3 ] 		 = Texture;
	        ColorArg0[ 3 ] 		 = TFactor;

		AlphaOp[ 3 ]             = Lerp;
	        AlphaArg1[ 3 ] 		 = Current;
	        AlphaArg2[ 3 ] 		 = Texture;
	        AlphaArg0[ 3 ] 		 = TFactor;

		MinFilter[ 3 ]           = <fFilter>;
		MagFilter[ 3 ]           = <fFilter>;
		MipFilter[ 3 ]           = <fMipFilter>;

		MaxAnisotropy[ 3 ]	 = <fAnisotropy>;
		
		ColorOp[ 4 ]             = Lerp;
	        ColorArg1[ 4 ] 		 = Current;
	        ColorArg2[ 4 ] 		 = Texture;
	        ColorArg0[ 4 ] 		 = TFactor;

		AlphaOp[ 4 ]             = Lerp;
	        AlphaArg1[ 4 ] 		 = Current;
	        AlphaArg2[ 4 ] 		 = Texture;
	        AlphaArg0[ 4 ] 		 = TFactor;

		MinFilter[ 4 ]           = <fFilter>;
		MagFilter[ 4 ]           = <fFilter>;
		MipFilter[ 4 ]           = <fMipFilter>;

		MaxAnisotropy[ 4 ]	 = <fAnisotropy>;

		ColorOp[ 5 ]             = Lerp;
	        ColorArg1[ 5 ] 		 = Current;
	        ColorArg2[ 5 ] 		 = Texture;
	        ColorArg0[ 5 ] 		 = TFactor;

		AlphaOp[ 5 ]             = Lerp;
	        AlphaArg1[ 5 ] 		 = Current;
	        AlphaArg2[ 5 ] 		 = Texture;
	        AlphaArg0[ 5 ] 		 = TFactor;

		MinFilter[ 5 ]           = <fFilter>;
		MagFilter[ 5 ]           = <fFilter>;
		MipFilter[ 5 ]           = <fMipFilter>;

		MaxAnisotropy[ 5 ]	 = <fAnisotropy>;

		ColorOp[ 6 ]             = Lerp;
	        ColorArg1[ 6 ] 		 = Current;
	        ColorArg2[ 6 ] 		 = Texture;
	        ColorArg0[ 6 ] 		 = TFactor;

		AlphaOp[ 6 ]             = Lerp;
	        AlphaArg1[ 6 ] 		 = Current;
	        AlphaArg2[ 6 ] 		 = Texture;
	        AlphaArg0[ 6 ] 		 = TFactor;

		MinFilter[ 6 ]           = <fFilter>;
		MagFilter[ 6 ]           = <fFilter>;
		MipFilter[ 6 ]           = <fMipFilter>;

		MaxAnisotropy[ 6 ]	 = <fAnisotropy>;

		ColorOp[ 7 ]             = Lerp;
	        ColorArg1[ 7 ] 		 = Current;
	        ColorArg2[ 7 ] 		 = Texture;
	        ColorArg0[ 7 ] 		 = TFactor;

		AlphaOp[ 7 ]             = Lerp;
	        AlphaArg1[ 7 ] 		 = Current;
	        AlphaArg2[ 7 ] 		 = Texture;
	        AlphaArg0[ 7 ] 		 = TFactor;

		MinFilter[ 7 ]           = <fFilter>;
		MagFilter[ 7 ]           = <fFilter>;
		MipFilter[ 7 ]           = <fMipFilter>;

		MaxAnisotropy[ 7 ]	 = <fAnisotropy>;

		TextureFactor		 = <dwTextureFactor>;

		// Shader Constants

		VertexShaderConstant[ MatWVP ] = <mWVP>;
		VertexShaderConstant[ Rot ]    = <vRot>;

		// Shaders

		VertexShader = <VSDefault>;
	}
}