<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
	<name>Effects/sunlight</name>
	<parameters>
		<filtering><use>/sim/rendering/shadows/filtering</use></filtering>
	</parameters>
	<technique n="9">
		<predicate>
			<and>
				<property>/sim/rendering/shadows/enabled</property>
				<less> <!-- filtering >= 2 -->
					<value type="float">1.0</value>
					<float-property>/sim/rendering/shadows/filtering</float-property>
				</less>
			</and>
		</predicate>
		<pass>
			<lighting>false</lighting>
			<depth>
				<enabled>false</enabled>
			</depth>
			<blend>
				<source>one</source>
				<destination>one</destination>
			</blend>
			<render-bin>
				<bin-number>1</bin-number>
				<bin-name>RenderBin</bin-name>
			</render-bin>
			<texture-unit>
				<unit>0</unit>
				<type>buffer</type>
				<name>depth</name>
			</texture-unit>
			<texture-unit>
				<unit>1</unit>
				<type>buffer</type>
				<name>normal</name>
			</texture-unit>
			<texture-unit>
				<unit>2</unit>
				<type>buffer</type>
				<name>diffuse</name>
			</texture-unit>
			<texture-unit>
				<unit>3</unit>
				<type>buffer</type>
				<name>spec-emis</name>
			</texture-unit>
			<texture-unit>
				<unit>4</unit>
				<type>buffer</type>
				<name>shadow</name>
			</texture-unit>
			<program>
				<vertex-shader>Shaders/sunlight.vert</vertex-shader>
				<fragment-shader>Shaders/sunlight.frag</fragment-shader>
				<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
			</program>
			<uniform>
				<name>depth_tex</name>
				<type>sampler-2d</type>
				<value type="int">0</value>
			</uniform>
			<uniform>
				<name>normal_tex</name>
				<type>sampler-2d</type>
				<value type="int">1</value>
			</uniform>
			<uniform>
				<name>color_tex</name>
				<type>sampler-2d</type>
				<value type="int">2</value>
			</uniform>
			<uniform>
				<name>spec_emis_tex</name>
				<type>sampler-2d</type>
				<value type="int">3</value>
			</uniform>
			<uniform>
				<name>shadow_tex</name>
				<type>sampler-2d</type>
				<value type="int">4</value>
			</uniform>
			<uniform>
				<name>filtering</name>
				<type>int</type>
				<value type="int"><use>filtering</use></value>
			</uniform>
			<!-- The following uniforms are automatically defined and initialized :
				- fg_SunAmbientColor
				- fg_SunDiffuseColor
				- fg_SunSpecularColor
				- fg_SunDirection
				- fg_ProjectionMatrixInverse
				- fg_ViewMatrixInverse
				- fg_ViewMatrix
				- fg_Planes
				- fg_ShadowNumber
				- fg_ShadowDistances
				- fg_ShadowMatrix_0
				- fg_ShadowMatrix_1
				- fg_ShadowMatrix_2
				- fg_ShadowMatrix_3
			-->
		</pass>
	</technique>
	<technique n="10">
		<predicate>
			<and>
				<property>/sim/rendering/shadows/enabled</property>
			</and>
		</predicate>
		<pass>
			<lighting>false</lighting>
			<depth>
				<enabled>false</enabled>
			</depth>
			<blend>
				<source>one</source>
				<destination>one</destination>
			</blend>
			<render-bin>
				<bin-number>1</bin-number>
				<bin-name>RenderBin</bin-name>
			</render-bin>
			<texture-unit>
				<unit>0</unit>
				<type>buffer</type>
				<name>depth</name>
			</texture-unit>
			<texture-unit>
				<unit>1</unit>
				<type>buffer</type>
				<name>normal</name>
			</texture-unit>
			<texture-unit>
				<unit>2</unit>
				<type>buffer</type>
				<name>diffuse</name>
			</texture-unit>
			<texture-unit>
				<unit>3</unit>
				<type>buffer</type>
				<name>spec-emis</name>
			</texture-unit>
			<texture-unit>
				<unit>4</unit>
				<type>buffer</type>
				<name>shadow</name>
			</texture-unit>
			<program>
				<vertex-shader>Shaders/sunlight.vert</vertex-shader>
				<fragment-shader>Shaders/sunlight-nofiltering.frag</fragment-shader>
				<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
			</program>
			<uniform>
				<name>depth_tex</name>
				<type>sampler-2d</type>
				<value type="int">0</value>
			</uniform>
			<uniform>
				<name>normal_tex</name>
				<type>sampler-2d</type>
				<value type="int">1</value>
			</uniform>
			<uniform>
				<name>color_tex</name>
				<type>sampler-2d</type>
				<value type="int">2</value>
			</uniform>
			<uniform>
				<name>spec_emis_tex</name>
				<type>sampler-2d</type>
				<value type="int">3</value>
			</uniform>
			<uniform>
				<name>shadow_tex</name>
				<type>sampler-2d</type>
				<value type="int">4</value>
			</uniform>
			<!-- The following uniforms are automatically defined and initialized :
				- fg_SunAmbientColor
				- fg_SunDiffuseColor
				- fg_SunSpecularColor
				- fg_SunDirection
				- fg_ProjectionMatrixInverse
				- fg_ViewMatrixInverse
				- fg_ViewMatrix
				- fg_Planes
				- fg_ShadowNumber
				- fg_ShadowDistances
				- fg_ShadowMatrix_0
				- fg_ShadowMatrix_1
				- fg_ShadowMatrix_2
				- fg_ShadowMatrix_3
			-->
		</pass>
	</technique>
	<technique n="11">
		<pass>
			<lighting>false</lighting>
			<depth>
				<enabled>false</enabled>
			</depth>
			<blend>
				<source>one</source>
				<destination>one</destination>
			</blend>
			<render-bin>
				<bin-number>1</bin-number>
				<bin-name>RenderBin</bin-name>
			</render-bin>
			<texture-unit>
				<unit>0</unit>
				<type>buffer</type>
				<name>depth</name>
			</texture-unit>
			<texture-unit>
				<unit>1</unit>
				<type>buffer</type>
				<name>normal</name>
			</texture-unit>
			<texture-unit>
				<unit>2</unit>
				<type>buffer</type>
				<name>diffuse</name>
			</texture-unit>
			<texture-unit>
				<unit>3</unit>
				<type>buffer</type>
				<name>spec-emis</name>
			</texture-unit>
			<program>
				<vertex-shader>Shaders/sunlight.vert</vertex-shader>
				<fragment-shader>Shaders/sunlight-noshadow.frag</fragment-shader>
				<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
			</program>
			<uniform>
				<name>depth_tex</name>
				<type>sampler-2d</type>
				<value type="int">0</value>
			</uniform>
			<uniform>
				<name>normal_tex</name>
				<type>sampler-2d</type>
				<value type="int">1</value>
			</uniform>
			<uniform>
				<name>color_tex</name>
				<type>sampler-2d</type>
				<value type="int">2</value>
			</uniform>
			<uniform>
				<name>spec_emis_tex</name>
				<type>sampler-2d</type>
				<value type="int">3</value>
			</uniform>
			<!-- The following uniforms are automatically defined and initialized :
				- fg_SunAmbientColor
				- fg_SunDiffuseColor
				- fg_SunSpecularColor
				- fg_SunDirection
				- fg_ProjectionMatrixInverse
				- fg_ViewMatrixInverse
				- fg_ViewMatrix
				- fg_Planes
			-->
		</pass>
	</technique>
</PropertyList>