<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
	<name>Effects/model-fuel</name>
	<inherits-from>Effects/model-default</inherits-from>
	
	<parameters>
		<!-- 		Diffuse Texture -->
		<!--		<texture n ="0">
		<type>white</type>
		</texture>-->
		<rendering-hint>opaque</rendering-hint>
		<transparent>false</transparent>
		<!-- 		INTERNAL USE -->
		<shade-model>smooth</shade-model>
		<model-pitch>
			<use>sim/model/fuel-tank-effect/pitch-rad</use>
		</model-pitch>
		<model-roll>
			<use>sim/model/fuel-tank-effect/roll-rad</use>
		</model-roll>
		<pos-lon>
			<use>position/model/longitude-deg</use>
		</pos-lon>
		<pos-lat>
			<use>position/model/latitude-deg</use>
		</pos-lat>
		<!-- Fuel Animation -->
		<fuel-level-norm type="float">0.0</fuel-level-norm>
		<z-min-m type="float">0.0</z-min-m>
		<z-max-m type="float">0.0</z-max-m>
		<front-low-x-m type="float">0.0</front-low-x-m>
		<front-high-x-m type="float">0.0</front-high-x-m>
		<rear-x-m type="float">0.0</rear-x-m>
		<!-- END Fuel Animation -->
		<render-bin>
			<bin-number>1</bin-number>
			<bin-name>RenderBin</bin-name>
		</render-bin>
	</parameters>
	
	<!--<generate>
	<tangent type="int">6</tangent>
	<binormal type="int">7</binormal>
	</generate>-->
	
	<technique n="4">
		<predicate>
			<and>
				<property>/sim/rendering/shaders/skydome</property>
				<property>/sim/rendering/shaders/quality-level</property>
				<property>/sim/rendering/shaders/model</property>
				<or>
					<less-equal>
						<value type="float">2.0</value>
						<glversion/>
					</less-equal>
					<and>
						<extension-supported>GL_ARB_shader_objects</extension-supported>
						<extension-supported>GL_ARB_shading_language_100</extension-supported>
						<extension-supported>GL_ARB_vertex_shader</extension-supported>
						<extension-supported>GL_ARB_fragment_shader</extension-supported>
					</and>
				</or>
			</and>
		</predicate>
		<pass>
			<lighting>true</lighting>
			<material>
				<active>
					<use>material/active</use>
				</active>
				<ambient>
					<use>material/ambient</use>
				</ambient>
				<diffuse>
					<use>material/diffuse</use>
				</diffuse>
				<specular>
					<use>material/specular</use>
				</specular>
				<emissive>
					<use>material/emissive</use>
				</emissive>
				<shininess>
					<use>material/shininess</use>
				</shininess>
				<color-mode>
					<use>material/color-mode</use>
				</color-mode>
			</material>
			<blend>
				<active>
					<use>blend/active</use>
				</active>
				<source>
					<use>blend/source</use>
				</source>
				<destination>
					<use>blend/destination</use>
				</destination>
			</blend>
			<shade-model>
				<use>shade-model</use>
			</shade-model>
			<cull-face>
				<use>cull-face</use>
			</cull-face>
			<rendering-hint>
				<use>rendering-hint</use>
			</rendering-hint>
			<blend>
				<use>transparent</use>
			</blend>
			<alpha-test>
				<use>transparent</use>
			</alpha-test>
			<render-bin>
				<bin-number>
					<use>render-bin/bin-number</use>
				</bin-number>
				<bin-name>
					<use>render-bin/bin-name</use>
				</bin-name>
			</render-bin>
			<!-- Diffuse texture unit-->
			<texture-unit>
				<unit>0</unit>
				<image>
					<use>texture[0]/image</use>
				</image>
				<type>
					<use>texture[0]/type</use>
				</type>
				<filter>
					<use>texture[0]/filter</use>
				</filter>
				<wrap-s>
					<use>texture[0]/wrap-s</use>
				</wrap-s>
				<wrap-t>
					<use>texture[0]/wrap-t</use>
				</wrap-t>
				<internal-format>
					<use>texture[0]/internal-format</use>
				</internal-format>
			</texture-unit>
			
			<vertex-program-two-side>
				<use>vertex-program-two-side</use>
			</vertex-program-two-side>
			
			<program>
				<vertex-shader n="0">Aircraft/Dragonfly/Models/Effects/model-fuel.vert</vertex-shader>
			</program>
			
			<uniform>
				<name>BaseTex</name>
				<type>sampler-2d</type>
				<value type="int">0</value>
			</uniform>
			
			<uniform>
				<name>fuel_level_norm</name>
				<type>float</type>
				<value><use>fuel-level-norm</use></value>
			</uniform>
			
			<uniform>
				<name>z_min_m</name>
				<type>float</type>
				<value><use>z-min-m</use></value>
			</uniform>
			
			<uniform>
				<name>z_max_m</name>
				<type>float</type>
				<value><use>z-max-m</use></value>
			</uniform>
			
			<uniform>
				<name>front_low_x_m</name>
				<type>float</type>
				<value><use>front-low-x-m</use></value>
			</uniform>
			
			<uniform>
				<name>front_high_x_m</name>
				<type>float</type>
				<value><use>front-high-x-m</use></value>
			</uniform>
			
			<uniform>
				<name>rear_x_m</name>
				<type>float</type>
				<value><use>rear-x-m</use></value>
			</uniform>
			
			<uniform>
				<name>pitch</name>
				<type>float</type>
				<value>
					<use>model-pitch</use>
				</value>
			</uniform>
			
			<uniform>
				<name>roll</name>
				<type>float</type>
				<value>
					<use>model-roll</use>
				</value>
			</uniform>
			
		</pass>
	</technique>
	
</PropertyList>
