Improvements for the hires grass texture effect
[fg:toms-fgdata.git] / Effects / airfield.eff
1 <?xml version="1.0" encoding="utf-8"?>
2 <PropertyList>
3         <name>Effects/airfield</name>
4         <inherits-from>Effects/terrain-default</inherits-from>
5         <parameters>
6                 <texture n="13">
7                     <image>Textures.high/Terrain/airport_grass2.png</image>
8                     <filter>linear-mipmap-linear</filter>
9                     <wrap-s>repeat</wrap-s>
10                     <wrap-t>repeat</wrap-t>
11                     <internal-format>normalized</internal-format>
12                 </texture>
13         </parameters>
14
15 <technique n="3">
16     <predicate>
17       <and>
18         <property>/sim/rendering/shaders/skydome</property>
19         <or>
20           <less-equal>
21             <value type="float">2.0</value>
22             <float-property>/sim/rendering/shaders/transition</float-property>
23           </less-equal>
24         </or>
25         <or>
26           <less-equal>
27             <value type="float">2.0</value>
28             <glversion/>
29           </less-equal>
30           <and>
31             <extension-supported>GL_ARB_shader_objects</extension-supported>
32             <extension-supported>GL_ARB_shading_language_100</extension-supported>
33             <extension-supported>GL_ARB_vertex_shader</extension-supported>
34             <extension-supported>GL_ARB_fragment_shader</extension-supported>
35           </and>
36         </or>
37       </and>
38     </predicate>
39     <pass>
40       <lighting>true</lighting>
41       <material>
42         <ambient><use>material/ambient</use></ambient>
43         <diffuse><use>material/diffuse</use></diffuse>
44         <specular><use>material/specular</use></specular>
45         <emissive><use>material/emissive</use></emissive>
46         <shininess><use>material/shininess</use></shininess>
47         <color-mode>ambient-and-diffuse</color-mode>
48       </material>
49       <alpha-test><use>transparent</use></alpha-test>
50       <shade-model>smooth</shade-model>
51       <cull-face>back</cull-face>
52       <render-bin>
53         <bin-number>-1</bin-number>
54         <bin-name>RenderBin</bin-name>
55       </render-bin>
56       <program>
57         <vertex-shader>Shaders/trivial.vert</vertex-shader>
58         <fragment-shader>Shaders/trivial.frag</fragment-shader>
59       </program>
60       <uniform>
61         <name>ylimit</name>
62         <type>float</type>
63         <value> <use>ylimit</use></value>
64       </uniform>
65        <uniform>
66         <name>zlimit1</name>
67         <type>float</type>
68         <value> <use>zlimit1</use></value>
69       </uniform>
70       <uniform>
71         <name>zlimit2</name>
72         <type>float</type>
73         <value> <use>zlimit2</use></value>
74       </uniform>
75       <color-mask type="vec4d">0 0 0 0</color-mask>
76     </pass>
77     <pass>
78       <lighting>true</lighting>
79       <material>
80         <ambient><use>material/ambient</use></ambient>
81         <diffuse><use>material/diffuse</use></diffuse>
82         <specular><use>material/specular</use></specular>
83         <emissive><use>material/emissive</use></emissive>
84         <shininess><use>material/shininess</use></shininess>
85         <color-mode>ambient-and-diffuse</color-mode>
86       </material>
87       <blend><use>transparent</use></blend>
88       <alpha-test><use>transparent</use></alpha-test>
89       <shade-model>smooth</shade-model>
90       <cull-face>back</cull-face>
91       <render-bin>
92         <bin-number><use>render-bin/bin-number</use></bin-number>
93         <bin-name><use>render-bin/bin-name</use></bin-name>
94       </render-bin>
95       <texture-unit>
96         <unit>0</unit>
97           <image><use>texture[13]/image</use></image>
98           <filter><use>texture[13]/filter</use></filter>
99           <wrap-s><use>texture[13]/wrap-s</use></wrap-s>
100           <wrap-t><use>texture[13]/wrap-t</use></wrap-t>
101           <internal-format>
102             <use>texture[13]/internal-format</use>
103           </internal-format>
104       </texture-unit>
105       <texture-unit>
106           <unit>1</unit>
107           <type>noise</type>
108       </texture-unit>
109       <texture-unit>
110         <unit>6</unit>
111           <image><use>texture[10]/image</use></image>
112           <filter><use>texture[10]/filter</use></filter>
113           <wrap-s><use>texture[10]/wrap-s</use></wrap-s>
114           <wrap-t><use>texture[10]/wrap-t</use></wrap-t>
115           <internal-format>
116             <use>texture[10]/internal-format</use>
117           </internal-format>
118       </texture-unit>
119       <program>
120         <vertex-shader>Shaders/terrain-haze-detailed.vert</vertex-shader>
121         <fragment-shader>Shaders/airfield.frag</fragment-shader>
122       </program>
123       <uniform>
124         <name>visibility</name>
125         <type>float</type>
126         <value><use>visibility</use></value>
127       </uniform>
128       <uniform>
129         <name>avisibility</name>
130         <type>float</type>
131         <value><use>avisibility</use></value>
132       </uniform>
133        <uniform>
134         <name>hazeLayerAltitude</name>
135         <type>float</type>
136         <value><use>lthickness</use></value>
137       </uniform>
138       <uniform>
139         <name>scattering</name>
140         <type>float</type>
141         <value><use>scattering</use></value>
142       </uniform>
143       <uniform>
144         <name>ground_scattering</name>
145         <type>float</type>
146         <value><use>ground_scattering</use></value>
147       </uniform>
148       <uniform>
149         <name>terminator</name>
150         <type>float</type>
151         <value><use>terminator</use></value>
152       </uniform>
153       <uniform>
154         <name>terrain_alt</name>
155         <type>float</type>
156         <value><use>terrain_alt</use></value>
157       </uniform>
158       <uniform>
159         <name>overcast</name>
160         <type>float</type>
161         <value><use>overcast</use></value>
162       </uniform>
163      <uniform>
164         <name>eye_alt</name>
165         <type>float</type>
166         <value><use>eye_alt</use></value>
167       </uniform>
168       <uniform>
169             <name>snowlevel</name>
170             <type>float</type>
171             <value>     <use>snow_level</use></value>
172      </uniform>
173          <uniform>
174             <name>snow_thickness_factor</name>
175             <type>float</type>
176             <value><use>snow_thickness_factor</use></value>
177       </uniform>
178         <uniform>
179         <name>dust_cover_factor</name>
180         <type>float</type>
181         <value> <use>dust_cover_factor</use></value>
182       </uniform>
183       <uniform>
184         <name>wetness</name>
185         <type>float</type>
186         <value> <use>wetness</use></value>
187       </uniform>
188         <uniform>
189         <name>fogstructure</name>
190         <type>float</type>
191         <value> <use>fogstructure</use></value>
192       </uniform>
193       <uniform>
194         <name>cloud_self_shading</name>
195         <type>float</type>
196         <value><use>cloud_self_shading</use></value>
197       </uniform>
198       <uniform>
199         <name>moonlight</name>
200         <type>float</type>
201         <value><use>moonlight</use></value>
202       </uniform>
203       <uniform>
204         <name>quality_level</name>
205         <type>int</type>
206         <value> <use>quality_level</use></value>
207       </uniform>
208       <uniform>
209         <name>tquality_level</name>
210         <type>int</type>
211         <value> <use>tquality_level</use></value>
212       </uniform>
213       <uniform>
214         <name>texture</name>
215         <type>sampler-2d</type>
216         <value type="int">0</value>
217       </uniform>
218       <uniform>
219         <name>snow_texture</name>
220         <type>sampler-2d</type>
221         <value type="int">6</value>
222       </uniform>
223       <uniform>
224         <name>colorMode</name>
225         <type>int</type>
226         <value>2</value> <!-- AMBIENT_AND_DIFFUSE -->
227       </uniform>
228       <depth>
229         <function>lequal</function>
230         <write-mask type="bool">false</write-mask>
231       </depth>
232     </pass>
233   </technique>
234 </PropertyList>