// Auxilary lights

// N.B This is not used directly, since the mini light programs are set up in code.

// HLSL
vertex_program DeferredShading/post/hlsl/LightMaterial_vs hlsl
{
	source DeferredShading/post/hlsl/LightMaterial_vs.hlsl
	target vs_1_1
	entry_point main
	default_params
	{
		param_named_auto worldViewProj worldviewproj_matrix
		param_named_auto invProj inverse_projection_matrix
		param_named_auto vpWidth viewport_width
		param_named_auto vpHeight viewport_height
	}
}

fragment_program DeferredShading/post/hlsl/LightMaterial_ps hlsl
{
	source DeferredShading/post/hlsl/LightMaterial_ps.hlsl
	target ps_2_0
	entry_point main
	preprocessor_defines IS_ATTENUATED=1;IS_SPECULAR=1

	default_params
	{
		param_named_auto worldView worldview_matrix
		
		param_named lightDiffuseColor float4 0.0 0.0 0.0 0.0
		param_named lightSpecularColor float4 0.0 0.0 0.0 0.0
		param_named lightFalloff float4 0.0 0.0 0.0 0.0

		
		//param_named_auto lightDiffuseColor custom 1
		//param_named_auto lightSpecularColor custom 2
		//param_named_auto lightFalloff custom 3
	}
}

// GLSL
vertex_program DeferredShading/post/glsl/LightMaterial_vs glsl
{
	source DeferredShading/post/glsl/LightMaterial_vs.glsl
	default_params
	{
		param_named_auto invProj inverse_projection_matrix
		param_named_auto vpWidth viewport_width
		param_named_auto vpHeight viewport_height
	}
}
fragment_program DeferredShading/post/glsl/LightMaterial_ps glsl
{
	source DeferredShading/post/glsl/LightMaterial_ps.glsl
	preprocessor_defines IS_ATTENUATED=1,IS_SPECULAR=1
	default_params
	{
		param_named_auto worldView worldview_matrix
		
		param_named lightDiffuseColor float3 0.0 0.0 0.0 0.0
		param_named lightSpecularColor float3 0.0 0.0 0.0 0.0
		param_named lightFalloff float3 0.0 0.0 0.0 0.0

		
		//param_named_auto lightDiffuseColor custom 1
		//param_named_auto lightSpecularColor custom 2
		//param_named_auto lightFalloff custom 3
		
		param_named tex0 int 0
		param_named tex1 int 1
	}
}

// Unified
vertex_program DeferredShading/post/LightMaterial_vs unified
{
	delegate DeferredShading/post/hlsl/LightMaterial_vs
	delegate DeferredShading/post/glsl/LightMaterial_vs
}

fragment_program DeferredShading/post/LightMaterial_ps unified
{
	delegate DeferredShading/post/hlsl/LightMaterial_ps
	delegate DeferredShading/post/glsl/LightMaterial_ps
}
