//--------------------------------------------------------------------
// UI Effect
// Author: Ben Smith
// Date  : November 28th, 2005
//--------------------------------------------------------------------

#include "Effects/StdFunctions.fx"

float4x4 WorldViewProjection : WORLDVIEWPROJ;

//--------------------------------------------------------------------
// Vertex Shader Output Structure
//--------------------------------------------------------------------
struct VS_OUTPUT
{
    float4 position   : POSITION;  //Vertex position on screen
};

//--------------------------------------------------------------------
// Vertex Shader that computes screen position, texture coordinates,
// and lit vertex color.
//--------------------------------------------------------------------
VS_OUTPUT VSRenderScene( float4 worldPos : POSITION )
{
    VS_OUTPUT Output;

     //Put cutout on screen
     Output.position = mul(worldPos,WorldViewProjection);

    return Output;
}

sampler Sampler = sampler_state
{
    Texture = (Tex);
    ADDRESSU  = CLAMP;
    ADDRESSV  = CLAMP;
	MinFilter = Anisotropic;
	MagFilter = Anisotropic;
	MipFilter = Linear;
};

//--------------------------------------------------------------------
// Pixel Shader Output Structure
//--------------------------------------------------------------------
struct PS_OUTPUT
{
    float4 color : COLOR;     //Pixel's final color
};

//--------------------------------------------------------------------
// Pixel Shader that computes pixel color based on vertex color and
// texture.
//--------------------------------------------------------------------
PS_OUTPUT PSRenderScene( VS_OUTPUT Input )
{
    PS_OUTPUT Output;
    Output.color = float4(1,1,1,1);
    
    return Output;
}

//--------------------------------------------------------------------------------------
// Medium Requirement Scene Rendering
//-------------------------------------- ------------------------------------------------
technique RenderScene_NoTexture
{
    pass Scene
    {
		//No Culling
		CULLMODE = None;
		
		//No Z-Buffer
		ZENABLE = false;
		ZWRITEENABLE = false;

		//Alpha Blending
		AlphaBlendEnable = true;
		SrcBlend = Zero;
		DestBlend = One;
		
		//Enable the stencil buffer
		//Referece one
		//Increment on pass
		StencilEnable = true;
		StencilRef	  = 1;
		StencilPass   = Replace;
		StencilFunc   = Greater;
		

        VertexShader = compile vs_1_1 VSRenderScene();
        PixelShader  = compile ps_2_0 PSRenderScene();
    }
}








