<?xml version="1.0"?>
<demo>
	<song file="cortez-marcello.mp3" bpm="140"/>

	<framebuffers>
		<texture name="backbuffer_color" width="screen" height="screen" format="rgba_8888">
			<sampler>
				<filering mag="linear" min="linear"/>
			</sampler>
		</texture>
		<texture name="backbuffer_depth" width="screen" height="screen" format="depth_stencil_24_8"/>
		<texture name="light_accumulation" width="screen" height="screen" format="rgba_8888">
			<sampler>
				<filering mag="linear" min="linear"/>
			</sampler>
		</texture>
		<texture name="diffuse_specular" width="screen" height="screen" format="rgba_8888">
			<sampler>
				<filering mag="linear" min="linear"/>
			</sampler>
		</texture>
		<texture name="normal_depth" width="screen" height="screen" format="rgba_fp32"/>
		<texture name="edge_buffer" width="screen" height="screen" format="red_8">
			<sampler>
				<filering mag="linear" min="linear"/>
			</sampler>
		</texture>
		<texture name="mlaa_buffer" width="screen" height="screen" format="rgba_8888">
			<sampler>
				<filering mag="linear" min="linear"/>
			</sampler>
		</texture>
		<texture name="blur_color" width="screen/2" height="screen/2" format="rgba_8888">
			<sampler>
				<filering mag="linear" min="linear"/>
			</sampler>
		</texture>
		<texture name="blur_temp_color" width="screen/2" height="screen/2" format="rgba_8888">
			<sampler>
				<filering mag="linear" min="linear"/>
			</sampler>
		</texture>
		<texture name="dof_color" width="screen/2" height="screen/2" format="rgba_8888">
			<sampler>
				<filering mag="linear" min="linear"/>
			</sampler>
		</texture>
		<texture name="ssao_buffer" width="screen" height="screen" format="rgba_8888">
			<sampler>
				<filering mag="linear" min="linear"/>
			</sampler>
		</texture>

		<fbo name="backbuffer">
			<attachment type="color0" buffer="backbuffer_color" />
			<attachment type="depth_stencil" buffer="backbuffer_depth" />
		</fbo>
		<fbo name="gbuffer">
			<attachment type="color0" buffer="diffuse_specular" />
			<attachment type="color1" buffer="normal_depth" />
			<attachment type="depth_stencil" buffer="backbuffer_depth" />
		</fbo>
		<fbo name="light_accumulation">
			<attachment type="color0" buffer="light_accumulation" />
		</fbo>
		<fbo name="blur">
			<attachment type="color0" buffer="blur_color" />
		</fbo>
		<fbo name="blur_temp">
			<attachment type="color0" buffer="blur_temp_color" />
		</fbo>
		<fbo name="dof">
			<attachment type="color0" buffer="dof_color" />
		</fbo>
		<fbo name="ssao_buffer">
			<attachment type="color0" buffer="ssao_buffer" />
		</fbo>
		<fbo name="edge_buffer">
			<attachment type="color0" buffer="edge_buffer" />
		</fbo>
		<fbo name="mlaa_buffer">
			<attachment type="color0" buffer="mlaa_buffer" />
		</fbo>

		<!-- shadow maps -->
		<texture name="spotlight_sm_dummy" width="1024" height="1024" format="rgba_8888"/>
		<texture name="spotlight_sm_01" width="1024" height="1024" format="depth_stencil_24_8">
			<sampler>
				<filering mag="linear" min="linear"/>
			</sampler>
		</texture>
		<fbo name="spotlight_sm_01">
			<attachment type="color0" buffer="spotlight_sm_dummy"/>
			<attachment type="depth" buffer="spotlight_sm_01"/>
		</fbo>
		<texture name="spotlight_sm_02" width="1024" height="1024" format="depth_stencil_24_8">
			<sampler>
				<filering mag="linear" min="linear"/>
			</sampler>
		</texture>
		<fbo name="spotlight_sm_02">
			<attachment type="color0" buffer="spotlight_sm_dummy"/>
			<attachment type="depth" buffer="spotlight_sm_02"/>
		</fbo>
		<texture name="spotlight_sm_03" width="1024" height="1024" format="depth_stencil_24_8">
			<sampler>
				<filering mag="linear" min="linear"/>
			</sampler>
		</texture>
		<fbo name="spotlight_sm_03">
			<attachment type="color0" buffer="spotlight_sm_dummy"/>
			<attachment type="depth" buffer="spotlight_sm_03"/>
		</fbo>
		<texture name="spotlight_sm_04" width="1024" height="1024" format="depth_stencil_24_8">
			<sampler>
				<filering mag="linear" min="linear"/>
			</sampler>
		</texture>
		<fbo name="spotlight_sm_04">
			<attachment type="color0" buffer="spotlight_sm_dummy"/>
			<attachment type="depth" buffer="spotlight_sm_04"/>
		</fbo>
	</framebuffers>

	<shaders>
		<!-- deferred lighting -->
		<program name="deferred/ambientlight" vert="yes" geom="yes" frag="yes"/>
		<program name="deferred/arealight" vert="yes" geom="yes" frag="yes"/>
		<program name="deferred/cubelight" vert="yes" geom="yes" frag="yes"/>
		<program name="deferred/dirlight" vert="yes" geom="yes" frag="yes"/>
		<program name="deferred/pointlight" vert="yes" geom="yes" frag="yes"/>
		<program name="deferred/spotlight" vert="yes" geom="yes" frag="yes"/>
		<program name="deferred/spotlight_shadow" vert="yes" geom="yes" frag="yes"/>
		<program name="deferred/linearlight" vert="yes" geom="yes" frag="yes"/>
		<program name="deferred/projectivelight" vert="yes" geom="yes" frag="yes"/>
		<program name="deferred/projectivelight_shadow" vert="yes" geom="yes" frag="yes"/>
		<program name="deferred/light_particle" vert="yes" geom="yes" frag="yes"/>
		<!-- basic deferred shaders -->
		<program name="deferred/geometry"/>
		<program name="deferred/geometry_dot3"/>
		<program name="deferred/decals"/>
		<!-- basic shadow shaders -->
		<!-- <program name="shadows/pointlight" vert="yes" geom="yes" frag="yes"/> -->
		<program name="shadows/spotlight"/>
		<!-- post processing shaders -->
		<program name="post/blur"/>
		<program name="post/motion_blur"/>
		<program name="post/radial_blur"/>
		<program name="post/glow"/>
		<program name="post/lightstreaks"/>
		<program name="post/mssao_downsample"/>
		<program name="post/mssao_first"/>
		<program name="post/mssao"/>
		<program name="post/mssao_last"/>
		<program name="post/mssao_blur"/>
		<program name="post/mssao_copy"/>
		<program name="post/ssao"/>
		<program name="post/edge_depth"/>
		<program name="post/edge_normals"/>
		<program name="post/mlaa"/>
		<program name="post/blit"/>
		<program name="post/blit_ssao"/>
		<program name="post/blit_glow"/>
		<program name="post/blit_glow_ssao"/>
		<program name="post/blit_dof"/>
		<program name="post/blit_dof_ssao"/>
		<program name="post/blit_dof_glow"/>
		<program name="post/blit_dof_glow_ssao"/>
		<!-- demo shaders -->
		<program name="vegetation/shrubs"/>
		<!-- <program name="vegetation/geometry_dot3"/> -->
		<program name="terrain/geometry"/>
		<program name="terrain/geometry_dot3"/>
		<program name="terrain/dome"/>
		<program name="terrain/decal"/>
		<!-- <program name="terrain/lightcube"/> -->
		<!-- <program name="terrain/clouds"/> -->
		<program name="terrain/cubed" vert="yes" geom="yes" frag="yes"/>
		<program name="terrain/octa" vert="yes" geom="yes" frag="yes"/>
		<program name="terrain/aeroplane" vert="yes" geom="yes" frag="yes"/>
		<!-- <program name="xform/particle" vert="yes" geom="yes" frag="yes"/> -->
		<!-- <program name="skin/geometry"/> -->
		<program name="fighter/geometry_dot3"/>
		<program name="deferred/meshlight"/>
		<program name="sentinel/particle" vert="yes" geom="yes" frag="yes"/>
		<program name="terrain/particle" vert="yes" geom="yes" frag="yes"/>

		<program name="xform/geometry" vert="yes" geom="yes" frag="yes">
			<feedback type="interleaved">
				<varying name="block.position"/>
				<varying name="block.velocity"/>
			</feedback>
		</program>
		<program name="xform/update" vert="yes" geom="yes" frag="yes">
			<feedback type="interleaved">
				<varying name="block.position"/>
				<varying name="block.velocity"/>
			</feedback>
		</program>
		<program name="xform/particle"/>

		<program name="ptf/particle" vert="yes" geom="yes" frag="yes"/>

		
		<program name="cubify/geometry" vert="yes" geom="yes" frag="yes">
			<feedback type="interleaved">
				<varying name="block.position"/>
				<varying name="block.normal"/>
			</feedback>
		</program>
		<program name="cubify/draw" vert="yes" geom="yes" frag="yes"/>
		<program name="misc/overlay" />
	</shaders>

	<textures>
		<!-- default textures used by demo system -->
		<image name="color_map" file="color_map3.png">
			<sampler>
				<filtering mag="linear" min="linear"/>
				<wrap s="edge" t="edge" r="edge"/>
			</sampler>
		</image>
		<image name="noise" file="noise.png">
			<sampler>
				<filtering mag="nearest" min="nearest"/>
			</sampler>
		</image>
		<image name="noise-dot3" file="noise-normal.jpg"/>
		<image name="perlin" file="perlin.jpg"/>
		<image name="pointlight" file="pointlight.png" premult="yes"/>
		<image name="black" file="black.png"/>
		<image name="gray" file="gray.png"/>
		<image name="white" file="white.png"/>
		<image name="red" file="red.png"/>
		<image name="simple-dot3" file="simple_dot3.jpg"/>

		<!-- textures used by the demo -->
		<image name="aztec7-diffuse" file="aztec007.jpg"/>
		<image name="aztec7-specular" file="aztec007spec.jpg"/>
		<image name="aztec7-dot3" file="aztec007_normal.jpg"/>

		<image name="aztec8-diffuse" file="aztec008.jpg"/>
		<image name="aztec8-specular" file="aztec008b.jpg"/>
		<image name="aztec8-dot3" file="aztec008_normal.jpg"/>

		<image name="aztec11-diffuse" file="aztec011.jpg"/>
		<image name="aztec11-specular" file="aztec011b.jpg"/>
		<image name="aztec11-dot3" file="aztec011_normal.jpg"/>

		<image name="aztec15-diffuse" file="aztec015.jpg"/>
		<image name="aztec15-specular" file="aztec015b.jpg"/>
		<image name="aztec15-dot3" file="aztec015_normal.jpg"/>

		<image name="aztec17-diffuse" file="aztec017.jpg"/>
		<image name="aztec17-specular" file="aztec017b.jpg"/>
		<image name="aztec17-dot3" file="aztec017_normal.jpg"/>

		<image name="aztec19-diffuse" file="aztec019.jpg"/>
		<image name="aztec19-specular" file="aztec019b.jpg"/>
		<image name="aztec19-dot3" file="aztec019_normal.jpg"/>

		<image name="aztec25-diffuse" file="aztec025.jpg"/>
		<image name="aztec25-specular" file="aztec025b.jpg"/>
		<image name="aztec25-dot3" file="aztec025_normal.jpg"/>

		<image name="aztec29-diffuse" file="aztec029.jpg"/>
		<image name="aztec29-specular" file="aztec029spec.jpg"/>
		<image name="aztec29-dot3" file="aztec029_normal.jpg"/>

		<image name="cube-diffuse" file="cube-diff.png"/>
		<image name="cube-specular" file="cube-spec.png"/>
		<image name="cube-dot3" file="cube-dot3.png"/>
		<image name="cube2-diffuse" file="cube2-diff.png"/>
		<image name="cube2-specular" file="cube2-spec.png"/>

		<image name="dirt-decal-02" file="dirt_decal_03.jpg"/>

		<image name="fighter-diffuse" file="fighter-diffuse.jpg"/>
		<image name="fighter2-diffuse" file="fighter2-diffuse.jpg"/>
		<image name="fighter-specular" file="fighter-specular.jpg"/>
		<image name="fighter-dot3" file="fighter-normal.jpg"/>
		<image name="fighter-glow" file="fighter-glow.jpg"/>
		<image name="fighter-damage" file="fighter-damage.jpg"/>

		<image name="sentinel-diffuse" file="sentinel_diffuse.jpg"/>
		<image name="sentinel-specular" file="sentinel_specular.jpg"/>
		<image name="sentinel-dot3" file="sentinel_normal.jpg"/>
		
		<image name="diffuse" file="diffus.jpg"/>
		<image name="normal" file="normal.jpg"/>
		<image name="specular" file="specular.jpg"/>

		<image name="shrubs01-diffuse" file="shrubs-001.png" premult="yes">
			<sampler>
				<wrap s="edge" t="edge" r="edge"/>
			</sampler>
		</image>
		<image name="shrubs02-diffuse" file="shrubs-002.png" premult="yes">
			<sampler>
				<wrap s="edge" t="edge" r="edge"/>
			</sampler>
		</image>
		<image name="shrubs03-diffuse" file="shrubs-003.png" premult="yes">
			<sampler>
				<wrap s="edge" t="edge" r="edge"/>
			</sampler>
		</image>

		<image name="vines01-diffuse" file="vines-001.png" premult="yes"/>

		<image name="roads-diffuse" file="roads_diffus.jpg"/>
		<image name="roads-dot3" file="roads_normal.jpg"/>
		<image name="roads-opacity" file="roads_opacity.jpg"/>

		<image name="stone1-diffuse" file="stone1_diffus.jpg"/>
		<image name="stone1-dot3" file="stone1_normal.jpg"/>

		<image name="stone2-diffuse" file="stone2_diffus.jpg"/>
		<image name="stone2-specular" file="stone2_specular.jpg"/>
		<image name="stone2-dot3" file="stone2_normal.jpg"/>

		<image name="stone3-diffuse" file="stone3_diffus.jpg"/>
		<image name="stone3-dot3" file="stone3_normal.jpg"/>

		<image name="carpet-diffuse" file="carpet-diff.jpg"/>
		<image name="carpet-specular" file="carpet-spec.jpg"/>
		<image name="carpet-dot3" file="carpet-normal.jpg"/>

		<image name="stucco-diffuse" file="stucco-diff.jpg"/>
		<image name="stucco-specular" file="stucco-spec.jpg"/>
		<image name="stucco-dot3" file="stucco-normal.jpg"/>

		<image name="walls-diffuse" file="walls-diff.jpg"/>
		<image name="walls-specular" file="walls-spec.jpg"/>
		<image name="walls-dot3" file="walls-normal.jpg"/>

		<image name="marmor-diffuse" file="marmor-diff.jpg"/>
		<image name="marmor-specular" file="marmor-spec.jpg"/>
		<image name="marmor-dot3" file="marmor-normal.jpg"/>

		<image name="tentacle-diffuse" file="blue_rusted_metal.jpg"/>
		<image name="tentacle-specular" file="blue_rusted_metal_specular.jpg"/>
		<image name="tentacle-dot3" file="blue_rusted_metal-normal.jpg"/>

		<image name="mud" file="mud.jpg"/>
		<image name="stone" file="stone.jpg"/>
		<image name="snow" file="snow.jpg"/>
		<image name="terrain-detail-diffuse" file="terrain_detail.jpg"/>
		<image name="terrain-detail-dot3" file="terrain_detail-dot3.jpg"/>
		<image name="clouds" file="clouds.jpg"/>

		<image name="sphere-diffuse" file="sphere-diffuse.png"/>
		<image name="sphere-specular" file="sphere-specular.jpg"/>
		<image name="sphere-dot3" file="sphere-normal.jpg"/>

		<image name="greetings-diffuse" file="greetings-diffuse.jpg"/>
		<image name="greetings-specular" file="greetings-specular.jpg"/>
		<image name="greetings-dot3" file="greetings-normal.jpg"/>

		<image name="credits-diffuse" file="credits-diffuse.jpg"/>
		<image name="credits-specular" file="credits-specular.jpg"/>
		<image name="credits-dot3" file="credits-normal.jpg"/>

		<image name="cracks" file="cracks.png"/>
		<image name="star" file="star.jpg"/>
		<image name="cortez" file="cortez.png"/>
		<image name="fuckings" file="fuckings.png"/>

		<cubemap name="cubemaps/viruslight" file="cubemaps/boxlight"/>
	</textures>

	<models>
		<mesh name="pyramid-1" file="intro-pyramid.rmzh"/>
		<mesh name="ground" file="ground.rmzh"/>
		<mesh name="clouds" file="intro-clouds.rmzh"/>
		<mesh name="aeroplane" file="intro-aeroplane.rmzh"/>
		<mesh name="intro-text" file="intro-text.rmzh"/>
		<mesh name="intro-text-outlines" file="intro-text-outlines.rmzh"/>
		<mesh name="intro-walker" file="intro-walker.rmzh"/>
		<mesh name="fighter" file="fighter.rmzh"/>
		<mesh name="lightbox" file="lightbox.rmzh"/>
		<mesh name="dome" file="dome.rmzh"/>
		<mesh name="sibenik" file="sibenik.rmzh"/>
		<mesh name="sentinel" file="sentinel.rmzh"/>
		<mesh name="statues" file="statues.rmzh"/>
		<mesh name="tunnel" file="tunnel.rmzh"/>
		<mesh name="gun" file="gun.rmzh"/>
		<mesh name="guntext" file="guntext.rmzh"/>
		<mesh name="tile" file="tile.rmzh"/>
		<mesh name="sphere" file="sphere.rmzh"/>
		<mesh name="strider" file="strider.rmzh"/>
		<mesh name="cracks" file="cracks.rmzh"/>
	</models>
</demo>
