/*******************************************************************
*	NoLight.fx
*	Author - Pongthep Charnchaichujit
*	Created on - 10/27/08
*
*   All content © 2007 - 2008 DigiPen (USA) Corporation, all rights reserved.
*******************************************************************/
#include "Scene.h"

//CONSTANTS
float4x4 WorldViewProjection;

texture m_texture;
float4 m_color;

//STRUCTS
struct VS_IN {
	float4 pos : POSITION;
	float2 tex : TEXCOORD;
};

struct PS_IN {
	float4 pos : POSITION;
	float2 tex : TEXCOORD0;
};

sampler TexSampler = sampler_state 
{
	texture = <m_texture>;
	AddressU  = WRAP;
	AddressV  = WRAP;
	AddressW  = WRAP;
	//MIPFILTER = LINEAR;
	MINFILTER = LINEAR;
	MAGFILTER = LINEAR;
};

PS_IN ColorVS(VS_IN input)
{
	PS_IN output;

	output.pos = mul(input.pos, WorldViewProjection);
	output.tex = input.tex;

	return output;
}

float4 ColorPS(PS_IN input): COLOR
{
	return tex2D(TexSampler, input.tex);
}

//Phong Technique
technique ColorPhong
{
	pass Phong
	{
		VertexShader = compile vs_2_a ColorVS();
		PixelShader = compile ps_2_a ColorPS();
	}
}
