//Effect to render a poygon with texturing no lighting allowing UV wrapping

matrix matWorldViewProj;	//The World*View*Projection matrix

texture texDiffuseMap; //The diffuse colour texture map

VertexShader VS11 =
	decl
	{
		stream 0;
		float v0[3];	//Vertex Position
		d3dcolor v1[1];	//Vertex Colour
		float v2[2];	//Vertex UV1
		float v3[2];	//Vertex UV2
	}
	asm
	{
		vs.1.1					//Version 1.1 Vertex Shader
		m4x4	oPos, v0, c0	//Transform vertex to projection space and place in position output register
		mov		oD0, v1			//Move vertex colour into colour output register
		mov		oT0.xy, v2		//Move vertex texture coord into texture output register
	};
	
PixelShader PS14 =
	asm
	{
		ps.1.4					//Version 1.4 Pixel Shader
		texld r0, t0			//load diffuse texture into r1
		mul r0, r0, v0			//Multiply the input vertex colour and texture colour into output colour register
	};
	
PixelShader PS13 =
	asm
	{
		ps.1.3					//Version 1.3 Pixel Shader
		tex t0					//Declare the diffuse texture
		mul r0, t0, v0			//Multiply the input vertex colour and texture colour into output colour register
	};

//First technique is for VS1.1 and PS1.4
technique VS1_1__PS_1_4
{
	pass P0
	{
		//Load matrices
		VertexShaderConstant[0] = <matWorldViewProj>; // World*View*Projection
		
		// textures
		Texture[0] = <texDiffuseMap>;
		
		VertexShader = <VS11>;
		PixelShader = <PS14>;
	}
}

//First technique is for VS1.1 and PS1.3
technique VS1_1__PS_1_3
{
	pass P0
	{
		//Load matrices
		VertexShaderConstant[0] = <matWorldViewProj>; // World*View*Projection
		
		// textures
		Texture[0] = <texDiffuseMap>;
		
		VertexShader = <VS11>;
		PixelShader = <PS13>;
	}
}

//First technique for no shaders
technique Intel_Default
{
    pass P0
    {
        // textures
        Texture[0] = <texDiffuseMap>;
    }
}

technique Xaber_Default
{
    pass P0
    {
        // textures
        Texture[0] = <texDiffuseMap>;
    }
}