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

//
// Global Variables
//

texture tTexture;

matrix mW;
matrix mWVP;

//
// Technique 0: Default Technique 
//

technique TNoTextures
{   
	pass p0
	{
		//
		// Common States
		//

		CullMode		 = CCW;
		AlphaBlendEnable	 = False;
		ZWriteEnable		 = True;

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

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

		//
		// Shader Constants
		//

		VertexShaderConstant[16] = <mWVP>;	  // World * View * Projections Matrix

		//
		// Shaders
		//

		VertexShader = 

		   asm {	
				vs_1_1

				dcl_position v0
				dcl_color    v5

				m4x4 oPos, v0, c16
				mov  oD0, v5	
			};
	}
}

technique TTextures
{   
	pass p0
	{
		//
		// Common States
		//

		CullMode		 = CCW;
		AlphaBlendEnable	 = False;
		ZWriteEnable		 = True;

		Texture[0]		 = <tTexture>;

		MinFilter[ 0 ]           = Linear;
		MagFilter[ 0 ]           = Linear;
		MipFilter[ 0 ]           = Linear;

		ColorOp[0]		 = Modulate;
		ColorArg1[0]             = Diffuse;
		ColorArg2[0]             = Texture;

		AlphaOp[0]		 = Modulate;
		AlphaArg1[0]             = Diffuse;
		AlphaArg1[0]             = Texture;

		//
		// Shader Constants
		//

		VertexShaderConstant[16] = <mWVP>;	  // World * View * Projections Matrix

		//
		// Shaders
		//

		VertexShader = 

		   asm {	
				vs_1_1

				dcl_position v0
				dcl_color    v5
				dcl_texcoord v7

				m4x4 oPos, v0, c16
				mov  oD0, v5
				mov  oT0.xy, v7.xy	
			};
	}
}
