//*****************************************************************************
// BoundBox.fx
// mittens
// 
// This shader contains programs and techniques for rendering object bounding boxes.
//*****************************************************************************

//*****************************************************************************
// General Shader Variables.
float4x4 matWorldViewProj;

//*****************************************************************************
// Structures for a screen space non-textured vertex.
struct VSBoundBoxData
{
	float3 v3Position	:	POSITION;
	float4 v4Color		:	COLOR;
};

struct PSBoundBoxData
{
	float4 v4Position	:	POSITION;
	float4 v4Color		:	COLOR;
};

//*****************************************************************************
// Shader Programs.
PSBoundBoxData BoundBoxVertexShader( VSBoundBoxData vsIn )
{
	PSBoundBoxData psIn = ( PSBoundBoxData )0.0;

	psIn.v4Position = mul( float4( vsIn.v3Position, 1.0 ), matWorldViewProj );	
	psIn.v4Color = vsIn.v4Color;

	return psIn;
}

float4 BoundBoxPixelShader( PSBoundBoxData psIn ) : COLOR
{
	return psIn.v4Color;
}

//*****************************************************************************
// Techniques.
technique BoundBoxShader
{
	pass p0
	{
		VertexShader = compile vs_2_0 BoundBoxVertexShader( );
		PixelShader	 = compile ps_2_0 BoundBoxPixelShader( );
	}
}