Quality slider overwrites custom shader settings. All effects now listen to the new...
[fg:toms-fgdata.git] / Effects / bowwave.eff
1 <?xml version="1.0" encoding="utf-8"?>
2 <PropertyList>
3         <name>Effects/bowwave</name>
4         <inherits-from>Effects/model-default</inherits-from>
5         <parameters>
6                 <texture n="0">
7                         <image>/Textures/Water/water-reflection.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                 <texture n="2">
14                         <image>/Textures/Water/perlin-noise-nm.dds</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/waves-ver10-dudv.dds</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                 <texture n="5">
35                         <image>/Textures/Water/sea_foam.dds</image>
36                         <filter>linear-mipmap-linear</filter>
37                         <wrap-s>repeat</wrap-s>
38                         <wrap-t>repeat</wrap-t>
39                         <internal-format>normalized</internal-format>
40                 </texture>
41                 <texture n="6">
42                         <image>/Textures/Water/bowwave3.dds</image>
43                         <filter>linear-mipmap-linear</filter>
44                         <wrap-s>repeat</wrap-s>
45                         <wrap-t>repeat</wrap-t>
46                         <internal-format>normalized</internal-format>
47                 </texture>
48                 <texture n="7">
49                         <image>/Textures/Water/bowwave_normal.dds</image>
50                         <filter>linear-mipmap-linear</filter>
51                         <wrap-s>repeat</wrap-s>
52                         <wrap-t>repeat</wrap-t>
53                         <internal-format>normalized</internal-format>
54                 </texture>
55                 <saturation>
56                         <use>/rendering/scene/saturation</use>
57                 </saturation>
58                 <status>
59                         <use>/environment/config/enabled</use>
60                 </status>
61                 <overcast>
62                         <use>/rendering/scene/overcast</use>
63                 </overcast>
64                 <cloud-cover0>
65                         <use>/environment/clouds/layer[0]/coverage-type</use>
66                 </cloud-cover0>
67                 <cloud-cover1>
68                         <use>/environment/clouds/layer[1]/coverage-type</use>
69                 </cloud-cover1>
70                 <cloud-cover2>
71                         <use>/environment/clouds/layer[2]/coverage-type</use>
72                 </cloud-cover2>
73                 <cloud-cover3>
74                         <use>/environment/clouds/layer[3]/coverage-type</use>
75                 </cloud-cover3>
76                 <cloud-cover4>
77                         <use>/environment/clouds/layer[4]/coverage-type</use>
78                 </cloud-cover4>
79                 <windE>
80                         <use>/environment/sea/surface/wind-from-east-fps</use>
81                 </windE>
82                 <windN>
83                         <use>/environment/sea/surface/wind-from-north-fps</use>
84                 </windN>
85                 <speed-kt>
86                         <use>/environment/Vinson/spd-kt</use>
87                 </speed-kt>
88                 <heading-deg>
89                         <use>/environment/Vinson/hdg-deg</use>
90                 </heading-deg>
91
92                 <rendering-hint>transparent</rendering-hint>
93                 <shade-model>smooth</shade-model>
94                 
95                 <!--    fog include -->
96                 <visibility>
97                         <use>/environment/ground-visibility-m</use>
98                 </visibility>
99                 <avisibility>
100                         <use>/environment/visibility-m</use>
101                 </avisibility>
102                 <lthickness>
103                         <use>/environment/ground-haze-thickness-m</use>
104                 </lthickness>
105                 <scattering>
106                         <use>/rendering/scene/scattering</use>
107                 </scattering>
108                 <terminator>
109                         <use>/environment/terminator-relative-position-m</use>
110                 </terminator>
111                 <fogtype>
112                         <use>/sim/rendering/shaders/skydome</use>
113                 </fogtype>
114                 <!--    END fog include -->
115         </parameters>
116         <technique n="9">
117                 <predicate>
118                         <and>
119                                 <property>/sim/rendering/shaders/water</property>
120                                 <less-equal>
121                                         <value type="float">2.0</value>
122                                         <float-property>/sim/rendering/shaders/water</float-property>
123                                 </less-equal>
124                                 <or>
125                                         <less-equal>
126                                                 <value type="float">2.0</value>
127                                                 <glversion/>
128                                         </less-equal>
129                                         <and>
130                                                 <extension-supported>GL_ARB_shader_objects</extension-supported>
131                                                 <extension-supported>GL_ARB_shading_language_100</extension-supported>
132                                                 <extension-supported>GL_ARB_vertex_shader</extension-supported>
133                                                 <extension-supported>GL_ARB_fragment_shader</extension-supported>
134                                         </and>
135                                 </or>
136                         </and>
137                 </predicate>
138                 <pass>
139                         <lighting>true</lighting>
140                         <material>
141                                 <active>
142                                         <use>material/active</use>
143                                 </active>
144                                 <ambient>
145                                         <use>material/ambient</use>
146                                 </ambient>
147                                 <diffuse>
148                                         <use>material/diffuse</use>
149                                 </diffuse>
150                                 <specular>
151                                         <use>material/specular</use>
152                                 </specular>
153                                 <emissive>
154                                         <use>material/emissive</use>
155                                 </emissive>
156                                 <shininess>
157                                         <use>material/shininess</use>
158                                 </shininess>
159                                 <color-mode>
160                                         <use>material/color-mode</use>
161                                 </color-mode>
162                         </material>
163                         <blend>
164                                 <active>
165                                         <use>blend/active</use>
166                                 </active>
167                                 <source>
168                                         <use>blend/source</use>
169                                 </source>
170                                 <destination>
171                                         <use>blend/destination</use>
172                                 </destination>
173                         </blend>
174                         <shade-model>
175                                 <use>shade-model</use>
176                         </shade-model>
177                         <cull-face>
178                                 <use>cull-face</use>
179                         </cull-face>
180                         <rendering-hint>
181                                 <use>rendering-hint</use>
182                         </rendering-hint>
183                         <texture-unit>
184                                 <unit>0</unit>
185                                 <image>
186                                         <use>texture[0]/image</use>
187                                 </image>
188                                 <filter>
189                                         <use>texture[0]/filter</use>
190                                 </filter>
191                                 <wrap-s>
192                                         <use>texture[0]/wrap-s</use>
193                                 </wrap-s>
194                                 <wrap-t>
195                                         <use>texture[0]/wrap-t</use>
196                                 </wrap-t>
197                                 <internal-format>
198                                         <use>texture[0]/internal-format</use>
199                                 </internal-format>
200                         </texture-unit>
201                         <texture-unit>
202                                 <unit>2</unit>
203                                 <image>
204                                         <use>texture[2]/image</use>
205                                 </image>
206                                 <filter>
207                                         <use>texture[2]/filter</use>
208                                 </filter>
209                                 <wrap-s>
210                                         <use>texture[2]/wrap-s</use>
211                                 </wrap-s>
212                                 <wrap-t>
213                                         <use>texture[2]/wrap-t</use>
214                                 </wrap-t>
215                                 <internal-format>
216                                         <use>texture[2]/internal-format</use>
217                                 </internal-format>
218                         </texture-unit>
219                         <texture-unit>
220                                 <unit>3</unit>
221                                 <image>
222                                         <use>texture[3]/image</use>
223                                 </image>
224                                 <filter>
225                                         <use>texture[3]/filter</use>
226                                 </filter>
227                                 <wrap-s>
228                                         <use>texture[3]/wrap-s</use>
229                                 </wrap-s>
230                                 <wrap-t>
231                                         <use>texture[3]/wrap-t</use>
232                                 </wrap-t>
233                                 <internal-format>
234                                         <use>texture[3]/internal-format</use>
235                                 </internal-format>
236                         </texture-unit>
237                         <texture-unit>
238                                 <unit>4</unit>
239                                 <image>
240                                         <use>texture[4]/image</use>
241                                 </image>
242                                 <filter>
243                                         <use>texture[4]/filter</use>
244                                 </filter>
245                                 <wrap-s>
246                                         <use>texture[4]/wrap-s</use>
247                                 </wrap-s>
248                                 <wrap-t>
249                                         <use>texture[4]/wrap-t</use>
250                                 </wrap-t>
251                                 <internal-format>
252                                         <use>texture[4]/internal-format</use>
253                                 </internal-format>
254                         </texture-unit>
255                         <texture-unit>
256                                 <unit>5</unit>
257                                 <image>
258                                         <use>texture[5]/image</use>
259                                 </image>
260                                 <filter>
261                                         <use>texture[5]/filter</use>
262                                 </filter>
263                                 <wrap-s>
264                                         <use>texture[5]/wrap-s</use>
265                                 </wrap-s>
266                                 <wrap-t>
267                                         <use>texture[5]/wrap-t</use>
268                                 </wrap-t>
269                                 <internal-format>
270                                         <use>texture[5]/internal-format</use>
271                                 </internal-format>
272                         </texture-unit>
273                         <texture-unit>
274                                 <unit>6</unit>
275                                 <image>
276                                         <use>texture[6]/image</use>
277                                 </image>
278                                 <filter>
279                                         <use>texture[6]/filter</use>
280                                 </filter>
281                                 <wrap-s>
282                                         <use>texture[6]/wrap-s</use>
283                                 </wrap-s>
284                                 <wrap-t>
285                                         <use>texture[6]/wrap-t</use>
286                                 </wrap-t>
287                                 <internal-format>
288                                         <use>texture[6]/internal-format</use>
289                                 </internal-format>
290                         </texture-unit>
291                         <texture-unit>
292                                 <unit>7</unit>
293                                 <image>
294                                         <use>texture[7]/image</use>
295                                 </image>
296                                 <filter>
297                                         <use>texture[7]/filter</use>
298                                 </filter>
299                                 <wrap-s>
300                                         <use>texture[7]/wrap-s</use>
301                                 </wrap-s>
302                                 <wrap-t>
303                                         <use>texture[7]/wrap-t</use>
304                                 </wrap-t>
305                                 <internal-format>
306                                         <use>texture[7]/internal-format</use>
307                                 </internal-format>
308                         </texture-unit>
309                         <texture-unit>
310                                 <unit>9</unit>
311                                 <type>noise</type>
312                         </texture-unit>
313                         <program>
314                                 <vertex-shader>Shaders/include_fog.vert</vertex-shader>
315                                 <vertex-shader>Shaders/wake.vert</vertex-shader>
316                                 <fragment-shader>Shaders/include_fog.frag</fragment-shader>
317                                 <fragment-shader>Shaders/bowwave.frag</fragment-shader>
318                         </program>
319                         <uniform>
320                                 <name>water_reflection</name>
321                                 <type>sampler-2d</type>
322                                 <value type="int">0</value>
323                         </uniform>
324                         <uniform>
325                                 <name>water_normalmap</name>
326                                 <type>sampler-2d</type>
327                                 <value type="int">2</value>
328                         </uniform>
329                         <uniform>
330                                 <name>water_dudvmap</name>
331                                 <type>sampler-2d</type>
332                                 <value type="int">3</value>
333                         </uniform>
334                         <uniform>
335                                 <name>water_reflection_grey</name>
336                                 <type>sampler-2d</type>
337                                 <value type="int">4</value>
338                         </uniform>
339                         <uniform>
340                                 <name>sea_foam</name>
341                                 <type>sampler-2d</type>
342                                 <value type="int">5</value>
343                         </uniform>
344                         <uniform>
345                                 <name>alpha_tex</name>
346                                 <type>sampler-2d</type>
347                                 <value type="int">6</value>
348                         </uniform>
349                         <uniform>
350                                 <name>bowwave_nmap</name>
351                                 <type>sampler-2d</type>
352                                 <value type="int">7</value>
353                         </uniform>
354                         <uniform>
355                                 <name>saturation</name>
356                                 <type>float</type>
357                                 <!--<value>0.4</value>-->
358                                 <value>
359                                         <use>saturation</use>
360                                 </value>
361                         </uniform>
362                         <uniform>
363                                 <name>CloudCover0</name>
364                                 <type>float</type>
365                                 <value>
366                                         <use>cloud-cover0</use>
367                                 </value>
368                         </uniform>
369                         <uniform>
370                                 <name>CloudCover1</name>
371                                 <type>float</type>
372                                 <value>
373                                         <use>cloud-cover1</use>
374                                 </value>
375                         </uniform>
376                         <uniform>
377                                 <name>CloudCover2</name>
378                                 <type>float</type>
379                                 <value>
380                                         <use>cloud-cover2</use>
381                                 </value>
382                         </uniform>
383                         <uniform>
384                                 <name>CloudCover3</name>
385                                 <type>float</type>
386                                 <value>
387                                         <use>cloud-cover3</use>
388                                 </value>
389                         </uniform>
390                         <uniform>
391                                 <name>CloudCover4</name>
392                                 <type>float</type>
393                                 <value>
394                                         <use>cloud-cover4</use>
395                                 </value>
396                         </uniform>
397                         <uniform>
398                                 <name>Status</name>
399                                 <type>int</type>
400                                 <value>
401                                         <use>status</use>
402                                 </value>
403                                 <!--<value type="int">0</value> -->
404                         </uniform>
405                         <uniform>
406                                 <name>Overcast</name>
407                                 <type>float</type>
408                                 <value>
409                                         <use>overcast</use>
410                                 </value>
411                         </uniform>
412                         <uniform>
413                                 <name>WindE</name>
414                                 <type>float</type>
415                                 <value>
416                                         <use>windE</use>
417                                 </value>
418                         </uniform>
419                         <uniform>
420                                 <name>WindN</name>
421                                 <type>float</type>
422                                 <value>
423                                         <use>windN</use>
424                                 </value>
425                         </uniform>
426                         <uniform>
427                                 <name>spd</name>
428                                 <type>float</type>
429                                 <value><use>speed-kt</use></value>
430                         </uniform>
431                         <uniform>
432                                 <name>hdg</name>
433                                 <type>float</type>
434                                 <value>
435                                         <use>heading-deg</use>
436                                 </value>
437                         </uniform>
438                         <uniform>
439                                 <name>Noise</name>
440                                 <type>sampler-3d</type>
441                                 <value type="int">9</value>
442                         </uniform>
443                         
444                         <!--        BEGIN fog include -->
445                         <uniform>
446                                 <name>visibility</name>
447                                 <type>float</type>
448                                 <value>
449                                         <use>visibility</use>
450                                 </value>
451                         </uniform>
452                         <uniform>
453                                 <name>avisibility</name>
454                                 <type>float</type>
455                                 <value>
456                                         <use>avisibility</use>
457                                 </value>
458                         </uniform>
459                         <uniform>
460                                 <name>hazeLayerAltitude</name>
461                                 <type>float</type>
462                                 <value>
463                                         <use>lthickness</use>
464                                 </value>
465                         </uniform>
466                         <uniform>
467                                 <name>scattering</name>
468                                 <type>float</type>
469                                 <value>
470                                         <use>scattering</use>
471                                 </value>
472                         </uniform>
473                         <uniform>
474                                 <name>terminator</name>
475                                 <type>float</type>
476                                 <value>
477                                         <use>terminator</use>
478                                 </value>
479                         </uniform>
480                         <uniform>
481                                 <name>fogType</name>
482                                 <type>int</type>
483                                 <value>
484                                         <use>fogtype</use>
485                                 </value>
486                         </uniform>
487                         <!--                    END fog include -->
488                 </pass>
489         </technique>
490         <technique n="10">
491                 <predicate>
492                         <and>
493                                 <property>/sim/rendering/shaders/water</property>
494                                 <or>
495                                         <less-equal>
496                                                 <value type="float">2.0</value>
497                                                 <glversion/>
498                                         </less-equal>
499                                         <and>
500                                                 <extension-supported>GL_ARB_shader_objects</extension-supported>
501                                                 <extension-supported>GL_ARB_shading_language_100</extension-supported>
502                                                 <extension-supported>GL_ARB_vertex_shader</extension-supported>
503                                                 <extension-supported>GL_ARB_fragment_shader</extension-supported>
504                                         </and>
505                                 </or>
506                         </and>
507                 </predicate>
508                 <pass>
509                         <lighting>true</lighting>
510                         <material>
511                                 <ambient>
512                                         <use>material/ambient</use>
513                                 </ambient>
514                                 <diffuse>
515                                         <use>material/diffuse</use>
516                                 </diffuse>
517                                 <specular>
518                                         <use>material/specular</use>
519                                 </specular>
520                                 <color-mode>ambient-and-diffuse</color-mode>
521                         </material>
522                         <blend>
523                                 <use>transparent</use>
524                         </blend>
525                         <alpha-test>
526                                 <use>transparent</use>
527                         </alpha-test>
528                         <shade-model>smooth</shade-model>
529                         <cull-face>back</cull-face>
530                         <!--<render-bin>
531                                 <bin-number>
532                                         <use>render-bin/bin-number</use>
533                                 </bin-number>
534                                 <bin-name>
535                                         <use>render-bin/bin-name</use>
536                                 </bin-name>
537                         </render-bin>-->
538                         <texture-unit>
539                                 <unit>0</unit>
540                                 <type>noise</type>
541                         </texture-unit>
542                         <program>
543                                 <vertex-shader>Shaders/water-orig.vert</vertex-shader>
544                                 <fragment-shader>Shaders/water-orig.frag</fragment-shader>
545                         </program>
546                         <uniform>
547                                 <name>texture</name>
548                                 <type>sampler-3d</type>
549                                 <value type="int">0</value>
550                         </uniform>
551                 </pass>
552         </technique>
553 </PropertyList>