Quality slider overwrites custom shader settings. All effects now listen to the new...
[fg:toms-fgdata.git] / Effects / water-inland.eff
1 <?xml version="1.0" encoding="utf-8"?>
2 <PropertyList>
3         <name>Effects/water</name>
4         <inherits-from>Effects/terrain-default</inherits-from>
5         <parameters>
6                 <texture n="0">
7                         <image>Textures/Water/water-reflection-inland.dds</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                 <texture n="2">
14                         <image>Textures/Water/water-normalmap.png</image>
15                         <filter>linear-mipmap-linear</filter>
16                         <wrap-s>repeat</wrap-s>
17                         <wrap-t>repeat</wrap-t>
18                         <internal-format>normalized</internal-format>
19                 </texture>
20                 <texture n="3">
21                         <image>Textures/Water/water-dudv.png</image>
22                         <filter>linear-mipmap-linear</filter>
23                         <wrap-s>repeat</wrap-s>
24                         <wrap-t>repeat</wrap-t>
25                         <internal-format>normalized</internal-format>
26                 </texture>
27                 <texture n="4">
28                         <image>Textures/Water/water-reflection-grey.png</image>
29                         <filter>linear-mipmap-linear</filter>
30                         <wrap-s>repeat</wrap-s>
31                         <wrap-t>repeat</wrap-t>
32                         <internal-format>normalized</internal-format>
33                 </texture>
34                 <saturation>
35                         <use>/rendering/scene/saturation</use>
36                 </saturation>
37                 <cloud-cover0>
38                         <use>/environment/clouds/layer[0]/coverage-type</use>
39                 </cloud-cover0>
40                 <cloud-cover1>
41                         <use>/environment/clouds/layer[1]/coverage-type</use>
42                 </cloud-cover1>
43                 <cloud-cover2>
44                         <use>/environment/clouds/layer[2]/coverage-type</use>
45                 </cloud-cover2>
46                 <cloud-cover3>
47                         <use>/environment/clouds/layer[3]/coverage-type</use>
48                 </cloud-cover3>
49                 <cloud-cover4>
50                         <use>/environment/clouds/layer[4]/coverage-type</use>
51                 </cloud-cover4>
52                 <!--    fog include -->
53                 <visibility>
54                         <use>/environment/ground-visibility-m</use>
55                 </visibility>
56                 <avisibility>
57                         <use>/environment/visibility-m</use>
58                 </avisibility>
59                 <lthickness>
60                         <use>/environment/ground-haze-thickness-m</use>
61                 </lthickness>
62                 <scattering>
63                         <use>/rendering/scene/scattering</use>
64                 </scattering>
65                 <terminator>
66                         <use>/environment/terminator-relative-position-m</use>
67                 </terminator>
68                 <fogtype>
69                         <use>/sim/rendering/shaders/skydome</use>
70                 </fogtype>
71                 <!--    END fog include -->
72         </parameters>
73         <technique n="8">
74                 <predicate>
75                         <and>
76                                 <property>/sim/rendering/shaders/water</property>
77                                 <less-equal>
78                                         <value type="float">2.0</value>
79                                         <float-property>/sim/rendering/shaders/water</float-property>
80                                 </less-equal>
81                                 <or>
82                                         <less-equal>
83                                                 <value type="float">2.0</value>
84                                                 <glversion/>
85                                         </less-equal>
86                                         <and>
87                                                 <extension-supported>GL_ARB_shader_objects</extension-supported>
88                                                 <extension-supported>GL_ARB_shading_language_100</extension-supported>
89                                                 <extension-supported>GL_ARB_vertex_shader</extension-supported>
90                                                 <extension-supported>GL_ARB_fragment_shader</extension-supported>
91                                         </and>
92                                 </or>
93                         </and>
94                 </predicate>
95                 <pass>
96                         <lighting>true</lighting>
97                         <material>
98                                 <ambient>
99                                         <use>material/ambient</use>
100                                 </ambient>
101                                 <diffuse>
102                                         <use>material/diffuse</use>
103                                 </diffuse>
104                                 <specular>
105                                         <use>material/specular</use>
106                                 </specular>
107                                 <color-mode>ambient-and-diffuse</color-mode>
108                         </material>
109                         <blend>
110                                 <use>transparent</use>
111                         </blend>
112                         <alpha-test>
113                                 <use>transparent</use>
114                         </alpha-test>
115                         <shade-model>smooth</shade-model>
116                         <cull-face>back</cull-face>
117                         <render-bin>
118                                 <bin-number>
119                                         <use>render-bin/bin-number</use>
120                                 </bin-number>
121                                 <bin-name>
122                                         <use>render-bin/bin-name</use>
123                                 </bin-name>
124                         </render-bin>
125                         <texture-unit>
126                                 <unit>0</unit>
127                                 <image>
128                                         <use>texture[0]/image</use>
129                                 </image>
130                                 <filter>
131                                         <use>texture[0]/filter</use>
132                                 </filter>
133                                 <wrap-s>
134                                         <use>texture[0]/wrap-s</use>
135                                 </wrap-s>
136                                 <wrap-t>
137                                         <use>texture[0]/wrap-t</use>
138                                 </wrap-t>
139                                 <internal-format>
140                                         <use>texture[0]/internal-format</use>
141                                 </internal-format>
142                         </texture-unit>
143                         <texture-unit>
144                                 <unit>2</unit>
145                                 <image>
146                                         <use>texture[2]/image</use>
147                                 </image>
148                                 <filter>
149                                         <use>texture[2]/filter</use>
150                                 </filter>
151                                 <wrap-s>
152                                         <use>texture[2]/wrap-s</use>
153                                 </wrap-s>
154                                 <wrap-t>
155                                         <use>texture[2]/wrap-t</use>
156                                 </wrap-t>
157                                 <internal-format>
158                                         <use>texture[2]/internal-format</use>
159                                 </internal-format>
160                         </texture-unit>
161                         <texture-unit>
162                                 <unit>3</unit>
163                                 <image>
164                                         <use>texture[3]/image</use>
165                                 </image>
166                                 <filter>
167                                         <use>texture[3]/filter</use>
168                                 </filter>
169                                 <wrap-s>
170                                         <use>texture[3]/wrap-s</use>
171                                 </wrap-s>
172                                 <wrap-t>
173                                         <use>texture[3]/wrap-t</use>
174                                 </wrap-t>
175                                 <internal-format>
176                                         <use>texture[3]/internal-format</use>
177                                 </internal-format>
178                         </texture-unit>
179                         <texture-unit>
180                                 <unit>4</unit>
181                                 <image>
182                                         <use>texture[4]/image</use>
183                                 </image>
184                                 <filter>
185                                         <use>texture[4]/filter</use>
186                                 </filter>
187                                 <wrap-s>
188                                         <use>texture[4]/wrap-s</use>
189                                 </wrap-s>
190                                 <wrap-t>
191                                         <use>texture[4]/wrap-t</use>
192                                 </wrap-t>
193                                 <internal-format>
194                                         <use>texture[4]/internal-format</use>
195                                 </internal-format>
196                         </texture-unit>
197                         <program>
198                                 <vertex-shader>Shaders/include_fog.vert</vertex-shader>
199                                 <vertex-shader>Shaders/water.vert</vertex-shader>
200                                 <fragment-shader>Shaders/water-inland.frag</fragment-shader>
201                         </program>
202                         <uniform>
203                                 <name>water_reflection</name>
204                                 <type>sampler-2d</type>
205                                 <value type="int">0</value>
206                         </uniform>
207                         <uniform>
208                                 <name>water_normalmap</name>
209                                 <type>sampler-2d</type>
210                                 <value type="int">2</value>
211                         </uniform>
212                         <uniform>
213                                 <name>water_dudvmap</name>
214                                 <type>sampler-2d</type>
215                                 <value type="int">3</value>
216                         </uniform>
217                         <uniform>
218                                 <name>water_reflection_grey</name>
219                                 <type>sampler-2d</type>
220                                 <value type="int">4</value>
221                         </uniform>
222                         <uniform>
223                                 <name>saturation</name>
224                                 <type>float</type>
225                                 <value>0.4</value>
226                                 <!--<value><use>saturation</use></value>-->
227                         </uniform>
228                         <uniform>
229                                 <name>CloudCover0</name>
230                                 <type>float</type>
231                                 <value>
232                                         <use>cloud-cover0</use>
233                                 </value>
234                         </uniform>
235                         <uniform>
236                                 <name>CloudCover1</name>
237                                 <type>float</type>
238                                 <value>
239                                         <use>cloud-cover1</use>
240                                 </value>
241                         </uniform>
242                         <uniform>
243                                 <name>CloudCover2</name>
244                                 <type>float</type>
245                                 <value>
246                                         <use>cloud-cover2</use>
247                                 </value>
248                         </uniform>
249                         <uniform>
250                                 <name>CloudCover3</name>
251                                 <type>float</type>
252                                 <value>
253                                         <use>cloud-cover3</use>
254                                 </value>
255                         </uniform>
256                         <uniform>
257                                 <name>CloudCover4</name>
258                                 <type>float</type>
259                                 <value>
260                                         <use>cloud-cover4</use>
261                                 </value>
262                         </uniform>
263                         <!--        BEGIN fog include -->
264                         <uniform>
265                                 <name>visibility</name>
266                                 <type>float</type>
267                                 <value>
268                                         <use>visibility</use>
269                                 </value>
270                         </uniform>
271                         <uniform>
272                                 <name>avisibility</name>
273                                 <type>float</type>
274                                 <value>
275                                         <use>avisibility</use>
276                                 </value>
277                         </uniform>
278                         <uniform>
279                                 <name>hazeLayerAltitude</name>
280                                 <type>float</type>
281                                 <value>
282                                         <use>lthickness</use>
283                                 </value>
284                         </uniform>
285                         <uniform>
286                                 <name>scattering</name>
287                                 <type>float</type>
288                                 <value>
289                                         <use>scattering</use>
290                                 </value>
291                         </uniform>
292                         <uniform>
293                                 <name>terminator</name>
294                                 <type>float</type>
295                                 <value>
296                                         <use>terminator</use>
297                                 </value>
298                         </uniform>
299                         <uniform>
300                                 <name>fogType</name>
301                                 <type>int</type>
302                                 <value>
303                                         <use>fogtype</use>
304                                 </value>
305                         </uniform>
306                         <!--                    END fog include -->
307                 </pass>
308         </technique>
309         <technique n="9">
310                 <predicate>
311                         <and>
312                                 <property>/sim/rendering/shaders/water</property>
313                                 <or>
314                                         <less-equal>
315                                                 <value type="float">2.0</value>
316                                                 <glversion/>
317                                         </less-equal>
318                                         <and>
319                                                 <extension-supported>GL_ARB_shader_objects</extension-supported>
320                                                 <extension-supported>GL_ARB_shading_language_100</extension-supported>
321                                                 <extension-supported>GL_ARB_vertex_shader</extension-supported>
322                                                 <extension-supported>GL_ARB_fragment_shader</extension-supported>
323                                         </and>
324                                 </or>
325                         </and>
326                 </predicate>
327                 <pass>
328                         <lighting>true</lighting>
329                         <material>
330                                 <ambient>
331                                         <use>material/ambient</use>
332                                 </ambient>
333                                 <diffuse>
334                                         <use>material/diffuse</use>
335                                 </diffuse>
336                                 <specular>
337                                         <use>material/specular</use>
338                                 </specular>
339                                 <color-mode>ambient-and-diffuse</color-mode>
340                         </material>
341                         <blend>
342                                 <use>transparent</use>
343                         </blend>
344                         <alpha-test>
345                                 <use>transparent</use>
346                         </alpha-test>
347                         <shade-model>smooth</shade-model>
348                         <cull-face>back</cull-face>
349                         <render-bin>
350                                 <bin-number>
351                                         <use>render-bin/bin-number</use>
352                                 </bin-number>
353                                 <bin-name>
354                                         <use>render-bin/bin-name</use>
355                                 </bin-name>
356                         </render-bin>
357                         <texture-unit>
358                                 <unit>0</unit>
359                                 <type>noise</type>
360                         </texture-unit>
361                         <program>
362                                 <vertex-shader>Shaders/water-orig.vert</vertex-shader>
363                                 <fragment-shader>Shaders/water-orig.frag</fragment-shader>
364                         </program>
365                         <uniform>
366                                 <name>texture</name>
367                                 <type>sampler-3d</type>
368                                 <value type="int">0</value>
369                         </uniform>
370                 </pass>
371         </technique>
372 </PropertyList>