Packice overlay and water color variations for high quality water shader in Atmospher...
[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                 <texture n="10">
49                         <image>Textures.high/Terrain/packice-overlay.png</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         <normalmap_dds type="float">0.0</normalmap_dds>
56                 <saturation>
57                         <use>/rendering/scene/saturation</use>
58                 </saturation>
59                 <status>
60                         <use>/environment/config/enabled</use>
61                 </status>
62                 <overcast>
63                         <use>/rendering/scene/overcast</use>
64                 </overcast>
65                 <cloud-cover n="0">
66                         <use>/environment/clouds/layer[0]/coverage-type</use>
67                 </cloud-cover>
68                 <cloud-cover n="1">
69                         <use>/environment/clouds/layer[1]/coverage-type</use>
70                 </cloud-cover>
71                 <cloud-cover n="2" >
72                         <use>/environment/clouds/layer[2]/coverage-type</use>
73                 </cloud-cover>
74                 <cloud-cover n="3">
75                         <use>/environment/clouds/layer[3]/coverage-type</use>
76                 </cloud-cover>
77                 <cloud-cover n="4">
78                         <use>/environment/clouds/layer[4]/coverage-type</use>
79                 </cloud-cover>
80                 <windE>
81                         <use>/environment/sea/surface/wind-from-east-fps</use>
82                 </windE>
83                 <windN>
84                         <use>/environment/sea/surface/wind-from-north-fps</use>
85                 </windN>
86                 <WaveFreq>
87                         <use>/environment/wave/freq</use>
88                 </WaveFreq>
89                 <WaveAmp>
90                         <use>/environment/wave/amp</use>
91                 </WaveAmp>
92                 <WaveSharp>
93                         <use>/environment/wave/sharp</use>
94                 </WaveSharp>
95                 <WaveAngle>
96                         <use>/environment/wave/angle</use>
97                 </WaveAngle>
98                 <WaveFactor>
99                         <use>/environment/wave/factor</use>
100                 </WaveFactor>
101                 <WaveDAngle>
102                         <use>/environment/wave/dangle</use>
103                 </WaveDAngle>
104
105                 <!--    fog include -->
106                 <visibility>
107                         <use>/environment/ground-visibility-m</use>
108                 </visibility>
109                 <avisibility>
110                         <use>/environment/visibility-m</use>
111                 </avisibility>
112                 <lthickness>
113                         <use>/environment/ground-haze-thickness-m</use>
114                 </lthickness>
115                 <scattering>
116                         <use>/rendering/scene/scattering</use>
117                 </scattering>
118                 <ground_scattering>
119                         <use>/environment/surface/scattering</use>
120                 </ground_scattering>
121                 <terminator>
122                         <use>/environment/terminator-relative-position-m</use>
123                 </terminator>
124                 <terrain_alt>
125                         <use>/environment/mean-terrain-elevation-m</use>
126                 </terrain_alt>
127                 <overcast>
128                         <use>/rendering/scene/overcast</use>
129                 </overcast>
130                 <eye_alt>
131                         <use>/sim/rendering/eye-altitude-m</use>
132                 </eye_alt>
133                 <cloud_self_shading>
134                         <use>/environment/cloud-self-shading</use>
135                 </cloud_self_shading>
136                 <moonlight>
137                         <use>/environment/moonlight</use>
138                 </moonlight>
139                 <fogtype>
140                         <use>/sim/rendering/shaders/skydome</use>
141                 </fogtype>
142                 <ice_cover>
143                         <use>/environment/sea/surface/ice-cover</use>
144                 </ice_cover>
145                 <!-- sea colors -->
146                 <sea_r>
147                         <use>/environment/sea/color_r</use>
148                 </sea_r>
149                 <sea_g>
150                         <use>/environment/sea/color_g</use>
151                 </sea_g>
152                 <sea_b>
153                         <use>/environment/sea/color_b</use>
154                 </sea_b>
155                 <!-- END fog include -->
156         </parameters>
157
158    <generate>
159        <tangent type="int">6</tangent>
160        <binormal type="int">7</binormal>
161    </generate>
162
163
164 <technique n="1">
165                 <predicate>
166                         <and>
167                                 <property>/sim/rendering/shaders/skydome</property>
168                                 <less-equal>
169                                         <value type="float">5.0</value>
170                                         <float-property>/sim/rendering/shaders/water</float-property>
171                                 </less-equal>
172                                 <or>
173                                         <less-equal>
174                                                 <value type="float">2.0</value>
175                                                 <glversion/>
176                                         </less-equal>
177                                         <and>
178                                                 <extension-supported>GL_ARB_shader_objects</extension-supported>
179                                                 <extension-supported>GL_ARB_shading_language_100</extension-supported>
180                                                 <extension-supported>GL_ARB_vertex_shader</extension-supported>
181                                                 <extension-supported>GL_ARB_fragment_shader</extension-supported>
182                                         </and>
183                                 </or>
184                         </and>
185                 </predicate>
186
187                 <pass>
188                         <lighting>true</lighting>
189                         <material>
190                                 <ambient>
191                                         <use>material/ambient</use>
192                                 </ambient>
193                                 <diffuse>
194                                         <use>material/diffuse</use>
195                                 </diffuse>
196                                 <specular>
197                                         <use>material/specular</use>
198                                 </specular>
199                                 <color-mode>ambient-and-diffuse</color-mode>
200                         </material>
201                         <blend>
202                                 <use>transparent</use>
203                         </blend>
204                         <alpha-test>
205                                 <use>transparent</use>
206                         </alpha-test>
207                         <shade-model>smooth</shade-model>
208                         <cull-face>back</cull-face>
209                         <render-bin>
210                                 <bin-number>
211                                         <use>render-bin/bin-number</use>
212                                 </bin-number>
213                                 <bin-name>
214                                         <use>render-bin/bin-name</use>
215                                 </bin-name>
216                         </render-bin>
217                         <!--<texture-unit>
218                                 <unit>0</unit>
219                                 <image>
220                                         <use>texture[0]/image</use>
221                                 </image>
222                                 <filter>
223                                         <use>texture[0]/filter</use>
224                                 </filter>
225                                 <wrap-s>
226                                         <use>texture[0]/wrap-s</use>
227                                 </wrap-s>
228                                 <wrap-t>
229                                         <use>texture[0]/wrap-t</use>
230                                 </wrap-t>
231                                 <internal-format>
232                                         <use>texture[0]/internal-format</use>
233                                 </internal-format>
234                         </texture-unit>-->
235                         <texture-unit>
236                                 <unit>2</unit>
237                                 <image>
238                                         <use>texture[2]/image</use>
239                                 </image>
240                                 <filter>
241                                         <use>texture[2]/filter</use>
242                                 </filter>
243                                 <wrap-s>
244                                         <use>texture[2]/wrap-s</use>
245                                 </wrap-s>
246                                 <wrap-t>
247                                         <use>texture[2]/wrap-t</use>
248                                 </wrap-t>
249                                 <internal-format>
250                                         <use>texture[2]/internal-format</use>
251                                 </internal-format>
252                         </texture-unit>
253                         <texture-unit>
254                                 <unit>3</unit>
255                                 <image>
256                                         <use>texture[3]/image</use>
257                                 </image>
258                                 <filter>
259                                         <use>texture[3]/filter</use>
260                                 </filter>
261                                 <wrap-s>
262                                         <use>texture[3]/wrap-s</use>
263                                 </wrap-s>
264                                 <wrap-t>
265                                         <use>texture[3]/wrap-t</use>
266                                 </wrap-t>
267                                 <internal-format>
268                                         <use>texture[3]/internal-format</use>
269                                 </internal-format>
270                         </texture-unit>
271                         <!--<texture-unit>
272                                 <unit>4</unit>
273                                 <image>
274                                         <use>texture[4]/image</use>
275                                 </image>
276                                 <filter>
277                                         <use>texture[4]/filter</use>
278                                 </filter>
279                                 <wrap-s>
280                                         <use>texture[4]/wrap-s</use>
281                                 </wrap-s>
282                                 <wrap-t>
283                                         <use>texture[4]/wrap-t</use>
284                                 </wrap-t>
285                                 <internal-format>
286                                         <use>texture[4]/internal-format</use>
287                                 </internal-format>
288                         </texture-unit>-->
289                         <texture-unit>
290                                 <unit>5</unit>
291                                 <image>
292                                         <use>texture[5]/image</use>
293                                 </image>
294                                 <filter>
295                                         <use>texture[5]/filter</use>
296                                 </filter>
297                                 <wrap-s>
298                                         <use>texture[5]/wrap-s</use>
299                                 </wrap-s>
300                                 <wrap-t>
301                                         <use>texture[5]/wrap-t</use>
302                                 </wrap-t>
303                                 <internal-format>
304                                         <use>texture[5]/internal-format</use>
305                                 </internal-format>
306                         </texture-unit>
307                         <texture-unit>
308                                 <unit>6</unit>
309                                 <image>
310                                         <use>texture[6]/image</use>
311                                 </image>
312                                 <filter>
313                                         <use>texture[6]/filter</use>
314                                 </filter>
315                                 <wrap-s>
316                                         <use>texture[6]/wrap-s</use>
317                                 </wrap-s>
318                                 <wrap-t>
319                                         <use>texture[6]/wrap-t</use>
320                                 </wrap-t>
321                                 <internal-format>
322                                         <use>texture[6]/internal-format</use>
323                                 </internal-format>
324                         </texture-unit>
325                         <texture-unit>
326                                 <unit>7</unit>
327                                 <image>
328                                         <use>texture[10]/image</use>
329                                 </image>
330                                 <filter>
331                                         <use>texture[10]/filter</use>
332                                 </filter>
333                                 <wrap-s>
334                                         <use>texture[10]/wrap-s</use>
335                                 </wrap-s>
336                                 <wrap-t>
337                                         <use>texture[10]/wrap-t</use>
338                                 </wrap-t>
339                                 <internal-format>
340                                         <use>texture[10]/internal-format</use>
341                                 </internal-format>
342                         </texture-unit>
343
344                         <program>
345                                 <vertex-shader>Shaders/water_lightfield.vert</vertex-shader>
346                                 <fragment-shader>Shaders/water_lightfield.frag</fragment-shader>
347                         </program>
348                         <!--<uniform>
349                                 <name>water_reflection</name>
350                                 <type>sampler-2d</type>
351                                 <value type="int">0</value>
352                         </uniform>-->
353                         <uniform>
354                                 <name>water_normalmap</name>
355                                 <type>sampler-2d</type>
356                                 <value type="int">2</value>
357                         </uniform>
358                         <uniform>
359                                 <name>water_dudvmap</name>
360                                 <type>sampler-2d</type>
361                                 <value type="int">3</value>
362                         </uniform>
363                         <uniform>
364                                 <name>sea_foam</name>
365                                 <type>sampler-2d</type>
366                                 <value type="int">5</value>
367                         </uniform>
368                         <uniform>
369                                 <name>perlin_normalmap</name>
370                                 <type>sampler-2d</type>
371                                 <value type="int">6</value>
372                         </uniform>
373                         <uniform>
374                                 <name>ice_texture</name>
375                                 <type>sampler-2d</type>
376                                 <value type="int">7</value>
377                         </uniform>
378             <!-- normalmap is .dds-->
379             <uniform>
380                 <name>normalmap_dds</name>
381                 <type>float</type>
382                 <value>
383                     <use>normalmap_dds</use>
384                 </value>
385             </uniform>
386                         <uniform>
387                                 <name>saturation</name>
388                                 <type>float</type>
389                                 <!--<value>0.4</value>-->
390                                 <value>
391                                         <use>saturation</use>
392                                 </value>
393                         </uniform>
394                         <uniform>
395                                 <name>WindE</name>
396                                 <type>float</type>
397                                 <value>
398                                         <use>windE</use>
399                                 </value>
400                         </uniform>
401                         <uniform>
402                                 <name>WindN</name>
403                                 <type>float</type>
404                                 <value>
405                                         <use>windN</use>
406                                 </value>
407                         </uniform>
408                         <uniform>
409                                 <name>WaveFreq</name>
410                                 <type>float</type>
411                                 <value>
412                                         <use>WaveFreq</use>
413                                 </value>
414                         </uniform>
415                         <uniform>
416                                 <name>WaveAmp</name>
417                                 <type>float</type>
418                                 <value>
419                                         <use>WaveAmp</use>
420                                 </value>
421                         </uniform>
422                         <uniform>
423                                 <name>WaveSharp</name>
424                                 <type>float</type>
425                                 <value>
426                                         <use>WaveSharp</use>
427                                 </value>
428                         </uniform>
429                         <uniform>
430                                 <name>WaveAngle</name>
431                                 <type>float</type>
432                                 <value>
433                                         <use>WaveAngle</use>
434                                 </value>
435                         </uniform>
436                         <uniform>
437                                 <name>WaveFactor</name>
438                                 <type>float</type>
439                                 <value>
440                                         <use>WaveFactor</use>
441                                 </value>
442                         </uniform>
443                         <uniform>
444                                 <name>WaveDAngle</name>
445                                 <type>float</type>
446                                 <value>
447                                         <use>WaveDAngle</use>
448                                 </value>
449                         </uniform>
450
451
452
453                         <!-- BEGIN fog include -->
454                         <uniform>
455                                 <name>visibility</name>
456                                 <type>float</type>
457                                 <value>
458                                         <use>visibility</use>
459                                 </value>
460                         </uniform>
461                         <uniform>
462                                 <name>avisibility</name>
463                                 <type>float</type>
464                                 <value>
465                                         <use>avisibility</use>
466                                 </value>
467                         </uniform>
468                         <uniform>
469                                 <name>hazeLayerAltitude</name>
470                                 <type>float</type>
471                                 <value>
472                                         <use>lthickness</use>
473                                 </value>
474                         </uniform>
475                         <uniform>
476                                 <name>scattering</name>
477                                 <type>float</type>
478                                 <value>
479                                         <use>scattering</use>
480                                 </value>
481                         </uniform>
482                         <uniform>
483                                 <name>ground_scattering</name>
484                                 <type>float</type>
485                                 <value>
486                                         <use>ground_scattering</use>
487                                 </value>
488                         </uniform>
489                         <uniform>
490                                 <name>terminator</name>
491                                 <type>float</type>
492                                 <value>
493                                         <use>terminator</use>
494                                 </value>
495                         </uniform>
496                         <uniform>
497                                 <name>terrain_alt</name>
498                                 <type>float</type>
499                                 <value>
500                                         <use>terrain_alt</use>
501                                 </value>
502                         </uniform>
503                         <uniform>
504                                 <name>overcast</name>
505                                 <type>float</type>
506                                 <value>
507                                         <use>overcast</use>
508                                 </value>
509                         </uniform>
510                         <uniform>
511                                 <name>eye_alt</name>
512                                 <type>float</type>
513                                 <value>
514                                         <use>eye_alt</use>
515                                 </value>
516                         </uniform>
517                         <uniform>
518                                 <name>cloud_self_shading</name>
519                                 <type>float</type>
520                                 <value><use>cloud_self_shading</use></value>
521                         </uniform>
522                         <uniform>
523                                 <name>ice_cover</name>
524                                 <type>float</type>
525                         <value><use>ice_cover</use></value>
526                 </uniform>
527                         <!-- sea colors -->
528                         <uniform>
529                                 <name>sea_r</name>
530                                 <type>float</type>
531                                 <value>
532                                         <use>sea_r</use>
533                                 </value>
534                         </uniform>
535                         <uniform>
536                                 <name>sea_g</name>
537                                 <type>float</type>
538                                 <value>
539                                         <use>sea_g</use>
540                                 </value>
541                         </uniform>
542                         <uniform>
543                                 <name>sea_b</name>
544                                 <type>float</type>
545                                 <value>
546                                         <use>sea_b</use>
547                                 </value>
548                         </uniform>
549                         <!-- END fog include -->
550                 </pass>
551         </technique>
552
553
554
555 <technique n="2">
556                 <predicate>
557                         <and>
558                                 <property>/sim/rendering/shaders/skydome</property>
559                                 <less-equal>
560                                         <value type="float">4.0</value>
561                                         <float-property>/sim/rendering/shaders/water</float-property>
562                                 </less-equal>
563                                 <or>
564                                         <less-equal>
565                                                 <value type="float">2.0</value>
566                                                 <glversion/>
567                                         </less-equal>
568                                         <and>
569                                                 <extension-supported>GL_ARB_shader_objects</extension-supported>
570                                                 <extension-supported>GL_ARB_shading_language_100</extension-supported>
571                                                 <extension-supported>GL_ARB_vertex_shader</extension-supported>
572                                                 <extension-supported>GL_ARB_fragment_shader</extension-supported>
573                                         </and>
574                                 </or>
575                         </and>
576                 </predicate>
577
578                 <pass>
579                         <lighting>true</lighting>
580                         <material>
581                                 <ambient>
582                                         <use>material/ambient</use>
583                                 </ambient>
584                                 <diffuse>
585                                         <use>material/diffuse</use>
586                                 </diffuse>
587                                 <specular>
588                                         <use>material/specular</use>
589                                 </specular>
590                                 <color-mode>ambient-and-diffuse</color-mode>
591                         </material>
592                         <blend>
593                                 <use>transparent</use>
594                         </blend>
595                         <alpha-test>
596                                 <use>transparent</use>
597                         </alpha-test>
598                         <shade-model>smooth</shade-model>
599                         <cull-face>back</cull-face>
600                         <render-bin>
601                                 <bin-number>
602                                         <use>render-bin/bin-number</use>
603                                 </bin-number>
604                                 <bin-name>
605                                         <use>render-bin/bin-name</use>
606                                 </bin-name>
607                         </render-bin>
608                         <!--<texture-unit>
609                                 <unit>0</unit>
610                                 <image>
611                                         <use>texture[0]/image</use>
612                                 </image>
613                                 <filter>
614                                         <use>texture[0]/filter</use>
615                                 </filter>
616                                 <wrap-s>
617                                         <use>texture[0]/wrap-s</use>
618                                 </wrap-s>
619                                 <wrap-t>
620                                         <use>texture[0]/wrap-t</use>
621                                 </wrap-t>
622                                 <internal-format>
623                                         <use>texture[0]/internal-format</use>
624                                 </internal-format>
625                         </texture-unit>-->
626                         <texture-unit>
627                                 <unit>2</unit>
628                                 <image>
629                                         <use>texture[2]/image</use>
630                                 </image>
631                                 <filter>
632                                         <use>texture[2]/filter</use>
633                                 </filter>
634                                 <wrap-s>
635                                         <use>texture[2]/wrap-s</use>
636                                 </wrap-s>
637                                 <wrap-t>
638                                         <use>texture[2]/wrap-t</use>
639                                 </wrap-t>
640                                 <internal-format>
641                                         <use>texture[2]/internal-format</use>
642                                 </internal-format>
643                         </texture-unit>
644                         <texture-unit>
645                                 <unit>3</unit>
646                                 <image>
647                                         <use>texture[3]/image</use>
648                                 </image>
649                                 <filter>
650                                         <use>texture[3]/filter</use>
651                                 </filter>
652                                 <wrap-s>
653                                         <use>texture[3]/wrap-s</use>
654                                 </wrap-s>
655                                 <wrap-t>
656                                         <use>texture[3]/wrap-t</use>
657                                 </wrap-t>
658                                 <internal-format>
659                                         <use>texture[3]/internal-format</use>
660                                 </internal-format>
661                         </texture-unit>
662                         <!--<texture-unit>
663                                 <unit>4</unit>
664                                 <image>
665                                         <use>texture[4]/image</use>
666                                 </image>
667                                 <filter>
668                                         <use>texture[4]/filter</use>
669                                 </filter>
670                                 <wrap-s>
671                                         <use>texture[4]/wrap-s</use>
672                                 </wrap-s>
673                                 <wrap-t>
674                                         <use>texture[4]/wrap-t</use>
675                                 </wrap-t>
676                                 <internal-format>
677                                         <use>texture[4]/internal-format</use>
678                                 </internal-format>
679                         </texture-unit>-->
680                         <texture-unit>
681                                 <unit>5</unit>
682                                 <image>
683                                         <use>texture[5]/image</use>
684                                 </image>
685                                 <filter>
686                                         <use>texture[5]/filter</use>
687                                 </filter>
688                                 <wrap-s>
689                                         <use>texture[5]/wrap-s</use>
690                                 </wrap-s>
691                                 <wrap-t>
692                                         <use>texture[5]/wrap-t</use>
693                                 </wrap-t>
694                                 <internal-format>
695                                         <use>texture[5]/internal-format</use>
696                                 </internal-format>
697                         </texture-unit>
698                         <texture-unit>
699                                 <unit>6</unit>
700                                 <image>
701                                         <use>texture[6]/image</use>
702                                 </image>
703                                 <filter>
704                                         <use>texture[6]/filter</use>
705                                 </filter>
706                                 <wrap-s>
707                                         <use>texture[6]/wrap-s</use>
708                                 </wrap-s>
709                                 <wrap-t>
710                                         <use>texture[6]/wrap-t</use>
711                                 </wrap-t>
712                                 <internal-format>
713                                         <use>texture[6]/internal-format</use>
714                                 </internal-format>
715                         </texture-unit>
716
717                         <program>
718                                 <vertex-shader>Shaders/water_lightfield.vert</vertex-shader>
719                                 <fragment-shader>Shaders/water_lightfield_lr.frag</fragment-shader>
720                         </program>
721                         <!--<uniform>
722                                 <name>water_reflection</name>
723                                 <type>sampler-2d</type>
724                                 <value type="int">0</value>
725                         </uniform>-->
726                         <uniform>
727                                 <name>water_normalmap</name>
728                                 <type>sampler-2d</type>
729                                 <value type="int">2</value>
730                         </uniform>
731                         <uniform>
732                                 <name>water_dudvmap</name>
733                                 <type>sampler-2d</type>
734                                 <value type="int">3</value>
735                         </uniform>
736                         <uniform>
737                                 <name>sea_foam</name>
738                                 <type>sampler-2d</type>
739                                 <value type="int">5</value>
740                         </uniform>
741                         <uniform>
742                                 <name>perlin_normalmap</name>
743                                 <type>sampler-2d</type>
744                                 <value type="int">6</value>
745                         </uniform>
746             <!-- normalmap is .dds-->
747             <uniform>
748                 <name>normalmap_dds</name>
749                 <type>float</type>
750                 <value>
751                     <use>normalmap_dds</use>
752                 </value>
753             </uniform>
754                         <uniform>
755                                 <name>saturation</name>
756                                 <type>float</type>
757                                 <!--<value>0.4</value>-->
758                                 <value>
759                                         <use>saturation</use>
760                                 </value>
761                         </uniform>
762                         <uniform>
763                                 <name>WindE</name>
764                                 <type>float</type>
765                                 <value>
766                                         <use>windE</use>
767                                 </value>
768                         </uniform>
769                         <uniform>
770                                 <name>WindN</name>
771                                 <type>float</type>
772                                 <value>
773                                         <use>windN</use>
774                                 </value>
775                         </uniform>
776                         <uniform>
777                                 <name>WaveFreq</name>
778                                 <type>float</type>
779                                 <value>
780                                         <use>WaveFreq</use>
781                                 </value>
782                         </uniform>
783                         <uniform>
784                                 <name>WaveAmp</name>
785                                 <type>float</type>
786                                 <value>
787                                         <use>WaveAmp</use>
788                                 </value>
789                         </uniform>
790                         <uniform>
791                                 <name>WaveSharp</name>
792                                 <type>float</type>
793                                 <value>
794                                         <use>WaveSharp</use>
795                                 </value>
796                         </uniform>
797                         <uniform>
798                                 <name>WaveAngle</name>
799                                 <type>float</type>
800                                 <value>
801                                         <use>WaveAngle</use>
802                                 </value>
803                         </uniform>
804                         <uniform>
805                                 <name>WaveFactor</name>
806                                 <type>float</type>
807                                 <value>
808                                         <use>WaveFactor</use>
809                                 </value>
810                         </uniform>
811                         <uniform>
812                                 <name>WaveDAngle</name>
813                                 <type>float</type>
814                                 <value>
815                                         <use>WaveDAngle</use>
816                                 </value>
817                         </uniform>
818
819
820
821                         <!-- BEGIN fog include -->
822                         <uniform>
823                                 <name>visibility</name>
824                                 <type>float</type>
825                                 <value>
826                                         <use>visibility</use>
827                                 </value>
828                         </uniform>
829                         <uniform>
830                                 <name>avisibility</name>
831                                 <type>float</type>
832                                 <value>
833                                         <use>avisibility</use>
834                                 </value>
835                         </uniform>
836                         <uniform>
837                                 <name>hazeLayerAltitude</name>
838                                 <type>float</type>
839                                 <value>
840                                         <use>lthickness</use>
841                                 </value>
842                         </uniform>
843                         <uniform>
844                                 <name>scattering</name>
845                                 <type>float</type>
846                                 <value>
847                                         <use>scattering</use>
848                                 </value>
849                         </uniform>
850                         <uniform>
851                                 <name>ground_scattering</name>
852                                 <type>float</type>
853                                 <value>
854                                         <use>ground_scattering</use>
855                                 </value>
856                         </uniform>
857                         <uniform>
858                                 <name>terminator</name>
859                                 <type>float</type>
860                                 <value>
861                                         <use>terminator</use>
862                                 </value>
863                         </uniform>
864                         <uniform>
865                                 <name>terrain_alt</name>
866                                 <type>float</type>
867                                 <value>
868                                         <use>terrain_alt</use>
869                                 </value>
870                         </uniform>
871                         <uniform>
872                                 <name>overcast</name>
873                                 <type>float</type>
874                                 <value>
875                                         <use>overcast</use>
876                                 </value>
877                         </uniform>
878                         <uniform>
879                                 <name>eye_alt</name>
880                                 <type>float</type>
881                                 <value>
882                                         <use>eye_alt</use>
883                                 </value>
884                         </uniform>
885                         <uniform>
886                                 <name>cloud_self_shading</name>
887                                 <type>float</type>
888                                 <value><use>cloud_self_shading</use></value>
889                         </uniform>
890                         <!-- sea colors -->
891                         <uniform>
892                                 <name>sea_r</name>
893                                 <type>float</type>
894                                 <value>
895                                         <use>sea_r</use>
896                                 </value>
897                         </uniform>
898                         <uniform>
899                                 <name>sea_g</name>
900                                 <type>float</type>
901                                 <value>
902                                         <use>sea_g</use>
903                                 </value>
904                         </uniform>
905                         <uniform>
906                                 <name>sea_b</name>
907                                 <type>float</type>
908                                 <value>
909                                         <use>sea_b</use>
910                                 </value>
911                         </uniform>
912                         <!-- END fog include -->
913                 </pass>
914         </technique>
915         
916
917
918
919    <technique n="6">
920        <predicate>
921            <and>
922                <property>/sim/rendering/shaders/water</property>
923                <property>/sim/rendering/rembrandt/enabled</property>
924                <less-equal>
925                    <value type="float">4.0</value>
926                    <float-property>/sim/rendering/shaders/water</float-property>
927                </less-equal>
928                <or>
929                    <less-equal>
930                        <value type="float">2.0</value>
931                        <glversion/>
932                    </less-equal>
933                    <and>
934                        <extension-supported>GL_ARB_shader_objects</extension-supported>
935                        <extension-supported>GL_ARB_shading_language_100</extension-supported>
936                        <extension-supported>GL_ARB_vertex_shader</extension-supported>
937                        <extension-supported>GL_ARB_fragment_shader</extension-supported>
938                    </and>
939                </or>
940            </and>
941        </predicate>
942        <pass>
943            <lighting>false</lighting>
944            <material>
945                <ambient>
946                    <use>material/ambient</use>
947                </ambient>
948                <diffuse>
949                    <use>material/diffuse</use>
950                </diffuse>
951                <specular>
952                    <use>material/specular</use>
953                </specular>
954                <emissive>
955                    <use>material/emissive</use>
956                </emissive>
957                <shininess>
958                    <use>material/shininess</use>
959                </shininess>
960                <color-mode>ambient-and-diffuse</color-mode>
961            </material>
962            <blend>
963                <use>transparent</use>
964            </blend>
965            <alpha-test>
966                <use>transparent</use>
967            </alpha-test>
968            <shade-model>smooth</shade-model>
969            <cull-face>back</cull-face>
970            <render-bin>
971                <bin-number>
972                    <use>render-bin/bin-number</use>
973                </bin-number>
974                <bin-name>
975                    <use>render-bin/bin-name</use>
976                </bin-name>
977            </render-bin>
978
979            <texture-unit>
980                <unit>0</unit>
981                <image>
982                    <use>texture[0]/image</use>
983                </image>
984                <filter>
985                    <use>texture[0]/filter</use>
986                </filter>
987                <wrap-s>
988                    <use>texture[0]/wrap-s</use>
989                </wrap-s>
990                <wrap-t>
991                    <use>texture[0]/wrap-t</use>
992                </wrap-t>
993                <internal-format>
994                    <use>texture[0]/internal-format</use>
995                </internal-format>
996            </texture-unit>
997            <texture-unit>
998                <unit>2</unit>
999                <image>
1000                    <use>texture[2]/image</use>
1001                </image>
1002                <filter>
1003                    <use>texture[2]/filter</use>
1004                </filter>
1005                <wrap-s>
1006                    <use>texture[2]/wrap-s</use>
1007                </wrap-s>
1008                <wrap-t>
1009                    <use>texture[2]/wrap-t</use>
1010                </wrap-t>
1011                <internal-format>
1012                    <use>texture[2]/internal-format</use>
1013                </internal-format>
1014            </texture-unit>
1015            <texture-unit>
1016                <unit>3</unit>
1017                <image>
1018                    <use>texture[3]/image</use>
1019                </image>
1020                <filter>
1021                    <use>texture[3]/filter</use>
1022                </filter>
1023                <wrap-s>
1024                    <use>texture[3]/wrap-s</use>
1025                </wrap-s>
1026                <wrap-t>
1027                    <use>texture[3]/wrap-t</use>
1028                </wrap-t>
1029                <internal-format>
1030                    <use>texture[3]/internal-format</use>
1031                </internal-format>
1032            </texture-unit>
1033            <texture-unit>
1034                <unit>4</unit>
1035                <image>
1036                    <use>texture[4]/image</use>
1037                </image>
1038                <filter>
1039                    <use>texture[4]/filter</use>
1040                </filter>
1041                <wrap-s>
1042                    <use>texture[4]/wrap-s</use>
1043                </wrap-s>
1044                <wrap-t>
1045                    <use>texture[4]/wrap-t</use>
1046                </wrap-t>
1047                <internal-format>
1048                    <use>texture[4]/internal-format</use>
1049                </internal-format>
1050            </texture-unit>
1051            <texture-unit>
1052                <unit>5</unit>
1053                <image>
1054                    <use>texture[5]/image</use>
1055                </image>
1056                <filter>
1057                    <use>texture[5]/filter</use>
1058                </filter>
1059                <wrap-s>
1060                    <use>texture[5]/wrap-s</use>
1061                </wrap-s>
1062                <wrap-t>
1063                    <use>texture[5]/wrap-t</use>
1064                </wrap-t>
1065                <internal-format>
1066                    <use>texture[5]/internal-format</use>
1067                </internal-format>
1068            </texture-unit>
1069            <texture-unit>
1070                <unit>6</unit>
1071                <image>
1072                    <use>texture[6]/image</use>
1073                </image>
1074                <filter>
1075                    <use>texture[6]/filter</use>
1076                </filter>
1077                <wrap-s>
1078                    <use>texture[6]/wrap-s</use>
1079                </wrap-s>
1080                <wrap-t>
1081                    <use>texture[6]/wrap-t</use>
1082                </wrap-t>
1083                <internal-format>
1084                    <use>texture[6]/internal-format</use>
1085                </internal-format>
1086            </texture-unit>
1087
1088            <program>
1089                <vertex-shader>Shaders/water-gbuffer.vert</vertex-shader>
1090                <fragment-shader>Shaders/water_sine-gbuffer.frag</fragment-shader>
1091                <fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
1092                <fragment-shader>Shaders/gbuffer-encode.frag</fragment-shader>
1093                <attribute>
1094                    <name>tangent</name>
1095                    <index>6</index>
1096                </attribute>
1097                <attribute>
1098                    <name>binormal</name>
1099                    <index>7</index>
1100                </attribute>
1101            </program>
1102            <uniform>
1103                <name>water_reflection</name>
1104                <type>sampler-2d</type>
1105                <value type="int">0</value>
1106            </uniform>
1107            <uniform>
1108                <name>water_normalmap</name>
1109                <type>sampler-2d</type>
1110                <value type="int">2</value>
1111            </uniform>
1112            <uniform>
1113                <name>water_dudvmap</name>
1114                <type>sampler-2d</type>
1115                <value type="int">3</value>
1116            </uniform>
1117            <uniform>
1118                <name>water_reflection_grey</name>
1119                <type>sampler-2d</type>
1120                <value type="int">4</value>
1121            </uniform>
1122            <uniform>
1123                <name>sea_foam</name>
1124                <type>sampler-2d</type>
1125                <value type="int">5</value>
1126            </uniform>
1127            <uniform>
1128                <name>perlin_normalmap</name>
1129                <type>sampler-2d</type>
1130                <value type="int">6</value>
1131            </uniform>
1132            <!-- normalmap is .dds-->
1133            <uniform>
1134                <name>normalmap_dds</name>
1135                <type>float</type>
1136                <value>
1137                    <use>normalmap_dds</use>
1138                </value>
1139            </uniform>
1140            <uniform>
1141                <name>saturation</name>
1142                <type>float</type>
1143                <!--<value>0.4</value>-->
1144                    <value>
1145                        <use>saturation</use>
1146                    </value>
1147                </uniform>
1148                <uniform>
1149                    <name>CloudCover0</name>
1150                    <type>float</type>
1151                    <value>
1152                        <use>cloud-cover[0]</use>
1153                    </value>
1154                </uniform>
1155                <uniform>
1156                    <name>CloudCover1</name>
1157                    <type>float</type>
1158                    <value>
1159                        <use>cloud-cover[1]</use>
1160                    </value>
1161                </uniform>
1162                <uniform>
1163                    <name>CloudCover2</name>
1164                    <type>float</type>
1165                    <value>
1166                        <use>cloud-cover[2]</use>
1167                    </value>
1168                </uniform>
1169                <uniform>
1170                    <name>CloudCover3</name>
1171                    <type>float</type>
1172                    <value>
1173                        <use>cloud-cover[3]</use>
1174                    </value>
1175                </uniform>
1176                <uniform>
1177                    <name>CloudCover4</name>
1178                    <type>float</type>
1179                    <value>
1180                        <use>cloud-cover[4]</use>
1181                    </value>
1182                </uniform>
1183                <uniform>
1184                    <name>Status</name>
1185                    <type>int</type>
1186                    <value>
1187                        <use>status</use>
1188                    </value>
1189                    <!--<value type="int">0</value> -->
1190                </uniform>
1191                <uniform>
1192                    <name>Overcast</name>
1193                    <type>float</type>
1194                    <value>
1195                        <use>overcast</use>
1196                    </value>
1197                </uniform>
1198                <uniform>
1199                    <name>WindE</name>
1200                    <type>float</type>
1201                    <value>
1202                        <use>windE</use>
1203                    </value>
1204                </uniform>
1205                <uniform>
1206                    <name>WindN</name>
1207                    <type>float</type>
1208                    <value>
1209                        <use>windN</use>
1210                    </value>
1211                </uniform>
1212                <uniform>
1213                    <name>WaveFreq</name>
1214                    <type>float</type>
1215                    <value>
1216                        <use>WaveFreq</use>
1217                    </value>
1218                </uniform>
1219                <uniform>
1220                    <name>WaveAmp</name>
1221                    <type>float</type>
1222                    <value>
1223                        <use>WaveAmp</use>
1224                    </value>
1225                </uniform>
1226                <uniform>
1227                    <name>WaveSharp</name>
1228                    <type>float</type>
1229                    <value>
1230                        <use>WaveSharp</use>
1231                    </value>
1232                </uniform>
1233                <uniform>
1234                    <name>WaveAngle</name>
1235                    <type>float</type>
1236                    <value>
1237                        <use>WaveAngle</use>
1238                    </value>
1239                </uniform>
1240                <uniform>
1241                    <name>WaveFactor</name>
1242                    <type>float</type>
1243                    <value>
1244                        <use>WaveFactor</use>
1245                    </value>
1246                </uniform>
1247                <uniform>
1248                    <name>WaveDAngle</name>
1249                    <type>float</type>
1250                    <value>
1251                        <use>WaveDAngle</use>
1252                    </value>
1253                </uniform>
1254
1255                <!-- BEGIN fog include -->
1256                <uniform>
1257                    <name>visibility</name>
1258                    <type>float</type>
1259                    <value>
1260                        <use>visibility</use>
1261                    </value>
1262                </uniform>
1263                <uniform>
1264                    <name>avisibility</name>
1265                    <type>float</type>
1266                    <value>
1267                        <use>avisibility</use>
1268                    </value>
1269                </uniform>
1270                <uniform>
1271                    <name>hazeLayerAltitude</name>
1272                    <type>float</type>
1273                    <value>
1274                        <use>lthickness</use>
1275                    </value>
1276                </uniform>
1277                <uniform>
1278                    <name>scattering</name>
1279                    <type>float</type>
1280                    <value>
1281                        <use>scattering</use>
1282                    </value>
1283                </uniform>
1284                <uniform>
1285                    <name>terminator</name>
1286                    <type>float</type>
1287                    <value>
1288                        <use>terminator</use>
1289                    </value>
1290                </uniform>
1291                <uniform>
1292                    <name>fogType</name>
1293                    <type>int</type>
1294                    <value>
1295                        <use>fogtype</use>
1296                    </value>
1297                </uniform>
1298                <!-- END fog include -->
1299                <uniform>
1300                    <name>rembrandt_enabled</name>
1301                    <type>int</type>
1302                    <value>
1303                        <use>rembrandt</use>
1304                    </value>
1305                </uniform>
1306                </pass>
1307            </technique>
1308            <technique n="7">
1309                <predicate>
1310                    <and>
1311                        <property>/sim/rendering/shaders/water</property>
1312                        <property>/sim/rendering/rembrandt/enabled</property>
1313                        <less-equal>
1314                            <value type="float">2.0</value>
1315                            <float-property>/sim/rendering/shaders/water</float-property>
1316                        </less-equal>
1317                        <or>
1318                            <less-equal>
1319                                <value type="float">2.0</value>
1320                                <glversion/>
1321                            </less-equal>
1322                            <and>
1323                                <extension-supported>GL_ARB_shader_objects</extension-supported>
1324                                <extension-supported>GL_ARB_shading_language_100</extension-supported>
1325                                <extension-supported>GL_ARB_vertex_shader</extension-supported>
1326                                <extension-supported>GL_ARB_fragment_shader</extension-supported>
1327                            </and>
1328                        </or>
1329                    </and>
1330                </predicate>
1331                <pass>
1332                    <material>
1333                        <ambient>
1334                            <use>material/ambient</use>
1335                        </ambient>
1336                        <diffuse>
1337                            <use>material/diffuse</use>
1338                        </diffuse>
1339                        <specular>
1340                            <use>material/specular</use>
1341                        </specular>
1342                        <emissive>
1343                            <use>material/emissive</use>
1344                        </emissive>
1345                        <shininess>
1346                            <use>material/shininess</use>
1347                        </shininess>
1348                        <color-mode>ambient-and-diffuse</color-mode>
1349                    </material>
1350                    <blend>
1351                        <use>transparent</use>
1352                    </blend>
1353                    <alpha-test>
1354                        <use>transparent</use>
1355                    </alpha-test>
1356                    <shade-model>smooth</shade-model>
1357                    <cull-face>back</cull-face>
1358                    <render-bin>
1359                        <bin-number>
1360                            <use>render-bin/bin-number</use>
1361                        </bin-number>
1362                        <bin-name>
1363                            <use>render-bin/bin-name</use>
1364                        </bin-name>
1365                    </render-bin>
1366                    <texture-unit>
1367                        <unit>0</unit>
1368                        <image>
1369                            <use>texture[0]/image</use>
1370                        </image>
1371                        <filter>
1372                            <use>texture[0]/filter</use>
1373                        </filter>
1374                        <wrap-s>
1375                            <use>texture[0]/wrap-s</use>
1376                        </wrap-s>
1377                        <wrap-t>
1378                            <use>texture[0]/wrap-t</use>
1379                        </wrap-t>
1380                        <internal-format>
1381                            <use>texture[0]/internal-format</use>
1382                        </internal-format>
1383                    </texture-unit>
1384                    <texture-unit>
1385                        <unit>2</unit>
1386                        <image>
1387                            <use>texture[2]/image</use>
1388                        </image>
1389                        <filter>
1390                            <use>texture[2]/filter</use>
1391                        </filter>
1392                        <wrap-s>
1393                            <use>texture[2]/wrap-s</use>
1394                        </wrap-s>
1395                        <wrap-t>
1396                            <use>texture[2]/wrap-t</use>
1397                        </wrap-t>
1398                        <internal-format>
1399                            <use>texture[2]/internal-format</use>
1400                        </internal-format>
1401                    </texture-unit>
1402                    <texture-unit>
1403                        <unit>3</unit>
1404                        <image>
1405                            <use>texture[3]/image</use>
1406                        </image>
1407                        <filter>
1408                            <use>texture[3]/filter</use>
1409                        </filter>
1410                        <wrap-s>
1411                            <use>texture[3]/wrap-s</use>
1412                        </wrap-s>
1413                        <wrap-t>
1414                            <use>texture[3]/wrap-t</use>
1415                        </wrap-t>
1416                        <internal-format>
1417                            <use>texture[3]/internal-format</use>
1418                        </internal-format>
1419                    </texture-unit>
1420                    <texture-unit>
1421                        <unit>4</unit>
1422                        <image>
1423                            <use>texture[4]/image</use>
1424                        </image>
1425                        <filter>
1426                            <use>texture[4]/filter</use>
1427                        </filter>
1428                        <wrap-s>
1429                            <use>texture[4]/wrap-s</use>
1430                        </wrap-s>
1431                        <wrap-t>
1432                            <use>texture[4]/wrap-t</use>
1433                        </wrap-t>
1434                        <internal-format>
1435                            <use>texture[4]/internal-format</use>
1436                        </internal-format>
1437                    </texture-unit>
1438                    <texture-unit>
1439                        <unit>5</unit>
1440                        <image>
1441                            <use>texture[5]/image</use>
1442                        </image>
1443                        <filter>
1444                            <use>texture[5]/filter</use>
1445                        </filter>
1446                        <wrap-s>
1447                            <use>texture[5]/wrap-s</use>
1448                        </wrap-s>
1449                        <wrap-t>
1450                            <use>texture[5]/wrap-t</use>
1451                        </wrap-t>
1452                        <internal-format>
1453                            <use>texture[5]/internal-format</use>
1454                        </internal-format>
1455                    </texture-unit>
1456                    <texture-unit>
1457                        <unit>6</unit>
1458                        <image>
1459                            <use>texture[6]/image</use>
1460                        </image>
1461                        <filter>
1462                            <use>texture[6]/filter</use>
1463                        </filter>
1464                        <wrap-s>
1465                            <use>texture[6]/wrap-s</use>
1466                        </wrap-s>
1467                        <wrap-t>
1468                            <use>texture[6]/wrap-t</use>
1469                        </wrap-t>
1470                        <internal-format>
1471                            <use>texture[6]/internal-format</use>
1472                        </internal-format>
1473                    </texture-unit>
1474
1475                    <program>
1476                        <vertex-shader>Shaders/water-gbuffer.vert</vertex-shader>
1477                        <fragment-shader>Shaders/water-gbuffer.frag</fragment-shader>
1478                        <fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
1479                        <fragment-shader>Shaders/gbuffer-encode.frag</fragment-shader>
1480                    </program>
1481                    <uniform>
1482                        <name>water_reflection</name>
1483                        <type>sampler-2d</type>
1484                        <value type="int">0</value>
1485                    </uniform>
1486                    <uniform>
1487                        <name>water_normalmap</name>
1488                        <type>sampler-2d</type>
1489                        <value type="int">2</value>
1490                    </uniform>
1491                    <uniform>
1492                        <name>water_dudvmap</name>
1493                        <type>sampler-2d</type>
1494                        <value type="int">3</value>
1495                    </uniform>
1496                    <uniform>
1497                        <name>water_reflection_grey</name>
1498                        <type>sampler-2d</type>
1499                        <value type="int">4</value>
1500                    </uniform>
1501                    <uniform>
1502                        <name>sea_foam</name>
1503                        <type>sampler-2d</type>
1504                        <value type="int">5</value>
1505                    </uniform>
1506                    <uniform>
1507                        <name>perlin_normalmap</name>
1508                        <type>sampler-2d</type>
1509                        <value type="int">6</value>
1510                    </uniform>
1511                    <!-- normalmap is .dds-->
1512                    <uniform>
1513                        <name>normalmap_dds</name>
1514                        <type>float</type>
1515                        <value>
1516                            <use>normalmap_dds</use>
1517                        </value>
1518                    </uniform>
1519                    <uniform>
1520                        <name>saturation</name>
1521                        <type>float</type>
1522                        <!--<value>0.4</value>-->
1523                            <value>
1524                                <use>saturation</use>
1525                            </value>
1526                        </uniform>
1527                        <uniform>
1528                            <name>CloudCover0</name>
1529                            <type>float</type>
1530                            <value>
1531                                <use>cloud-cover[0]</use>
1532                            </value>
1533                        </uniform>
1534                        <uniform>
1535                            <name>CloudCover1</name>
1536                            <type>float</type>
1537                            <value>
1538                                <use>cloud-cover[1]</use>
1539                            </value>
1540                        </uniform>
1541                        <uniform>
1542                            <name>CloudCover2</name>
1543                            <type>float</type>
1544                            <value>
1545                                <use>cloud-cover[2]</use>
1546                            </value>
1547                        </uniform>
1548                        <uniform>
1549                            <name>CloudCover3</name>
1550                            <type>float</type>
1551                            <value>
1552                                <use>cloud-cover[3]</use>
1553                            </value>
1554                        </uniform>
1555                        <uniform>
1556                            <name>CloudCover4</name>
1557                            <type>float</type>
1558                            <value>
1559                                <use>cloud-cover[4]</use>
1560                            </value>
1561                        </uniform>
1562                        <uniform>
1563                            <name>Status</name>
1564                            <type>int</type>
1565                            <value>
1566                                <use>status</use>
1567                            </value>
1568                        </uniform>
1569                        <uniform>
1570                            <name>Overcast</name>
1571                            <type>float</type>
1572                            <value>
1573                                <use>overcast</use>
1574                            </value>
1575                        </uniform>
1576                        <uniform>
1577                            <name>WindE</name>
1578                            <type>float</type>
1579                            <value>
1580                                <use>windE</use>
1581                            </value>
1582                        </uniform>
1583                        <uniform>
1584                            <name>WindN</name>
1585                            <type>float</type>
1586                            <value>
1587                                <use>windN</use>
1588                            </value>
1589                        </uniform>
1590                        <!--uniform> unused?
1591                            <name>WindFrom</name>
1592                            <type>float</type>
1593                            <value>
1594                                <use>wind-from</use>
1595                            </value>
1596                        </uniform-->
1597                        <uniform>
1598                            <name>WaveFreq</name>
1599                            <type>float</type>
1600                            <value>
1601                                <use>WaveFreq</use>
1602                            </value>
1603                        </uniform>
1604                        <uniform>
1605                            <name>WaveAmp</name>
1606                            <type>float</type>
1607                            <value>
1608                                <use>WaveAmp</use>
1609                            </value>
1610                        </uniform>
1611                        <uniform>
1612                            <name>WaveSharp</name>
1613                            <type>float</type>
1614                            <value>
1615                                <use>WaveSharp</use>
1616                            </value>
1617                        </uniform>
1618                        <uniform>
1619                            <name>WaveAngle</name>
1620                            <type>float</type>
1621                            <value>
1622                                <use>WaveAngle</use>
1623                            </value>
1624                        </uniform>
1625                        <uniform>
1626                            <name>WaveFactor</name>
1627                            <type>float</type>
1628                            <value>
1629                                <use>WaveFactor</use>
1630                            </value>
1631                        </uniform>
1632                        <uniform>
1633                            <name>WaveDAngle</name>
1634                            <type>float</type>
1635                            <value>
1636                                <use>WaveDAngle</use>
1637                            </value>
1638                        </uniform>
1639
1640                        <!--        BEGIN fog include -->
1641                        <uniform>
1642                            <name>visibility</name>
1643                            <type>float</type>
1644                            <value>
1645                                <use>visibility</use>
1646                            </value>
1647                        </uniform>
1648                        <uniform>
1649                            <name>avisibility</name>
1650                            <type>float</type>
1651                            <value>
1652                                <use>avisibility</use>
1653                            </value>
1654                        </uniform>
1655                        <uniform>
1656                            <name>hazeLayerAltitude</name>
1657                            <type>float</type>
1658                            <value>
1659                                <use>lthickness</use>
1660                            </value>
1661                        </uniform>
1662                        <uniform>
1663                            <name>scattering</name>
1664                            <type>float</type>
1665                            <value>
1666                                <use>scattering</use>
1667                            </value>
1668                        </uniform>
1669                        <uniform>
1670                            <name>terminator</name>
1671                            <type>float</type>
1672                            <value>
1673                                <use>terminator</use>
1674                            </value>
1675                        </uniform>
1676                        <uniform>
1677                            <name>fogType</name>
1678                            <type>int</type>
1679                            <value>
1680                                <use>fogtype</use>
1681                            </value>
1682                        </uniform>
1683                        <!--            END fog include -->
1684                        <uniform>
1685                            <name>rembrandt_enabled</name>
1686                            <type>int</type>
1687                            <value>
1688                                <use>rembrandt</use>
1689                            </value>
1690                        </uniform>
1691                        </pass>
1692                    </technique>
1693
1694         <technique n="8">
1695                 <predicate>
1696                         <and>
1697                                 <property>/sim/rendering/shaders/quality-level</property>
1698                                 <property>/sim/rendering/shaders/water</property>
1699                                 <less-equal>
1700                                         <value type="float">4.0</value>
1701                                         <float-property>/sim/rendering/shaders/water</float-property>
1702                                 </less-equal>
1703                                 <or>
1704                                         <less-equal>
1705                                                 <value type="float">2.0</value>
1706                                                 <glversion/>
1707                                         </less-equal>
1708                                         <and>
1709                                                 <extension-supported>GL_ARB_shader_objects</extension-supported>
1710                                                 <extension-supported>GL_ARB_shading_language_100</extension-supported>
1711                                                 <extension-supported>GL_ARB_vertex_shader</extension-supported>
1712                                                 <extension-supported>GL_ARB_fragment_shader</extension-supported>
1713                                         </and>
1714                                 </or>
1715                         </and>
1716                 </predicate>
1717                 <pass>
1718                         <lighting>true</lighting>
1719                         <material>
1720                                 <ambient>
1721                                         <use>material/ambient</use>
1722                                 </ambient>
1723                                 <diffuse>
1724                                         <use>material/diffuse</use>
1725                                 </diffuse>
1726                                 <specular>
1727                                         <use>material/specular</use>
1728                                 </specular>
1729                                 <color-mode>ambient-and-diffuse</color-mode>
1730                         </material>
1731                         <blend>
1732                                 <use>transparent</use>
1733                         </blend>
1734                         <alpha-test>
1735                                 <use>transparent</use>
1736                         </alpha-test>
1737                         <shade-model>smooth</shade-model>
1738                         <cull-face>back</cull-face>
1739                         <render-bin>
1740                                 <bin-number>
1741                                         <use>render-bin/bin-number</use>
1742                                 </bin-number>
1743                                 <bin-name>
1744                                         <use>render-bin/bin-name</use>
1745                                 </bin-name>
1746                         </render-bin>
1747
1748                         <texture-unit>
1749                                 <unit>0</unit>
1750                                 <image>
1751                                         <use>texture[0]/image</use>
1752                                 </image>
1753                                 <filter>
1754                                         <use>texture[0]/filter</use>
1755                                 </filter>
1756                                 <wrap-s>
1757                                         <use>texture[0]/wrap-s</use>
1758                                 </wrap-s>
1759                                 <wrap-t>
1760                                         <use>texture[0]/wrap-t</use>
1761                                 </wrap-t>
1762                                 <internal-format>
1763                                         <use>texture[0]/internal-format</use>
1764                                 </internal-format>
1765                         </texture-unit>
1766                         <texture-unit>
1767                                 <unit>2</unit>
1768                                 <image>
1769                                         <use>texture[2]/image</use>
1770                                 </image>
1771                                 <filter>
1772                                         <use>texture[2]/filter</use>
1773                                 </filter>
1774                                 <wrap-s>
1775                                         <use>texture[2]/wrap-s</use>
1776                                 </wrap-s>
1777                                 <wrap-t>
1778                                         <use>texture[2]/wrap-t</use>
1779                                 </wrap-t>
1780                                 <internal-format>
1781                                         <use>texture[2]/internal-format</use>
1782                                 </internal-format>
1783                         </texture-unit>
1784                         <texture-unit>
1785                                 <unit>3</unit>
1786                                 <image>
1787                                         <use>texture[3]/image</use>
1788                                 </image>
1789                                 <filter>
1790                                         <use>texture[3]/filter</use>
1791                                 </filter>
1792                                 <wrap-s>
1793                                         <use>texture[3]/wrap-s</use>
1794                                 </wrap-s>
1795                                 <wrap-t>
1796                                         <use>texture[3]/wrap-t</use>
1797                                 </wrap-t>
1798                                 <internal-format>
1799                                         <use>texture[3]/internal-format</use>
1800                                 </internal-format>
1801                         </texture-unit>
1802                         <texture-unit>
1803                                 <unit>4</unit>
1804                                 <image>
1805                                         <use>texture[4]/image</use>
1806                                 </image>
1807                                 <filter>
1808                                         <use>texture[4]/filter</use>
1809                                 </filter>
1810                                 <wrap-s>
1811                                         <use>texture[4]/wrap-s</use>
1812                                 </wrap-s>
1813                                 <wrap-t>
1814                                         <use>texture[4]/wrap-t</use>
1815                                 </wrap-t>
1816                                 <internal-format>
1817                                         <use>texture[4]/internal-format</use>
1818                                 </internal-format>
1819                         </texture-unit>
1820                         <texture-unit>
1821                                 <unit>5</unit>
1822                                 <image>
1823                                         <use>texture[5]/image</use>
1824                                 </image>
1825                                 <filter>
1826                                         <use>texture[5]/filter</use>
1827                                 </filter>
1828                                 <wrap-s>
1829                                         <use>texture[5]/wrap-s</use>
1830                                 </wrap-s>
1831                                 <wrap-t>
1832                                         <use>texture[5]/wrap-t</use>
1833                                 </wrap-t>
1834                                 <internal-format>
1835                                         <use>texture[5]/internal-format</use>
1836                                 </internal-format>
1837                         </texture-unit>
1838                         <texture-unit>
1839                                 <unit>6</unit>
1840                                 <image>
1841                                         <use>texture[6]/image</use>
1842                                 </image>
1843                                 <filter>
1844                                         <use>texture[6]/filter</use>
1845                                 </filter>
1846                                 <wrap-s>
1847                                         <use>texture[6]/wrap-s</use>
1848                                 </wrap-s>
1849                                 <wrap-t>
1850                                         <use>texture[6]/wrap-t</use>
1851                                 </wrap-t>
1852                                 <internal-format>
1853                                         <use>texture[6]/internal-format</use>
1854                                 </internal-format>
1855                         </texture-unit>
1856
1857                         <program>
1858                                 <vertex-shader>Shaders/water.vert</vertex-shader>
1859                                 <fragment-shader>Shaders/include_fog.frag</fragment-shader>
1860                                 <fragment-shader>Shaders/water_sine.frag</fragment-shader>
1861                         </program>
1862                         <uniform>
1863                                 <name>water_reflection</name>
1864                                 <type>sampler-2d</type>
1865                                 <value type="int">0</value>
1866                         </uniform>
1867                         <uniform>
1868                                 <name>water_normalmap</name>
1869                                 <type>sampler-2d</type>
1870                                 <value type="int">2</value>
1871                         </uniform>
1872                         <uniform>
1873                                 <name>water_dudvmap</name>
1874                                 <type>sampler-2d</type>
1875                                 <value type="int">3</value>
1876                         </uniform>
1877                         <uniform>
1878                                 <name>water_reflection_grey</name>
1879                                 <type>sampler-2d</type>
1880                                 <value type="int">4</value>
1881                         </uniform>
1882                         <uniform>
1883                                 <name>sea_foam</name>
1884                                 <type>sampler-2d</type>
1885                                 <value type="int">5</value>
1886                         </uniform>
1887                         <uniform>
1888                                 <name>perlin_normalmap</name>
1889                                 <type>sampler-2d</type>
1890                                 <value type="int">6</value>
1891                         </uniform>
1892             <!-- normalmap is .dds-->
1893             <uniform>
1894                 <name>normalmap_dds</name>
1895                 <type>float</type>
1896                 <value>
1897                     <use>normalmap_dds</use>
1898                 </value>
1899             </uniform>
1900                         <uniform>
1901                                 <name>saturation</name>
1902                                 <type>float</type>
1903                                 <!--<value>0.4</value>-->
1904                                 <value>
1905                                         <use>saturation</use>
1906                                 </value>
1907                         </uniform>
1908                         <uniform>
1909                                 <name>CloudCover0</name>
1910                                 <type>float</type>
1911                                 <value>
1912                                         <use>cloud-cover[0]</use>
1913                                 </value>
1914                         </uniform>
1915                         <uniform>
1916                                 <name>CloudCover1</name>
1917                                 <type>float</type>
1918                                 <value>
1919                                         <use>cloud-cover[1]</use>
1920                                 </value>
1921                         </uniform>
1922                         <uniform>
1923                                 <name>CloudCover2</name>
1924                                 <type>float</type>
1925                                 <value>
1926                                         <use>cloud-cover[2]</use>
1927                                 </value>
1928                         </uniform>
1929                         <uniform>
1930                                 <name>CloudCover3</name>
1931                                 <type>float</type>
1932                                 <value>
1933                                         <use>cloud-cover[3]</use>
1934                                 </value>
1935                         </uniform>
1936                         <uniform>
1937                                 <name>CloudCover4</name>
1938                                 <type>float</type>
1939                                 <value>
1940                                         <use>cloud-cover[4]</use>
1941                                 </value>
1942                         </uniform>
1943                         <uniform>
1944                                 <name>Status</name>
1945                                 <type>int</type>
1946                                 <value>
1947                                         <use>status</use>
1948                                 </value>
1949                                 <!--<value type="int">0</value> -->
1950                         </uniform>
1951                         <uniform>
1952                                 <name>Overcast</name>
1953                                 <type>float</type>
1954                                 <value>
1955                                         <use>overcast</use>
1956                                 </value>
1957                         </uniform>
1958                         <uniform>
1959                                 <name>WindE</name>
1960                                 <type>float</type>
1961                                 <value>
1962                                         <use>windE</use>
1963                                 </value>
1964                         </uniform>
1965                         <uniform>
1966                                 <name>WindN</name>
1967                                 <type>float</type>
1968                                 <value>
1969                                         <use>windN</use>
1970                                 </value>
1971                         </uniform>
1972                         <uniform>
1973                                 <name>WaveFreq</name>
1974                                 <type>float</type>
1975                                 <value>
1976                                         <use>WaveFreq</use>
1977                                 </value>
1978                         </uniform>
1979                         <uniform>
1980                                 <name>WaveAmp</name>
1981                                 <type>float</type>
1982                                 <value>
1983                                         <use>WaveAmp</use>
1984                                 </value>
1985                         </uniform>
1986                         <uniform>
1987                                 <name>WaveSharp</name>
1988                                 <type>float</type>
1989                                 <value>
1990                                         <use>WaveSharp</use>
1991                                 </value>
1992                         </uniform>
1993                         <uniform>
1994                                 <name>WaveAngle</name>
1995                                 <type>float</type>
1996                                 <value>
1997                                         <use>WaveAngle</use>
1998                                 </value>
1999                         </uniform>
2000                         <uniform>
2001                                 <name>WaveFactor</name>
2002                                 <type>float</type>
2003                                 <value>
2004                                         <use>WaveFactor</use>
2005                                 </value>
2006                         </uniform>
2007                         <uniform>
2008                                 <name>WaveDAngle</name>
2009                                 <type>float</type>
2010                                 <value>
2011                                         <use>WaveDAngle</use>
2012                                 </value>
2013                         </uniform>
2014
2015                         <!-- BEGIN fog include -->
2016                         <uniform>
2017                                 <name>visibility</name>
2018                                 <type>float</type>
2019                                 <value>
2020                                         <use>visibility</use>
2021                                 </value>
2022                         </uniform>
2023                         <uniform>
2024                                 <name>avisibility</name>
2025                                 <type>float</type>
2026                                 <value>
2027                                         <use>avisibility</use>
2028                                 </value>
2029                         </uniform>
2030                         <uniform>
2031                                 <name>hazeLayerAltitude</name>
2032                                 <type>float</type>
2033                                 <value>
2034                                         <use>lthickness</use>
2035                                 </value>
2036                         </uniform>
2037                         <uniform>
2038                                 <name>scattering</name>
2039                                 <type>float</type>
2040                                 <value>
2041                                         <use>scattering</use>
2042                                 </value>
2043                         </uniform>
2044                         <uniform>
2045                                 <name>terminator</name>
2046                                 <type>float</type>
2047                                 <value>
2048                                         <use>terminator</use>
2049                                 </value>
2050                         </uniform>
2051                         <uniform>
2052                                 <name>fogType</name>
2053                                 <type>int</type>
2054                                 <value>
2055                                         <use>fogtype</use>
2056                                 </value>
2057                         </uniform>
2058                         <!-- END fog include -->
2059             <uniform>
2060                 <name>rembrandt_enabled</name>
2061                 <type>int</type>
2062                 <value>
2063                     <use>rembrandt</use>
2064                 </value>
2065             </uniform>
2066                 </pass>
2067         </technique>
2068         <technique n="9">
2069                 <predicate>
2070                         <and>
2071                                 <property>/sim/rendering/shaders/quality-level</property>
2072                                 <property>/sim/rendering/shaders/water</property>
2073                                 <less-equal>
2074                                         <value type="float">2.0</value>
2075                                         <float-property>/sim/rendering/shaders/water</float-property>
2076                                 </less-equal>
2077                                 <or>
2078                                         <less-equal>
2079                                                 <value type="float">2.0</value>
2080                                                 <glversion/>
2081                                         </less-equal>
2082                                         <and>
2083                                                 <extension-supported>GL_ARB_shader_objects</extension-supported>
2084                                                 <extension-supported>GL_ARB_shading_language_100</extension-supported>
2085                                                 <extension-supported>GL_ARB_vertex_shader</extension-supported>
2086                                                 <extension-supported>GL_ARB_fragment_shader</extension-supported>
2087                                         </and>
2088                                 </or>
2089                         </and>
2090                 </predicate>
2091                 <pass>
2092                         <lighting>true</lighting>
2093                         <material>
2094                                 <ambient>
2095                                         <use>material/ambient</use>
2096                                 </ambient>
2097                                 <diffuse>
2098                                         <use>material/diffuse</use>
2099                                 </diffuse>
2100                                 <specular>
2101                                         <use>material/specular</use>
2102                                 </specular>
2103                                 <color-mode>ambient-and-diffuse</color-mode>
2104                         </material>
2105                         <blend>
2106                                 <use>transparent</use>
2107                         </blend>
2108                         <alpha-test>
2109                                 <use>transparent</use>
2110                         </alpha-test>
2111                         <shade-model>smooth</shade-model>
2112                         <cull-face>back</cull-face>
2113                         <render-bin>
2114                                 <bin-number>
2115                                         <use>render-bin/bin-number</use>
2116                                 </bin-number>
2117                                 <bin-name>
2118                                         <use>render-bin/bin-name</use>
2119                                 </bin-name>
2120                         </render-bin>
2121                         <texture-unit>
2122                                 <unit>0</unit>
2123                                 <image>
2124                                         <use>texture[0]/image</use>
2125                                 </image>
2126                                 <filter>
2127                                         <use>texture[0]/filter</use>
2128                                 </filter>
2129                                 <wrap-s>
2130                                         <use>texture[0]/wrap-s</use>
2131                                 </wrap-s>
2132                                 <wrap-t>
2133                                         <use>texture[0]/wrap-t</use>
2134                                 </wrap-t>
2135                                 <internal-format>
2136                                         <use>texture[0]/internal-format</use>
2137                                 </internal-format>
2138                         </texture-unit>
2139                         <texture-unit>
2140                                 <unit>2</unit>
2141                                 <image>
2142                                         <use>texture[2]/image</use>
2143                                 </image>
2144                                 <filter>
2145                                         <use>texture[2]/filter</use>
2146                                 </filter>
2147                                 <wrap-s>
2148                                         <use>texture[2]/wrap-s</use>
2149                                 </wrap-s>
2150                                 <wrap-t>
2151                                         <use>texture[2]/wrap-t</use>
2152                                 </wrap-t>
2153                                 <internal-format>
2154                                         <use>texture[2]/internal-format</use>
2155                                 </internal-format>
2156                         </texture-unit>
2157                         <texture-unit>
2158                                 <unit>3</unit>
2159                                 <image>
2160                                         <use>texture[3]/image</use>
2161                                 </image>
2162                                 <filter>
2163                                         <use>texture[3]/filter</use>
2164                                 </filter>
2165                                 <wrap-s>
2166                                         <use>texture[3]/wrap-s</use>
2167                                 </wrap-s>
2168                                 <wrap-t>
2169                                         <use>texture[3]/wrap-t</use>
2170                                 </wrap-t>
2171                                 <internal-format>
2172                                         <use>texture[3]/internal-format</use>
2173                                 </internal-format>
2174                         </texture-unit>
2175                         <texture-unit>
2176                                 <unit>4</unit>
2177                                 <image>
2178                                         <use>texture[4]/image</use>
2179                                 </image>
2180                                 <filter>
2181                                         <use>texture[4]/filter</use>
2182                                 </filter>
2183                                 <wrap-s>
2184                                         <use>texture[4]/wrap-s</use>
2185                                 </wrap-s>
2186                                 <wrap-t>
2187                                         <use>texture[4]/wrap-t</use>
2188                                 </wrap-t>
2189                                 <internal-format>
2190                                         <use>texture[4]/internal-format</use>
2191                                 </internal-format>
2192                         </texture-unit>
2193                         <texture-unit>
2194                                 <unit>5</unit>
2195                                 <image>
2196                                         <use>texture[5]/image</use>
2197                                 </image>
2198                                 <filter>
2199                                         <use>texture[5]/filter</use>
2200                                 </filter>
2201                                 <wrap-s>
2202                                         <use>texture[5]/wrap-s</use>
2203                                 </wrap-s>
2204                                 <wrap-t>
2205                                         <use>texture[5]/wrap-t</use>
2206                                 </wrap-t>
2207                                 <internal-format>
2208                                         <use>texture[5]/internal-format</use>
2209                                 </internal-format>
2210                         </texture-unit>
2211                         <texture-unit>
2212                                 <unit>6</unit>
2213                                 <image>
2214                                         <use>texture[6]/image</use>
2215                                 </image>
2216                                 <filter>
2217                                         <use>texture[6]/filter</use>
2218                                 </filter>
2219                                 <wrap-s>
2220                                         <use>texture[6]/wrap-s</use>
2221                                 </wrap-s>
2222                                 <wrap-t>
2223                                         <use>texture[6]/wrap-t</use>
2224                                 </wrap-t>
2225                                 <internal-format>
2226                                         <use>texture[6]/internal-format</use>
2227                                 </internal-format>
2228                         </texture-unit>
2229
2230                         <program>
2231                                 <vertex-shader>Shaders/water.vert</vertex-shader>
2232                                 <fragment-shader>Shaders/include_fog.frag</fragment-shader>
2233                                 <fragment-shader>Shaders/water.frag</fragment-shader>
2234                         </program>
2235                         <uniform>
2236                                 <name>water_reflection</name>
2237                                 <type>sampler-2d</type>
2238                                 <value type="int">0</value>
2239                         </uniform>
2240                         <uniform>
2241                                 <name>water_normalmap</name>
2242                                 <type>sampler-2d</type>
2243                                 <value type="int">2</value>
2244                         </uniform>
2245                         <uniform>
2246                                 <name>water_dudvmap</name>
2247                                 <type>sampler-2d</type>
2248                                 <value type="int">3</value>
2249                         </uniform>
2250                         <uniform>
2251                                 <name>water_reflection_grey</name>
2252                                 <type>sampler-2d</type>
2253                                 <value type="int">4</value>
2254                         </uniform>
2255                         <uniform>
2256                                 <name>sea_foam</name>
2257                                 <type>sampler-2d</type>
2258                                 <value type="int">5</value>
2259                         </uniform>
2260                         <uniform>
2261                                 <name>perlin_normalmap</name>
2262                                 <type>sampler-2d</type>
2263                                 <value type="int">6</value>
2264                         </uniform>
2265             <!-- normalmap is .dds-->
2266             <uniform>
2267                 <name>normalmap_dds</name>
2268                 <type>float</type>
2269                 <value>
2270                     <use>normalmap_dds</use>
2271                 </value>
2272             </uniform>
2273                         <uniform>
2274                                 <name>saturation</name>
2275                                 <type>float</type>
2276                                 <!--<value>0.4</value>-->
2277                                 <value>
2278                                         <use>saturation</use>
2279                                 </value>
2280                         </uniform>
2281                         <uniform>
2282                                 <name>CloudCover0</name>
2283                                 <type>float</type>
2284                                 <value>
2285                                         <use>cloud-cover[0]</use>
2286                                 </value>
2287                         </uniform>
2288                         <uniform>
2289                                 <name>CloudCover1</name>
2290                                 <type>float</type>
2291                                 <value>
2292                                         <use>cloud-cover[1]</use>
2293                                 </value>
2294                         </uniform>
2295                         <uniform>
2296                                 <name>CloudCover2</name>
2297                                 <type>float</type>
2298                                 <value>
2299                                         <use>cloud-cover[2]</use>
2300                                 </value>
2301                         </uniform>
2302                         <uniform>
2303                                 <name>CloudCover3</name>
2304                                 <type>float</type>
2305                                 <value>
2306                                         <use>cloud-cover[3]</use>
2307                                 </value>
2308                         </uniform>
2309                         <uniform>
2310                                 <name>CloudCover4</name>
2311                                 <type>float</type>
2312                                 <value>
2313                                         <use>cloud-cover[4]</use>
2314                                 </value>
2315                         </uniform>
2316                         <uniform>
2317                                 <name>Status</name>
2318                                 <type>int</type>
2319                                 <value>
2320                                         <use>status</use>
2321                                 </value>
2322                         </uniform>
2323                         <uniform>
2324                                 <name>Overcast</name>
2325                                 <type>float</type>
2326                                 <value>
2327                                         <use>overcast</use>
2328                                 </value>
2329                         </uniform>
2330                         <uniform>
2331                                 <name>WindE</name>
2332                                 <type>float</type>
2333                                 <value>
2334                                         <use>windE</use>
2335                                 </value>
2336                         </uniform>
2337                         <uniform>
2338                                 <name>WindN</name>
2339                                 <type>float</type>
2340                                 <value>
2341                                         <use>windN</use>
2342                                 </value>
2343                         </uniform>
2344                         <!--uniform> unused?
2345                                 <name>WindFrom</name>
2346                                 <type>float</type>
2347                                 <value>
2348                                         <use>wind-from</use>
2349                                 </value>
2350                         </uniform-->
2351                         <uniform>
2352                                 <name>WaveFreq</name>
2353                                 <type>float</type>
2354                                 <value>
2355                                         <use>WaveFreq</use>
2356                                 </value>
2357                         </uniform>
2358                         <uniform>
2359                                 <name>WaveAmp</name>
2360                                 <type>float</type>
2361                                 <value>
2362                                         <use>WaveAmp</use>
2363                                 </value>
2364                         </uniform>
2365                         <uniform>
2366                                 <name>WaveSharp</name>
2367                                 <type>float</type>
2368                                 <value>
2369                                         <use>WaveSharp</use>
2370                                 </value>
2371                         </uniform>
2372                         <uniform>
2373                                 <name>WaveAngle</name>
2374                                 <type>float</type>
2375                                 <value>
2376                                         <use>WaveAngle</use>
2377                                 </value>
2378                         </uniform>
2379                         <uniform>
2380                                 <name>WaveFactor</name>
2381                                 <type>float</type>
2382                                 <value>
2383                                         <use>WaveFactor</use>
2384                                 </value>
2385                         </uniform>
2386                         <uniform>
2387                                 <name>WaveDAngle</name>
2388                                 <type>float</type>
2389                                 <value>
2390                                         <use>WaveDAngle</use>
2391                                 </value>
2392                         </uniform>
2393
2394                         <!--        BEGIN fog include -->
2395                         <uniform>
2396                                 <name>visibility</name>
2397                                 <type>float</type>
2398                                 <value>
2399                                         <use>visibility</use>
2400                                 </value>
2401                         </uniform>
2402                         <uniform>
2403                                 <name>avisibility</name>
2404                                 <type>float</type>
2405                                 <value>
2406                                         <use>avisibility</use>
2407                                 </value>
2408                         </uniform>
2409                         <uniform>
2410                                 <name>hazeLayerAltitude</name>
2411                                 <type>float</type>
2412                                 <value>
2413                                         <use>lthickness</use>
2414                                 </value>
2415                         </uniform>
2416                         <uniform>
2417                                 <name>scattering</name>
2418                                 <type>float</type>
2419                                 <value>
2420                                         <use>scattering</use>
2421                                 </value>
2422                         </uniform>
2423                         <uniform>
2424                                 <name>terminator</name>
2425                                 <type>float</type>
2426                                 <value>
2427                                         <use>terminator</use>
2428                                 </value>
2429                         </uniform>
2430                         <uniform>
2431                                 <name>fogType</name>
2432                                 <type>int</type>
2433                                 <value>
2434                                         <use>fogtype</use>
2435                                 </value>
2436                         </uniform>
2437                         <!--                    END fog include -->
2438             <uniform>
2439                 <name>rembrandt_enabled</name>
2440                 <type>int</type>
2441                 <value>
2442                     <use>rembrandt</use>
2443                 </value>
2444             </uniform>
2445                 </pass>
2446         </technique>
2447 </PropertyList>