/*******************************************************************
*	DebugDraw.fx
*	Author - Pongthep Charnchaichujit
*	Created on - ?
*
*   All content © 2007 - 2008 DigiPen (USA) Corporation, all rights reserved.
*******************************************************************/
//CONSTANTS
float4x4 World;
float4x4 WorldViewProjection;

float4 DiffuseColor;

//STRUCTS
struct VS_IN {
	float4 pos : POSITION;
	float3 normal : NORMAL;
};

struct PS_IN {
	float4 pos : POSITION;
	float3 normal : TEXCOORD0;
	float4 wpos : TEXCOORD1;
};

//DebugDraw vertex shader
PS_IN DebugDrawVertexShader(VS_IN input)
{
	PS_IN output;

	output.pos = mul(input.pos, WorldViewProjection);
	output.normal = mul(input.normal, (float3x3)World);
	output.wpos = mul(input.pos, World);

	return output;
}

//DebugDraw pixel shader
float4 DebugDrawPixelShader(PS_IN input): COLOR
{	
	return DiffuseColor;
}

technique DebugDraw
{
	pass P0
	{
		VertexShader = compile vs_2_a DebugDrawVertexShader();
		PixelShader = compile ps_2_a DebugDrawPixelShader();
		CullMode = NONE;
		FillMode = WIREFRAME;
	}
}
