Make water efect use png textures by default, and rely on their dds counterparts...
[fg:toms-fgdata.git] / Effects / water.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.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/waves-ver10-nm.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_sine_nmap.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                 <texture n="5">
35                         <image>Textures/Water/sea_foam.png</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/perlin-noise-nm.png</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         <normalmap_dds type="float">0.0</normalmap_dds>
49                 <saturation>
50                         <use>/rendering/scene/saturation</use>
51                 </saturation>
52                 <status>
53                         <use>/environment/config/enabled</use>
54                 </status>
55                 <overcast>
56                         <use>/rendering/scene/overcast</use>
57                 </overcast>
58                 <cloud-cover n="0">
59                         <use>/environment/clouds/layer[0]/coverage-type</use>
60                 </cloud-cover>
61                 <cloud-cover n="1">
62                         <use>/environment/clouds/layer[1]/coverage-type</use>
63                 </cloud-cover>
64                 <cloud-cover n="2" >
65                         <use>/environment/clouds/layer[2]/coverage-type</use>
66                 </cloud-cover>
67                 <cloud-cover n="3">
68                         <use>/environment/clouds/layer[3]/coverage-type</use>
69                 </cloud-cover>
70                 <cloud-cover n="4">
71                         <use>/environment/clouds/layer[4]/coverage-type</use>
72                 </cloud-cover>
73                 <windE>
74                         <use>/environment/sea/surface/wind-from-east-fps</use>
75                 </windE>
76                 <windN>
77                         <use>/environment/sea/surface/wind-from-north-fps</use>
78                 </windN>
79                 <WaveFreq>
80                         <use>/environment/wave/freq</use>
81                 </WaveFreq>
82                 <WaveAmp>
83                         <use>/environment/wave/amp</use>
84                 </WaveAmp>
85                 <WaveSharp>
86                         <use>/environment/wave/sharp</use>
87                 </WaveSharp>
88                 <WaveAngle>
89                         <use>/environment/wave/angle</use>
90                 </WaveAngle>
91                 <WaveFactor>
92                         <use>/environment/wave/factor</use>
93                 </WaveFactor>
94                 <WaveDAngle>
95                         <use>/environment/wave/dangle</use>
96                 </WaveDAngle>
97
98                 <!--    fog include -->
99                 <visibility>
100                         <use>/environment/ground-visibility-m</use>
101                 </visibility>
102                 <avisibility>
103                         <use>/environment/visibility-m</use>
104                 </avisibility>
105                 <lthickness>
106                         <use>/environment/ground-haze-thickness-m</use>
107                 </lthickness>
108                 <scattering>
109                         <use>/rendering/scene/scattering</use>
110                 </scattering>
111                 <ground_scattering>
112                         <use>/environment/surface/scattering</use>
113                 </ground_scattering>
114                 <terminator>
115                         <use>/environment/terminator-relative-position-m</use>
116                 </terminator>
117                 <terrain_alt>
118                         <use>/environment/mean-terrain-elevation-m</use>
119                 </terrain_alt>
120                 <overcast>
121                         <use>/rendering/scene/overcast</use>
122                 </overcast>
123                 <eye_alt>
124                         <use>/sim/rendering/eye-altitude-m</use>
125                 </eye_alt>
126                 <fogtype>
127                         <use>/sim/rendering/shaders/skydome</use>
128                 </fogtype>
129                 <!-- sea colors -->
130                 <sea_r>
131                         <use>/environment/sea/color_r</use>
132                 </sea_r>
133                 <sea_g>
134                         <use>/environment/sea/color_g</use>
135                 </sea_g>
136                 <sea_b>
137                         <use>/environment/sea/color_b</use>
138                 </sea_b>
139
140                 <!-- END fog include -->
141         </parameters>
142
143
144         <technique n="3">
145                 <predicate>
146                         <and>
147                                 <property>/sim/rendering/shaders/skydome</property>
148                                 <less-equal>
149                                         <value type="float">4.0</value>
150                                         <float-property>/sim/rendering/shaders/water</float-property>
151                                 </less-equal>
152                                 <or>
153                                         <less-equal>
154                                                 <value type="float">2.0</value>
155                                                 <glversion/>
156                                         </less-equal>
157                                         <and>
158                                                 <extension-supported>GL_ARB_shader_objects</extension-supported>
159                                                 <extension-supported>GL_ARB_shading_language_100</extension-supported>
160                                                 <extension-supported>GL_ARB_vertex_shader</extension-supported>
161                                                 <extension-supported>GL_ARB_fragment_shader</extension-supported>
162                                         </and>
163                                 </or>
164                         </and>
165                 </predicate>
166
167                 <pass>
168                         <lighting>true</lighting>
169                         <material>
170                                 <ambient>
171                                         <use>material/ambient</use>
172                                 </ambient>
173                                 <diffuse>
174                                         <use>material/diffuse</use>
175                                 </diffuse>
176                                 <specular>
177                                         <use>material/specular</use>
178                                 </specular>
179                                 <color-mode>ambient-and-diffuse</color-mode>
180                         </material>
181                         <blend>
182                                 <use>transparent</use>
183                         </blend>
184                         <alpha-test>
185                                 <use>transparent</use>
186                         </alpha-test>
187                         <shade-model>smooth</shade-model>
188                         <cull-face>back</cull-face>
189                         <render-bin>
190                                 <bin-number>
191                                         <use>render-bin/bin-number</use>
192                                 </bin-number>
193                                 <bin-name>
194                                         <use>render-bin/bin-name</use>
195                                 </bin-name>
196                         </render-bin>
197                         <!--<texture-unit>
198                                 <unit>0</unit>
199                                 <image>
200                                         <use>texture[0]/image</use>
201                                 </image>
202                                 <filter>
203                                         <use>texture[0]/filter</use>
204                                 </filter>
205                                 <wrap-s>
206                                         <use>texture[0]/wrap-s</use>
207                                 </wrap-s>
208                                 <wrap-t>
209                                         <use>texture[0]/wrap-t</use>
210                                 </wrap-t>
211                                 <internal-format>
212                                         <use>texture[0]/internal-format</use>
213                                 </internal-format>
214                         </texture-unit>-->
215                         <texture-unit>
216                                 <unit>2</unit>
217                                 <image>
218                                         <use>texture[2]/image</use>
219                                 </image>
220                                 <filter>
221                                         <use>texture[2]/filter</use>
222                                 </filter>
223                                 <wrap-s>
224                                         <use>texture[2]/wrap-s</use>
225                                 </wrap-s>
226                                 <wrap-t>
227                                         <use>texture[2]/wrap-t</use>
228                                 </wrap-t>
229                                 <internal-format>
230                                         <use>texture[2]/internal-format</use>
231                                 </internal-format>
232                         </texture-unit>
233                         <texture-unit>
234                                 <unit>3</unit>
235                                 <image>
236                                         <use>texture[3]/image</use>
237                                 </image>
238                                 <filter>
239                                         <use>texture[3]/filter</use>
240                                 </filter>
241                                 <wrap-s>
242                                         <use>texture[3]/wrap-s</use>
243                                 </wrap-s>
244                                 <wrap-t>
245                                         <use>texture[3]/wrap-t</use>
246                                 </wrap-t>
247                                 <internal-format>
248                                         <use>texture[3]/internal-format</use>
249                                 </internal-format>
250                         </texture-unit>
251                         <!--<texture-unit>
252                                 <unit>4</unit>
253                                 <image>
254                                         <use>texture[4]/image</use>
255                                 </image>
256                                 <filter>
257                                         <use>texture[4]/filter</use>
258                                 </filter>
259                                 <wrap-s>
260                                         <use>texture[4]/wrap-s</use>
261                                 </wrap-s>
262                                 <wrap-t>
263                                         <use>texture[4]/wrap-t</use>
264                                 </wrap-t>
265                                 <internal-format>
266                                         <use>texture[4]/internal-format</use>
267                                 </internal-format>
268                         </texture-unit>-->
269                         <texture-unit>
270                                 <unit>5</unit>
271                                 <image>
272                                         <use>texture[5]/image</use>
273                                 </image>
274                                 <filter>
275                                         <use>texture[5]/filter</use>
276                                 </filter>
277                                 <wrap-s>
278                                         <use>texture[5]/wrap-s</use>
279                                 </wrap-s>
280                                 <wrap-t>
281                                         <use>texture[5]/wrap-t</use>
282                                 </wrap-t>
283                                 <internal-format>
284                                         <use>texture[5]/internal-format</use>
285                                 </internal-format>
286                         </texture-unit>
287                         <texture-unit>
288                                 <unit>6</unit>
289                                 <image>
290                                         <use>texture[6]/image</use>
291                                 </image>
292                                 <filter>
293                                         <use>texture[6]/filter</use>
294                                 </filter>
295                                 <wrap-s>
296                                         <use>texture[6]/wrap-s</use>
297                                 </wrap-s>
298                                 <wrap-t>
299                                         <use>texture[6]/wrap-t</use>
300                                 </wrap-t>
301                                 <internal-format>
302                                         <use>texture[6]/internal-format</use>
303                                 </internal-format>
304                         </texture-unit>
305
306                         <program>
307                                 <vertex-shader>Shaders/water_lightfield.vert</vertex-shader>
308                                 <fragment-shader>Shaders/water_lightfield.frag</fragment-shader>
309                         </program>
310                         <!--<uniform>
311                                 <name>water_reflection</name>
312                                 <type>sampler-2d</type>
313                                 <value type="int">0</value>
314                         </uniform>-->
315                         <uniform>
316                                 <name>water_normalmap</name>
317                                 <type>sampler-2d</type>
318                                 <value type="int">2</value>
319                         </uniform>
320                         <uniform>
321                                 <name>water_dudvmap</name>
322                                 <type>sampler-2d</type>
323                                 <value type="int">3</value>
324                         </uniform>
325                         <uniform>
326                                 <name>sea_foam</name>
327                                 <type>sampler-2d</type>
328                                 <value type="int">5</value>
329                         </uniform>
330                         <uniform>
331                                 <name>perlin_normalmap</name>
332                                 <type>sampler-2d</type>
333                                 <value type="int">6</value>
334                         </uniform>
335             <!-- normalmap is .dds-->
336             <uniform>
337                 <name>normalmap_dds</name>
338                 <type>float</type>
339                 <value>
340                     <use>normalmap_dds</use>
341                 </value>
342             </uniform>
343                         <uniform>
344                                 <name>saturation</name>
345                                 <type>float</type>
346                                 <!--<value>0.4</value>-->
347                                 <value>
348                                         <use>saturation</use>
349                                 </value>
350                         </uniform>
351                         <uniform>
352                                 <name>WindE</name>
353                                 <type>float</type>
354                                 <value>
355                                         <use>windE</use>
356                                 </value>
357                         </uniform>
358                         <uniform>
359                                 <name>WindN</name>
360                                 <type>float</type>
361                                 <value>
362                                         <use>windN</use>
363                                 </value>
364                         </uniform>
365                         <uniform>
366                                 <name>WaveFreq</name>
367                                 <type>float</type>
368                                 <value>
369                                         <use>WaveFreq</use>
370                                 </value>
371                         </uniform>
372                         <uniform>
373                                 <name>WaveAmp</name>
374                                 <type>float</type>
375                                 <value>
376                                         <use>WaveAmp</use>
377                                 </value>
378                         </uniform>
379                         <uniform>
380                                 <name>WaveSharp</name>
381                                 <type>float</type>
382                                 <value>
383                                         <use>WaveSharp</use>
384                                 </value>
385                         </uniform>
386                         <uniform>
387                                 <name>WaveAngle</name>
388                                 <type>float</type>
389                                 <value>
390                                         <use>WaveAngle</use>
391                                 </value>
392                         </uniform>
393                         <uniform>
394                                 <name>WaveFactor</name>
395                                 <type>float</type>
396                                 <value>
397                                         <use>WaveFactor</use>
398                                 </value>
399                         </uniform>
400                         <uniform>
401                                 <name>WaveDAngle</name>
402                                 <type>float</type>
403                                 <value>
404                                         <use>WaveDAngle</use>
405                                 </value>
406                         </uniform>
407
408
409
410                         <!-- BEGIN fog include -->
411                         <uniform>
412                                 <name>visibility</name>
413                                 <type>float</type>
414                                 <value>
415                                         <use>visibility</use>
416                                 </value>
417                         </uniform>
418                         <uniform>
419                                 <name>avisibility</name>
420                                 <type>float</type>
421                                 <value>
422                                         <use>avisibility</use>
423                                 </value>
424                         </uniform>
425                         <uniform>
426                                 <name>hazeLayerAltitude</name>
427                                 <type>float</type>
428                                 <value>
429                                         <use>lthickness</use>
430                                 </value>
431                         </uniform>
432                         <uniform>
433                                 <name>scattering</name>
434                                 <type>float</type>
435                                 <value>
436                                         <use>scattering</use>
437                                 </value>
438                         </uniform>
439                         <uniform>
440                                 <name>ground_scattering</name>
441                                 <type>float</type>
442                                 <value>
443                                         <use>ground_scattering</use>
444                                 </value>
445                         </uniform>
446                         <uniform>
447                                 <name>terminator</name>
448                                 <type>float</type>
449                                 <value>
450                                         <use>terminator</use>
451                                 </value>
452                         </uniform>
453                         <uniform>
454                                 <name>terrain_alt</name>
455                                 <type>float</type>
456                                 <value>
457                                         <use>terrain_alt</use>
458                                 </value>
459                         </uniform>
460                         <uniform>
461                                 <name>overcast</name>
462                                 <type>float</type>
463                                 <value>
464                                         <use>overcast</use>
465                                 </value>
466                         </uniform>
467                         <uniform>
468                                 <name>eye_alt</name>
469                                 <type>float</type>
470                                 <value>
471                                         <use>eye_alt</use>
472                                 </value>
473                         </uniform>
474                         <!-- sea colors -->
475                         <uniform>
476                                 <name>sea_r</name>
477                                 <type>float</type>
478                                 <value>
479                                         <use>sea_r</use>
480                                 </value>
481                         </uniform>
482                         <uniform>
483                                 <name>sea_g</name>
484                                 <type>float</type>
485                                 <value>
486                                         <use>sea_g</use>
487                                 </value>
488                         </uniform>
489                         <uniform>
490                                 <name>sea_b</name>
491                                 <type>float</type>
492                                 <value>
493                                         <use>sea_b</use>
494                                 </value>
495                         </uniform>
496                         <!-- END fog include -->
497                 </pass>
498         </technique>
499
500
501
502         <technique n="8">
503                 <predicate>
504                         <and>
505                                 <property>/sim/rendering/shaders/water</property>
506                                 <less-equal>
507                                         <value type="float">4.0</value>
508                                         <float-property>/sim/rendering/shaders/water</float-property>
509                                 </less-equal>
510                                 <or>
511                                         <less-equal>
512                                                 <value type="float">2.0</value>
513                                                 <glversion/>
514                                         </less-equal>
515                                         <and>
516                                                 <extension-supported>GL_ARB_shader_objects</extension-supported>
517                                                 <extension-supported>GL_ARB_shading_language_100</extension-supported>
518                                                 <extension-supported>GL_ARB_vertex_shader</extension-supported>
519                                                 <extension-supported>GL_ARB_fragment_shader</extension-supported>
520                                         </and>
521                                 </or>
522                         </and>
523                 </predicate>
524                 <pass>
525                         <lighting>true</lighting>
526                         <material>
527                                 <ambient>
528                                         <use>material/ambient</use>
529                                 </ambient>
530                                 <diffuse>
531                                         <use>material/diffuse</use>
532                                 </diffuse>
533                                 <specular>
534                                         <use>material/specular</use>
535                                 </specular>
536                                 <color-mode>ambient-and-diffuse</color-mode>
537                         </material>
538                         <blend>
539                                 <use>transparent</use>
540                         </blend>
541                         <alpha-test>
542                                 <use>transparent</use>
543                         </alpha-test>
544                         <shade-model>smooth</shade-model>
545                         <cull-face>back</cull-face>
546                         <render-bin>
547                                 <bin-number>
548                                         <use>render-bin/bin-number</use>
549                                 </bin-number>
550                                 <bin-name>
551                                         <use>render-bin/bin-name</use>
552                                 </bin-name>
553                         </render-bin>
554
555                         <texture-unit>
556                                 <unit>0</unit>
557                                 <image>
558                                         <use>texture[0]/image</use>
559                                 </image>
560                                 <filter>
561                                         <use>texture[0]/filter</use>
562                                 </filter>
563                                 <wrap-s>
564                                         <use>texture[0]/wrap-s</use>
565                                 </wrap-s>
566                                 <wrap-t>
567                                         <use>texture[0]/wrap-t</use>
568                                 </wrap-t>
569                                 <internal-format>
570                                         <use>texture[0]/internal-format</use>
571                                 </internal-format>
572                         </texture-unit>
573                         <texture-unit>
574                                 <unit>2</unit>
575                                 <image>
576                                         <use>texture[2]/image</use>
577                                 </image>
578                                 <filter>
579                                         <use>texture[2]/filter</use>
580                                 </filter>
581                                 <wrap-s>
582                                         <use>texture[2]/wrap-s</use>
583                                 </wrap-s>
584                                 <wrap-t>
585                                         <use>texture[2]/wrap-t</use>
586                                 </wrap-t>
587                                 <internal-format>
588                                         <use>texture[2]/internal-format</use>
589                                 </internal-format>
590                         </texture-unit>
591                         <texture-unit>
592                                 <unit>3</unit>
593                                 <image>
594                                         <use>texture[3]/image</use>
595                                 </image>
596                                 <filter>
597                                         <use>texture[3]/filter</use>
598                                 </filter>
599                                 <wrap-s>
600                                         <use>texture[3]/wrap-s</use>
601                                 </wrap-s>
602                                 <wrap-t>
603                                         <use>texture[3]/wrap-t</use>
604                                 </wrap-t>
605                                 <internal-format>
606                                         <use>texture[3]/internal-format</use>
607                                 </internal-format>
608                         </texture-unit>
609                         <texture-unit>
610                                 <unit>4</unit>
611                                 <image>
612                                         <use>texture[4]/image</use>
613                                 </image>
614                                 <filter>
615                                         <use>texture[4]/filter</use>
616                                 </filter>
617                                 <wrap-s>
618                                         <use>texture[4]/wrap-s</use>
619                                 </wrap-s>
620                                 <wrap-t>
621                                         <use>texture[4]/wrap-t</use>
622                                 </wrap-t>
623                                 <internal-format>
624                                         <use>texture[4]/internal-format</use>
625                                 </internal-format>
626                         </texture-unit>
627                         <texture-unit>
628                                 <unit>5</unit>
629                                 <image>
630                                         <use>texture[5]/image</use>
631                                 </image>
632                                 <filter>
633                                         <use>texture[5]/filter</use>
634                                 </filter>
635                                 <wrap-s>
636                                         <use>texture[5]/wrap-s</use>
637                                 </wrap-s>
638                                 <wrap-t>
639                                         <use>texture[5]/wrap-t</use>
640                                 </wrap-t>
641                                 <internal-format>
642                                         <use>texture[5]/internal-format</use>
643                                 </internal-format>
644                         </texture-unit>
645                         <texture-unit>
646                                 <unit>6</unit>
647                                 <image>
648                                         <use>texture[6]/image</use>
649                                 </image>
650                                 <filter>
651                                         <use>texture[6]/filter</use>
652                                 </filter>
653                                 <wrap-s>
654                                         <use>texture[6]/wrap-s</use>
655                                 </wrap-s>
656                                 <wrap-t>
657                                         <use>texture[6]/wrap-t</use>
658                                 </wrap-t>
659                                 <internal-format>
660                                         <use>texture[6]/internal-format</use>
661                                 </internal-format>
662                         </texture-unit>
663
664                         <program>
665                                 <vertex-shader>Shaders/water.vert</vertex-shader>
666                                 <fragment-shader>Shaders/include_fog.frag</fragment-shader>
667                                 <fragment-shader>Shaders/water_sine.frag</fragment-shader>
668                         </program>
669                         <uniform>
670                                 <name>water_reflection</name>
671                                 <type>sampler-2d</type>
672                                 <value type="int">0</value>
673                         </uniform>
674                         <uniform>
675                                 <name>water_normalmap</name>
676                                 <type>sampler-2d</type>
677                                 <value type="int">2</value>
678                         </uniform>
679                         <uniform>
680                                 <name>water_dudvmap</name>
681                                 <type>sampler-2d</type>
682                                 <value type="int">3</value>
683                         </uniform>
684                         <uniform>
685                                 <name>water_reflection_grey</name>
686                                 <type>sampler-2d</type>
687                                 <value type="int">4</value>
688                         </uniform>
689                         <uniform>
690                                 <name>sea_foam</name>
691                                 <type>sampler-2d</type>
692                                 <value type="int">5</value>
693                         </uniform>
694                         <uniform>
695                                 <name>perlin_normalmap</name>
696                                 <type>sampler-2d</type>
697                                 <value type="int">6</value>
698                         </uniform>
699             <!-- normalmap is .dds-->
700             <uniform>
701                 <name>normalmap_dds</name>
702                 <type>float</type>
703                 <value>
704                     <use>normalmap_dds</use>
705                 </value>
706             </uniform>
707                         <uniform>
708                                 <name>saturation</name>
709                                 <type>float</type>
710                                 <!--<value>0.4</value>-->
711                                 <value>
712                                         <use>saturation</use>
713                                 </value>
714                         </uniform>
715                         <uniform>
716                                 <name>CloudCover0</name>
717                                 <type>float</type>
718                                 <value>
719                                         <use>cloud-cover[0]</use>
720                                 </value>
721                         </uniform>
722                         <uniform>
723                                 <name>CloudCover1</name>
724                                 <type>float</type>
725                                 <value>
726                                         <use>cloud-cover[1]</use>
727                                 </value>
728                         </uniform>
729                         <uniform>
730                                 <name>CloudCover2</name>
731                                 <type>float</type>
732                                 <value>
733                                         <use>cloud-cover[2]</use>
734                                 </value>
735                         </uniform>
736                         <uniform>
737                                 <name>CloudCover3</name>
738                                 <type>float</type>
739                                 <value>
740                                         <use>cloud-cover[3]</use>
741                                 </value>
742                         </uniform>
743                         <uniform>
744                                 <name>CloudCover4</name>
745                                 <type>float</type>
746                                 <value>
747                                         <use>cloud-cover[4]</use>
748                                 </value>
749                         </uniform>
750                         <uniform>
751                                 <name>Status</name>
752                                 <type>int</type>
753                                 <value>
754                                         <use>status</use>
755                                 </value>
756                                 <!--<value type="int">0</value> -->
757                         </uniform>
758                         <uniform>
759                                 <name>Overcast</name>
760                                 <type>float</type>
761                                 <value>
762                                         <use>overcast</use>
763                                 </value>
764                         </uniform>
765                         <uniform>
766                                 <name>WindE</name>
767                                 <type>float</type>
768                                 <value>
769                                         <use>windE</use>
770                                 </value>
771                         </uniform>
772                         <uniform>
773                                 <name>WindN</name>
774                                 <type>float</type>
775                                 <value>
776                                         <use>windN</use>
777                                 </value>
778                         </uniform>
779                         <uniform>
780                                 <name>WaveFreq</name>
781                                 <type>float</type>
782                                 <value>
783                                         <use>WaveFreq</use>
784                                 </value>
785                         </uniform>
786                         <uniform>
787                                 <name>WaveAmp</name>
788                                 <type>float</type>
789                                 <value>
790                                         <use>WaveAmp</use>
791                                 </value>
792                         </uniform>
793                         <uniform>
794                                 <name>WaveSharp</name>
795                                 <type>float</type>
796                                 <value>
797                                         <use>WaveSharp</use>
798                                 </value>
799                         </uniform>
800                         <uniform>
801                                 <name>WaveAngle</name>
802                                 <type>float</type>
803                                 <value>
804                                         <use>WaveAngle</use>
805                                 </value>
806                         </uniform>
807                         <uniform>
808                                 <name>WaveFactor</name>
809                                 <type>float</type>
810                                 <value>
811                                         <use>WaveFactor</use>
812                                 </value>
813                         </uniform>
814                         <uniform>
815                                 <name>WaveDAngle</name>
816                                 <type>float</type>
817                                 <value>
818                                         <use>WaveDAngle</use>
819                                 </value>
820                         </uniform>
821
822                         <!-- BEGIN fog include -->
823                         <uniform>
824                                 <name>visibility</name>
825                                 <type>float</type>
826                                 <value>
827                                         <use>visibility</use>
828                                 </value>
829                         </uniform>
830                         <uniform>
831                                 <name>avisibility</name>
832                                 <type>float</type>
833                                 <value>
834                                         <use>avisibility</use>
835                                 </value>
836                         </uniform>
837                         <uniform>
838                                 <name>hazeLayerAltitude</name>
839                                 <type>float</type>
840                                 <value>
841                                         <use>lthickness</use>
842                                 </value>
843                         </uniform>
844                         <uniform>
845                                 <name>scattering</name>
846                                 <type>float</type>
847                                 <value>
848                                         <use>scattering</use>
849                                 </value>
850                         </uniform>
851                         <uniform>
852                                 <name>terminator</name>
853                                 <type>float</type>
854                                 <value>
855                                         <use>terminator</use>
856                                 </value>
857                         </uniform>
858                         <uniform>
859                                 <name>fogType</name>
860                                 <type>int</type>
861                                 <value>
862                                         <use>fogtype</use>
863                                 </value>
864                         </uniform>
865                         <!-- END fog include -->
866                 </pass>
867         </technique>
868         <technique n="9">
869                 <predicate>
870                         <and>
871                                 <property>/sim/rendering/shaders/water</property>
872                                 <less-equal>
873                                         <value type="float">2.0</value>
874                                         <float-property>/sim/rendering/shaders/water</float-property>
875                                 </less-equal>
876                                 <or>
877                                         <less-equal>
878                                                 <value type="float">2.0</value>
879                                                 <glversion/>
880                                         </less-equal>
881                                         <and>
882                                                 <extension-supported>GL_ARB_shader_objects</extension-supported>
883                                                 <extension-supported>GL_ARB_shading_language_100</extension-supported>
884                                                 <extension-supported>GL_ARB_vertex_shader</extension-supported>
885                                                 <extension-supported>GL_ARB_fragment_shader</extension-supported>
886                                         </and>
887                                 </or>
888                         </and>
889                 </predicate>
890                 <pass>
891                         <lighting>true</lighting>
892                         <material>
893                                 <ambient>
894                                         <use>material/ambient</use>
895                                 </ambient>
896                                 <diffuse>
897                                         <use>material/diffuse</use>
898                                 </diffuse>
899                                 <specular>
900                                         <use>material/specular</use>
901                                 </specular>
902                                 <color-mode>ambient-and-diffuse</color-mode>
903                         </material>
904                         <blend>
905                                 <use>transparent</use>
906                         </blend>
907                         <alpha-test>
908                                 <use>transparent</use>
909                         </alpha-test>
910                         <shade-model>smooth</shade-model>
911                         <cull-face>back</cull-face>
912                         <render-bin>
913                                 <bin-number>
914                                         <use>render-bin/bin-number</use>
915                                 </bin-number>
916                                 <bin-name>
917                                         <use>render-bin/bin-name</use>
918                                 </bin-name>
919                         </render-bin>
920                         <texture-unit>
921                                 <unit>0</unit>
922                                 <image>
923                                         <use>texture[0]/image</use>
924                                 </image>
925                                 <filter>
926                                         <use>texture[0]/filter</use>
927                                 </filter>
928                                 <wrap-s>
929                                         <use>texture[0]/wrap-s</use>
930                                 </wrap-s>
931                                 <wrap-t>
932                                         <use>texture[0]/wrap-t</use>
933                                 </wrap-t>
934                                 <internal-format>
935                                         <use>texture[0]/internal-format</use>
936                                 </internal-format>
937                         </texture-unit>
938                         <texture-unit>
939                                 <unit>2</unit>
940                                 <image>
941                                         <use>texture[2]/image</use>
942                                 </image>
943                                 <filter>
944                                         <use>texture[2]/filter</use>
945                                 </filter>
946                                 <wrap-s>
947                                         <use>texture[2]/wrap-s</use>
948                                 </wrap-s>
949                                 <wrap-t>
950                                         <use>texture[2]/wrap-t</use>
951                                 </wrap-t>
952                                 <internal-format>
953                                         <use>texture[2]/internal-format</use>
954                                 </internal-format>
955                         </texture-unit>
956                         <texture-unit>
957                                 <unit>3</unit>
958                                 <image>
959                                         <use>texture[3]/image</use>
960                                 </image>
961                                 <filter>
962                                         <use>texture[3]/filter</use>
963                                 </filter>
964                                 <wrap-s>
965                                         <use>texture[3]/wrap-s</use>
966                                 </wrap-s>
967                                 <wrap-t>
968                                         <use>texture[3]/wrap-t</use>
969                                 </wrap-t>
970                                 <internal-format>
971                                         <use>texture[3]/internal-format</use>
972                                 </internal-format>
973                         </texture-unit>
974                         <texture-unit>
975                                 <unit>4</unit>
976                                 <image>
977                                         <use>texture[4]/image</use>
978                                 </image>
979                                 <filter>
980                                         <use>texture[4]/filter</use>
981                                 </filter>
982                                 <wrap-s>
983                                         <use>texture[4]/wrap-s</use>
984                                 </wrap-s>
985                                 <wrap-t>
986                                         <use>texture[4]/wrap-t</use>
987                                 </wrap-t>
988                                 <internal-format>
989                                         <use>texture[4]/internal-format</use>
990                                 </internal-format>
991                         </texture-unit>
992                         <texture-unit>
993                                 <unit>5</unit>
994                                 <image>
995                                         <use>texture[5]/image</use>
996                                 </image>
997                                 <filter>
998                                         <use>texture[5]/filter</use>
999                                 </filter>
1000                                 <wrap-s>
1001                                         <use>texture[5]/wrap-s</use>
1002                                 </wrap-s>
1003                                 <wrap-t>
1004                                         <use>texture[5]/wrap-t</use>
1005                                 </wrap-t>
1006                                 <internal-format>
1007                                         <use>texture[5]/internal-format</use>
1008                                 </internal-format>
1009                         </texture-unit>
1010                         <texture-unit>
1011                                 <unit>6</unit>
1012                                 <image>
1013                                         <use>texture[6]/image</use>
1014                                 </image>
1015                                 <filter>
1016                                         <use>texture[6]/filter</use>
1017                                 </filter>
1018                                 <wrap-s>
1019                                         <use>texture[6]/wrap-s</use>
1020                                 </wrap-s>
1021                                 <wrap-t>
1022                                         <use>texture[6]/wrap-t</use>
1023                                 </wrap-t>
1024                                 <internal-format>
1025                                         <use>texture[6]/internal-format</use>
1026                                 </internal-format>
1027                         </texture-unit>
1028
1029                         <program>
1030                                 <vertex-shader>Shaders/water.vert</vertex-shader>
1031                                 <fragment-shader>Shaders/include_fog.frag</fragment-shader>
1032                                 <fragment-shader>Shaders/water.frag</fragment-shader>
1033                         </program>
1034                         <uniform>
1035                                 <name>water_reflection</name>
1036                                 <type>sampler-2d</type>
1037                                 <value type="int">0</value>
1038                         </uniform>
1039                         <uniform>
1040                                 <name>water_normalmap</name>
1041                                 <type>sampler-2d</type>
1042                                 <value type="int">2</value>
1043                         </uniform>
1044                         <uniform>
1045                                 <name>water_dudvmap</name>
1046                                 <type>sampler-2d</type>
1047                                 <value type="int">3</value>
1048                         </uniform>
1049                         <uniform>
1050                                 <name>water_reflection_grey</name>
1051                                 <type>sampler-2d</type>
1052                                 <value type="int">4</value>
1053                         </uniform>
1054                         <uniform>
1055                                 <name>sea_foam</name>
1056                                 <type>sampler-2d</type>
1057                                 <value type="int">5</value>
1058                         </uniform>
1059                         <uniform>
1060                                 <name>perlin_normalmap</name>
1061                                 <type>sampler-2d</type>
1062                                 <value type="int">6</value>
1063                         </uniform>
1064             <!-- normalmap is .dds-->
1065             <uniform>
1066                 <name>normalmap_dds</name>
1067                 <type>float</type>
1068                 <value>
1069                     <use>normalmap_dds</use>
1070                 </value>
1071             </uniform>
1072                         <uniform>
1073                                 <name>saturation</name>
1074                                 <type>float</type>
1075                                 <!--<value>0.4</value>-->
1076                                 <value>
1077                                         <use>saturation</use>
1078                                 </value>
1079                         </uniform>
1080                         <uniform>
1081                                 <name>CloudCover0</name>
1082                                 <type>float</type>
1083                                 <value>
1084                                         <use>cloud-cover[0]</use>
1085                                 </value>
1086                         </uniform>
1087                         <uniform>
1088                                 <name>CloudCover1</name>
1089                                 <type>float</type>
1090                                 <value>
1091                                         <use>cloud-cover[1]</use>
1092                                 </value>
1093                         </uniform>
1094                         <uniform>
1095                                 <name>CloudCover2</name>
1096                                 <type>float</type>
1097                                 <value>
1098                                         <use>cloud-cover[2]</use>
1099                                 </value>
1100                         </uniform>
1101                         <uniform>
1102                                 <name>CloudCover3</name>
1103                                 <type>float</type>
1104                                 <value>
1105                                         <use>cloud-cover[3]</use>
1106                                 </value>
1107                         </uniform>
1108                         <uniform>
1109                                 <name>CloudCover4</name>
1110                                 <type>float</type>
1111                                 <value>
1112                                         <use>cloud-cover[4]</use>
1113                                 </value>
1114                         </uniform>
1115                         <uniform>
1116                                 <name>Status</name>
1117                                 <type>int</type>
1118                                 <value>
1119                                         <use>status</use>
1120                                 </value>
1121                         </uniform>
1122                         <uniform>
1123                                 <name>Overcast</name>
1124                                 <type>float</type>
1125                                 <value>
1126                                         <use>overcast</use>
1127                                 </value>
1128                         </uniform>
1129                         <uniform>
1130                                 <name>WindE</name>
1131                                 <type>float</type>
1132                                 <value>
1133                                         <use>windE</use>
1134                                 </value>
1135                         </uniform>
1136                         <uniform>
1137                                 <name>WindN</name>
1138                                 <type>float</type>
1139                                 <value>
1140                                         <use>windN</use>
1141                                 </value>
1142                         </uniform>
1143                         <!--uniform> unused?
1144                                 <name>WindFrom</name>
1145                                 <type>float</type>
1146                                 <value>
1147                                         <use>wind-from</use>
1148                                 </value>
1149                         </uniform-->
1150                         <uniform>
1151                                 <name>WaveFreq</name>
1152                                 <type>float</type>
1153                                 <value>
1154                                         <use>WaveFreq</use>
1155                                 </value>
1156                         </uniform>
1157                         <uniform>
1158                                 <name>WaveAmp</name>
1159                                 <type>float</type>
1160                                 <value>
1161                                         <use>WaveAmp</use>
1162                                 </value>
1163                         </uniform>
1164                         <uniform>
1165                                 <name>WaveSharp</name>
1166                                 <type>float</type>
1167                                 <value>
1168                                         <use>WaveSharp</use>
1169                                 </value>
1170                         </uniform>
1171                         <uniform>
1172                                 <name>WaveAngle</name>
1173                                 <type>float</type>
1174                                 <value>
1175                                         <use>WaveAngle</use>
1176                                 </value>
1177                         </uniform>
1178                         <uniform>
1179                                 <name>WaveFactor</name>
1180                                 <type>float</type>
1181                                 <value>
1182                                         <use>WaveFactor</use>
1183                                 </value>
1184                         </uniform>
1185                         <uniform>
1186                                 <name>WaveDAngle</name>
1187                                 <type>float</type>
1188                                 <value>
1189                                         <use>WaveDAngle</use>
1190                                 </value>
1191                         </uniform>
1192
1193                         <!--        BEGIN fog include -->
1194                         <uniform>
1195                                 <name>visibility</name>
1196                                 <type>float</type>
1197                                 <value>
1198                                         <use>visibility</use>
1199                                 </value>
1200                         </uniform>
1201                         <uniform>
1202                                 <name>avisibility</name>
1203                                 <type>float</type>
1204                                 <value>
1205                                         <use>avisibility</use>
1206                                 </value>
1207                         </uniform>
1208                         <uniform>
1209                                 <name>hazeLayerAltitude</name>
1210                                 <type>float</type>
1211                                 <value>
1212                                         <use>lthickness</use>
1213                                 </value>
1214                         </uniform>
1215                         <uniform>
1216                                 <name>scattering</name>
1217                                 <type>float</type>
1218                                 <value>
1219                                         <use>scattering</use>
1220                                 </value>
1221                         </uniform>
1222                         <uniform>
1223                                 <name>terminator</name>
1224                                 <type>float</type>
1225                                 <value>
1226                                         <use>terminator</use>
1227                                 </value>
1228                         </uniform>
1229                         <uniform>
1230                                 <name>fogType</name>
1231                                 <type>int</type>
1232                                 <value>
1233                                         <use>fogtype</use>
1234                                 </value>
1235                         </uniform>
1236                         <!--                    END fog include -->
1237                 </pass>
1238         </technique>
1239 </PropertyList>