Autumn colors by pixel postprocessing with color rotation encoded in the terrain...
[fg:toms-fgdata.git] / Effects / terrain-default.eff
1 <?xml version="1.0" encoding="utf-8"?>
2 <PropertyList>
3   <name>Effects/terrain-default</name>
4   <!-- <inherits-from>another-effect</inherits-from> -->
5   <parameters>
6     <material>
7       <ambient type="vec4d">
8                                 0.2 .2 0.2 1.0
9                         </ambient>
10       <diffuse type="vec4d">
11                                 .8 .8 .8 1.0
12                         </diffuse>
13       <specular type="vec4d">
14                                 0.0 0.0 0.0 1.0
15                         </specular>
16       <emissive type="vec4d">
17                                 0.0 0.0 0.0 1.0
18                         </emissive>
19       <shininess>1.2</shininess>
20     </material>
21     <texture n="0">
22       <image>Textures/Terrain/unknown.png</image>
23       <filter>linear-mipmap-linear</filter>
24       <!-- also repeat -->
25       <wrap-s>repeat</wrap-s>
26       <wrap-t>repeat</wrap-t>
27       <!--
28            <wrap-r>clamp-to-border</wrap-r>
29            -->
30       <!-- float, signed-integer, integer -->
31       <internal-format>normalized</internal-format>
32     </texture>
33     <texture n="10">
34       <image>Textures.high/Terrain/snow3.png</image>
35       <filter>linear-mipmap-linear</filter>
36       <wrap-s>repeat</wrap-s>
37       <wrap-t>repeat</wrap-t>
38       <internal-format>normalized</internal-format>
39     </texture>
40     <texture n="11">
41       <image>Textures/Terrain/void.png</image>
42       <filter>linear-mipmap-linear</filter>
43       <wrap-s>repeat</wrap-s>
44       <wrap-t>repeat</wrap-t>
45       <internal-format>normalized</internal-format>
46     </texture>
47     <texture n="12">
48       <image>Textures/Terrain/void.png</image>
49       <filter>linear-mipmap-linear</filter>
50       <wrap-s>repeat</wrap-s>
51       <wrap-t>repeat</wrap-t>
52       <internal-format>normalized</internal-format>
53     </texture>
54     <texture n="13">
55       <image>Textures.high/Terrain/rock_alt.png</image>
56       <filter>linear-mipmap-linear</filter>
57       <wrap-s>repeat</wrap-s>
58       <wrap-t>repeat</wrap-t>
59       <internal-format>normalized</internal-format>
60     </texture>
61         <texture n="14">
62       <image>Textures.high/Terrain/grain_texture.png</image>
63       <filter>linear-mipmap-linear</filter>
64       <wrap-s>repeat</wrap-s>
65       <wrap-t>repeat</wrap-t>
66       <internal-format>normalized</internal-format>
67     </texture>
68         <texture n="15">
69       <image>Textures/Terrain/void.png</image>
70       <filter>linear-mipmap-linear</filter>
71       <wrap-s>repeat</wrap-s>
72       <wrap-t>repeat</wrap-t>
73       <internal-format>normalized</internal-format>
74     </texture>
75     <transparent>false</transparent>
76     <render-bin>
77       <bin-number>0</bin-number>
78       <bin-name>RenderBin</bin-name>
79     </render-bin>
80     <material-id>0</material-id>
81     <grain_strength>0.5</grain_strength>
82     <intrinsic_wetness>0.0</intrinsic_wetness>
83     <transition_model>0.5</transition_model>
84     <hires_overlay_bias>0.0</hires_overlay_bias>
85     <dot_density>1.0</dot_density>
86     <dot_size>1.0</dot_size>
87     <dust_resistance>1.0</dust_resistance>
88     <visibility><use>/environment/ground-visibility-m</use></visibility>
89     <avisibility><use>/environment/visibility-m</use></avisibility>
90     <lthickness><use>/environment/ground-haze-thickness-m</use></lthickness>
91     <scattering><use>/rendering/scene/scattering</use></scattering>
92     <ground_scattering><use>/environment/surface/scattering</use></ground_scattering>
93     <terminator><use>/environment/terminator-relative-position-m</use></terminator>
94     <terrain_alt><use>/environment/mean-terrain-elevation-m</use></terrain_alt>
95     <overcast><use>/rendering/scene/overcast</use></overcast>
96     <eye_alt><use>/sim/rendering/eye-altitude-m</use></eye_alt>
97     <snow_level><use>/environment/snow-level-m</use></snow_level>
98     <snow_thickness_factor><use>/environment/surface/snow-thickness-factor</use></snow_thickness_factor>
99     <dust_cover_factor><use>/environment/surface/dust-cover-factor</use></dust_cover_factor>
100     <lichen_cover_factor><use>/environment/surface/lichen-cover-factor</use></lichen_cover_factor>
101     <wetness><use>/environment/surface/wetness</use></wetness>
102     <fogtype><use>/sim/rendering/shaders/skydome</use></fogtype>
103     <fogstructure><use>/environment/fog-structure</use></fogstructure>
104     <cloud_self_shading><use>/environment/cloud-self-shading</use></cloud_self_shading>
105     <moonlight><use>/environment/moonlight</use></moonlight>
106     <season><use>/environment/season</use></season>
107     <windspeed><use>/environment/wind-speed-kt</use></windspeed>
108     <quality_level><use>/sim/rendering/shaders/landmass</use></quality_level>
109     <tquality_level><use>/sim/rendering/shaders/transition</use></tquality_level>
110   </parameters>
111   <!-- put techniques at a "high" index to allow derived effects to
112        insert their own techniques first. -->
113
114 <technique n="3">
115     <predicate>
116       <and>
117         <property>/sim/rendering/shaders/skydome</property>
118         <and>
119           <less-equal>
120             <value type="float">6.0</value>
121             <float-property>/sim/rendering/shaders/landmass</float-property>
122           </less-equal>
123           <less-equal>
124             <value type="float">6.0</value>
125             <float-property>/sim/rendering/shaders/transition</float-property>
126           </less-equal>
127         </and>
128         <or>
129           <less-equal>
130             <value type="float">2.0</value>
131             <glversion/>
132           </less-equal>
133           <and>
134             <extension-supported>GL_ARB_shader_objects</extension-supported>
135             <extension-supported>GL_ARB_shading_language_100</extension-supported>
136             <extension-supported>GL_ARB_vertex_shader</extension-supported>
137             <extension-supported>GL_ARB_fragment_shader</extension-supported>
138           </and>
139         </or>
140       </and>
141     </predicate>
142     <pass>
143       <lighting>true</lighting>
144       <material>
145         <ambient><use>material/ambient</use></ambient>
146         <diffuse><use>material/diffuse</use></diffuse>
147         <specular><use>material/specular</use></specular>
148         <emissive><use>material/emissive</use></emissive>
149         <shininess><use>material/shininess</use></shininess>
150         <color-mode>ambient-and-diffuse</color-mode>
151       </material>
152       <alpha-test><use>transparent</use></alpha-test>
153       <shade-model>smooth</shade-model>
154       <cull-face>back</cull-face>
155       <render-bin>
156         <bin-number>-1</bin-number>
157         <bin-name>RenderBin</bin-name>
158       </render-bin>
159       <program>
160         <vertex-shader>Shaders/trivial.vert</vertex-shader>
161         <fragment-shader>Shaders/trivial.frag</fragment-shader>
162       </program>
163       <color-mask type="vec4d">0 0 0 0</color-mask>
164     </pass>
165     <pass>
166       <lighting>true</lighting>
167       <material>
168         <ambient><use>material/ambient</use></ambient>
169         <diffuse><use>material/diffuse</use></diffuse>
170         <specular><use>material/specular</use></specular>
171         <emissive><use>material/emissive</use></emissive>
172         <shininess><use>material/shininess</use></shininess>
173         <color-mode>ambient-and-diffuse</color-mode>
174       </material>
175       <blend><use>transparent</use></blend>
176       <alpha-test><use>transparent</use></alpha-test>
177       <shade-model>smooth</shade-model>
178       <cull-face>back</cull-face>
179       <render-bin>
180         <bin-number><use>render-bin/bin-number</use></bin-number>
181         <bin-name><use>render-bin/bin-name</use></bin-name>
182       </render-bin>
183       <texture-unit>
184         <unit>0</unit>
185         <image><use>texture[0]/image</use></image>
186         <filter><use>texture[0]/filter</use></filter>
187         <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
188         <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
189         <internal-format><use>texture[0]/internal-format</use></internal-format>
190       </texture-unit>
191         <texture-unit>
192         <unit>2</unit>
193         <image><use>texture[13]/image</use></image>
194         <filter><use>texture[13]/filter</use></filter>
195         <wrap-s><use>texture[13]/wrap-s</use></wrap-s>
196         <wrap-t><use>texture[13]/wrap-t</use></wrap-t>
197         <internal-format><use>texture[13]/internal-format</use></internal-format>
198       </texture-unit>
199         <texture-unit>
200         <unit>3</unit>
201         <image><use>texture[15]/image</use></image>
202         <filter><use>texture[15]/filter</use></filter>
203         <wrap-s><use>texture[15]/wrap-s</use></wrap-s>
204         <wrap-t><use>texture[15]/wrap-t</use></wrap-t>
205         <internal-format><use>texture[15]/internal-format</use></internal-format>
206       </texture-unit>
207           <texture-unit>
208         <unit>4</unit>
209         <image><use>texture[14]/image</use></image>
210         <filter><use>texture[14]/filter</use></filter>
211         <wrap-s><use>texture[14]/wrap-s</use></wrap-s>
212         <wrap-t><use>texture[14]/wrap-t</use></wrap-t>
213         <internal-format><use>texture[14]/internal-format</use></internal-format>
214       </texture-unit>
215       <texture-unit>
216         <unit>5</unit>
217         <image><use>texture[12]/image</use></image>
218         <filter><use>texture[12]/filter</use></filter>
219         <wrap-s><use>texture[12]/wrap-s</use></wrap-s>
220         <wrap-t><use>texture[12]/wrap-t</use></wrap-t>
221         <internal-format><use>texture[12]/internal-format</use></internal-format>
222       </texture-unit>
223       <texture-unit>
224         <unit>7</unit>
225         <image><use>texture[11]/image</use></image>
226         <filter><use>texture[11]/filter</use></filter>
227         <wrap-s><use>texture[11]/wrap-s</use></wrap-s>
228         <wrap-t><use>texture[11]/wrap-t</use></wrap-t>
229         <internal-format><use>texture[11]/internal-format</use></internal-format>
230       </texture-unit>
231       <program>
232         <vertex-shader>Shaders/terrain-haze-ultra.vert</vertex-shader>
233         <fragment-shader>Shaders/terrain-haze-ultra.frag</fragment-shader>
234       </program>
235           <uniform>
236         <name>grain_strength</name>
237         <type>float</type>
238         <value><use>grain_strength</use></value>
239       </uniform>
240           <uniform>
241         <name>intrinsic_wetness</name>
242         <type>float</type>
243         <value><use>intrinsic_wetness</use></value>
244       </uniform>
245       <uniform>
246         <name>transition_model</name>
247         <type>float</type>
248         <value><use>transition_model</use></value>
249       </uniform>
250       <uniform>
251         <name>hires_overlay_bias</name>
252         <type>float</type>
253         <value><use>hires_overlay_bias</use></value>
254       </uniform>
255           <uniform>
256         <name>dot_density</name>
257         <type>float</type>
258         <value><use>dot_density</use></value>
259       </uniform>
260           <uniform>
261         <name>dot_size</name>
262         <type>float</type>
263         <value><use>dot_size</use></value>
264       </uniform>
265           <uniform>
266         <name>dust_resistance</name>
267         <type>float</type>
268         <value><use>dust_resistance</use></value>
269       </uniform>
270       <uniform>
271         <name>visibility</name>
272         <type>float</type>
273         <value><use>visibility</use></value>
274       </uniform>
275       <uniform>
276         <name>avisibility</name>
277         <type>float</type>
278         <value><use>avisibility</use></value>
279       </uniform>
280       <uniform>
281         <name>hazeLayerAltitude</name>
282         <type>float</type>
283         <value><use>lthickness</use></value>
284       </uniform>
285       <uniform>
286         <name>scattering</name>
287         <type>float</type>
288         <value><use>scattering</use></value>
289       </uniform>
290       <uniform>
291         <name>ground_scattering</name>
292         <type>float</type>
293         <value><use>ground_scattering</use></value>
294       </uniform>
295       <uniform>
296         <name>terminator</name>
297         <type>float</type>
298         <value><use>terminator</use></value>
299       </uniform>
300       <uniform>
301         <name>terrain_alt</name>
302         <type>float</type>
303         <value><use>terrain_alt</use></value>
304       </uniform>
305       <uniform>
306         <name>overcast</name>
307         <type>float</type>
308         <value><use>overcast</use></value>
309       </uniform>
310       <uniform>
311         <name>eye_alt</name>
312         <type>float</type>
313         <value><use>eye_alt</use></value>
314       </uniform>
315           <uniform>
316         <name>eye_lat</name>
317         <type>float</type>
318         <value><use>eye_lat</use></value>
319       </uniform>
320           <uniform>
321         <name>eye_lon</name>
322         <type>float</type>
323         <value><use>eye_lon</use></value>
324       </uniform>
325       <uniform>
326         <name>snowlevel</name>
327         <type>float</type>
328         <value><use>snow_level</use></value>
329       </uniform>
330       <uniform>
331            <name>snow_thickness_factor</name>
332            <type>float</type>
333            <value><use>snow_thickness_factor</use></value>
334       </uniform>
335       <uniform>
336         <name>dust_cover_factor</name>
337         <type>float</type>
338         <value><use>dust_cover_factor</use></value>
339       </uniform>
340       <uniform>
341         <name>lichen_cover_factor</name>
342         <type>float</type>
343         <value> <use>lichen_cover_factor</use></value>
344       </uniform>
345       <uniform>
346         <name>wetness</name>
347         <type>float</type>
348         <value><use>wetness</use></value>
349       </uniform>
350           <uniform>
351         <name>windspeed</name>
352         <type>float</type>
353         <value><use>windspeed</use></value>
354       </uniform>
355       <uniform>
356         <name>fogstructure</name>
357         <type>float</type>
358         <value><use>fogstructure</use></value>
359       </uniform>
360       <uniform>
361         <name>cloud_self_shading</name>
362         <type>float</type>
363         <value><use>cloud_self_shading</use></value>
364       </uniform>
365       <uniform>
366         <name>moonlight</name>
367         <type>float</type>
368         <value><use>moonlight</use></value>
369       </uniform>
370       <uniform>
371         <name>season</name>
372         <type>float</type>
373         <value><use>season</use></value>
374       </uniform>
375       <uniform>
376         <name>quality_level</name>
377         <type>int</type>
378         <value><use>quality_level</use></value>
379       </uniform>
380       <uniform>
381         <name>tquality_level</name>
382         <type>int</type>
383         <value><use>tquality_level</use></value>
384       </uniform>
385       <uniform>
386         <name>texture</name>
387         <type>sampler-2d</type>
388         <value type="int">0</value>
389       </uniform>
390       <uniform>
391         <name>mix_texture</name>
392         <type>sampler-2d</type>
393         <value type="int">5</value>
394       </uniform>
395       <uniform>
396         <name>snow_texture</name>
397         <type>sampler-2d</type>
398         <value type="int">6</value>
399       </uniform>
400       <uniform>
401         <name>detail_texture</name>
402         <type>sampler-2d</type>
403         <value type="int">7</value>
404       </uniform>
405           <uniform>
406         <name>grain_texture</name>
407         <type>sampler-2d</type>
408         <value type="int">4</value>
409       </uniform>
410           <uniform>
411         <name>dot_texture</name>
412         <type>sampler-2d</type>
413         <value type="int">3</value>
414       </uniform>
415           <uniform>
416         <name>gradient_texture</name>
417         <type>sampler-2d</type>
418         <value type="int">2</value>
419       </uniform>
420       <uniform>
421         <name>colorMode</name>
422         <type>int</type>
423         <value>2</value>
424         <!-- AMBIENT_AND_DIFFUSE -->
425       </uniform>
426       <depth>
427         <function>lequal</function>
428         <write-mask type="bool">false</write-mask>
429       </depth>
430     </pass>
431   </technique>
432
433
434
435   <technique n="4">
436     <predicate>
437       <and>
438         <property>/sim/rendering/shaders/skydome</property>
439         <or>
440           <less-equal>
441             <value type="float">4.0</value>
442             <float-property>/sim/rendering/shaders/landmass</float-property>
443           </less-equal>
444           <less-equal>
445             <value type="float">3.0</value>
446             <float-property>/sim/rendering/shaders/transition</float-property>
447           </less-equal>
448         </or>
449         <or>
450           <less-equal>
451             <value type="float">2.0</value>
452             <glversion/>
453           </less-equal>
454           <and>
455             <extension-supported>GL_ARB_shader_objects</extension-supported>
456             <extension-supported>GL_ARB_shading_language_100</extension-supported>
457             <extension-supported>GL_ARB_vertex_shader</extension-supported>
458             <extension-supported>GL_ARB_fragment_shader</extension-supported>
459           </and>
460         </or>
461       </and>
462     </predicate>
463     <pass>
464       <lighting>true</lighting>
465       <material>
466         <ambient><use>material/ambient</use></ambient>
467         <diffuse><use>material/diffuse</use></diffuse>
468         <specular><use>material/specular</use></specular>
469         <emissive><use>material/emissive</use></emissive>
470         <shininess><use>material/shininess</use></shininess>
471         <color-mode>ambient-and-diffuse</color-mode>
472       </material>
473       <alpha-test><use>transparent</use></alpha-test>
474       <shade-model>smooth</shade-model>
475       <cull-face>back</cull-face>
476       <render-bin>
477         <bin-number>-1</bin-number>
478         <bin-name>RenderBin</bin-name>
479       </render-bin>
480       <program>
481         <vertex-shader>Shaders/trivial.vert</vertex-shader>
482         <fragment-shader>Shaders/trivial.frag</fragment-shader>
483       </program>
484       <color-mask type="vec4d">0 0 0 0</color-mask>
485     </pass>
486     <pass>
487       <lighting>true</lighting>
488       <material>
489         <ambient><use>material/ambient</use></ambient>
490         <diffuse><use>material/diffuse</use></diffuse>
491         <specular><use>material/specular</use></specular>
492         <emissive><use>material/emissive</use></emissive>
493         <shininess><use>material/shininess</use></shininess>
494         <color-mode>ambient-and-diffuse</color-mode>
495       </material>
496       <blend><use>transparent</use></blend>
497       <alpha-test><use>transparent</use></alpha-test>
498       <shade-model>smooth</shade-model>
499       <cull-face>back</cull-face>
500       <render-bin>
501         <bin-number><use>render-bin/bin-number</use></bin-number>
502         <bin-name><use>render-bin/bin-name</use></bin-name>
503       </render-bin>
504       <texture-unit>
505         <unit>0</unit>
506         <image><use>texture[0]/image</use></image>
507         <filter><use>texture[0]/filter</use></filter>
508         <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
509         <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
510         <internal-format><use>texture[0]/internal-format</use></internal-format>
511       </texture-unit>
512       <texture-unit>
513         <unit>1</unit>
514         <type>noise</type>
515       </texture-unit>
516       <texture-unit>
517         <unit>5</unit>
518         <image><use>texture[12]/image</use></image>
519         <filter><use>texture[12]/filter</use></filter>
520         <wrap-s><use>texture[12]/wrap-s</use></wrap-s>
521         <wrap-t><use>texture[12]/wrap-t</use></wrap-t>
522         <internal-format><use>texture[12]/internal-format</use></internal-format>
523       </texture-unit>
524       <texture-unit>
525         <unit>6</unit>
526         <image><use>texture[10]/image</use></image>
527         <filter><use>texture[10]/filter</use></filter>
528         <wrap-s><use>texture[10]/wrap-s</use></wrap-s>
529         <wrap-t><use>texture[10]/wrap-t</use></wrap-t>
530         <internal-format><use>texture[10]/internal-format</use></internal-format>
531       </texture-unit>
532       <texture-unit>
533         <unit>7</unit>
534         <image><use>texture[11]/image</use></image>
535         <filter><use>texture[11]/filter</use></filter>
536         <wrap-s><use>texture[11]/wrap-s</use></wrap-s>
537         <wrap-t><use>texture[11]/wrap-t</use></wrap-t>
538         <internal-format><use>texture[11]/internal-format</use></internal-format>
539       </texture-unit>
540       <program>
541         <vertex-shader>Shaders/terrain-haze-detailed.vert</vertex-shader>
542         <fragment-shader>Shaders/terrain-haze-detailed.frag</fragment-shader>
543       </program>
544       <uniform>
545         <name>visibility</name>
546         <type>float</type>
547         <value><use>visibility</use></value>
548       </uniform>
549       <uniform>
550         <name>avisibility</name>
551         <type>float</type>
552         <value><use>avisibility</use></value>
553       </uniform>
554       <uniform>
555         <name>hazeLayerAltitude</name>
556         <type>float</type>
557         <value><use>lthickness</use></value>
558       </uniform>
559       <uniform>
560         <name>scattering</name>
561         <type>float</type>
562         <value><use>scattering</use></value>
563       </uniform>
564       <uniform>
565         <name>ground_scattering</name>
566         <type>float</type>
567         <value><use>ground_scattering</use></value>
568       </uniform>
569       <uniform>
570         <name>terminator</name>
571         <type>float</type>
572         <value><use>terminator</use></value>
573       </uniform>
574       <uniform>
575         <name>terrain_alt</name>
576         <type>float</type>
577         <value><use>terrain_alt</use></value>
578       </uniform>
579       <uniform>
580         <name>overcast</name>
581         <type>float</type>
582         <value><use>overcast</use></value>
583       </uniform>
584       <uniform>
585         <name>eye_alt</name>
586         <type>float</type>
587         <value><use>eye_alt</use></value>
588       </uniform>
589       <uniform>
590         <name>transition_model</name>
591         <type>float</type>
592         <value><use>transition_model</use></value>
593       </uniform>
594       <uniform>
595         <name>hires_overlay_bias</name>
596         <type>float</type>
597         <value><use>hires_overlay_bias</use></value>
598       </uniform>
599       <uniform>
600         <name>snowlevel</name>
601         <type>float</type>
602         <value><use>snow_level</use></value>
603       </uniform>
604       <uniform>
605         <name>snow_thickness_factor</name>
606         <type>float</type>
607         <value> <use>snow_thickness_factor</use></value>
608       </uniform>
609       <uniform>
610         <name>dust_cover_factor</name>
611         <type>float</type>
612         <value><use>dust_cover_factor</use></value>
613       </uniform>
614       <uniform>
615         <name>lichen_cover_factor</name>
616         <type>float</type>
617         <value> <use>lichen_cover_factor</use></value>
618       </uniform>
619       <uniform>
620         <name>wetness</name>
621         <type>float</type>
622         <value><use>wetness</use></value>
623       </uniform>
624       <uniform>
625         <name>fogstructure</name>
626         <type>float</type>
627         <value><use>fogstructure</use></value>
628       </uniform>
629       <uniform>
630         <name>cloud_self_shading</name>
631         <type>float</type>
632         <value><use>cloud_self_shading</use></value>
633       </uniform>
634       <uniform>
635         <name>moonlight</name>
636         <type>float</type>
637         <value><use>moonlight</use></value>
638       </uniform>
639       <uniform>
640         <name>season</name>
641         <type>float</type>
642         <value><use>season</use></value>
643       </uniform>
644       <uniform>
645         <name>quality_level</name>
646         <type>int</type>
647         <value><use>quality_level</use></value>
648       </uniform>
649       <uniform>
650         <name>tquality_level</name>
651         <type>int</type>
652         <value><use>tquality_level</use></value>
653       </uniform>
654       <uniform>
655         <name>texture</name>
656         <type>sampler-2d</type>
657         <value type="int">0</value>
658       </uniform>
659       <uniform>
660         <name>NoiseTex</name>
661         <type>sampler-3d</type>
662         <value type="int">1</value>
663       </uniform>
664       <uniform>
665         <name>mix_texture</name>
666         <type>sampler-2d</type>
667         <value type="int">5</value>
668       </uniform>
669       <uniform>
670         <name>snow_texture</name>
671         <type>sampler-2d</type>
672         <value type="int">6</value>
673       </uniform>
674       <uniform>
675         <name>detail_texture</name>
676         <type>sampler-2d</type>
677         <value type="int">7</value>
678       </uniform>
679       <uniform>
680         <name>colorMode</name>
681         <type>int</type>
682         <value>2</value>
683         <!-- AMBIENT_AND_DIFFUSE -->
684       </uniform>
685       <depth>
686         <function>lequal</function>
687         <write-mask type="bool">false</write-mask>
688       </depth>
689     </pass>
690   </technique>
691   <technique n="5">
692     <predicate>
693       <and>
694         <property>/sim/rendering/shaders/skydome</property>
695         <or>
696           <less-equal>
697             <value type="float">2.0</value>
698             <glversion/>
699           </less-equal>
700           <and>
701             <extension-supported>GL_ARB_shader_objects</extension-supported>
702             <extension-supported>GL_ARB_shading_language_100</extension-supported>
703             <extension-supported>GL_ARB_vertex_shader</extension-supported>
704             <extension-supported>GL_ARB_fragment_shader</extension-supported>
705           </and>
706         </or>
707       </and>
708     </predicate>
709     <pass>
710       <lighting>true</lighting>
711       <material>
712         <ambient><use>material/ambient</use></ambient>
713         <diffuse><use>material/diffuse</use></diffuse>
714         <specular><use>material/specular</use></specular>
715         <emissive><use>material/emissive</use></emissive>
716         <shininess><use>material/shininess</use></shininess>
717         <color-mode>ambient-and-diffuse</color-mode>
718       </material>
719       <alpha-test><use>transparent</use></alpha-test>
720       <shade-model>smooth</shade-model>
721       <cull-face>back</cull-face>
722       <render-bin>
723         <bin-number>-1</bin-number>
724         <bin-name>RenderBin</bin-name>
725       </render-bin>
726       <texture-unit>
727         <unit>0</unit>
728         <image><use>texture[0]/image</use></image>
729         <filter><use>texture[0]/filter</use></filter>
730         <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
731         <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
732         <internal-format><use>texture[0]/internal-format</use></internal-format>
733       </texture-unit>
734       <program>
735         <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader>
736         <vertex-shader n="1">Shaders/default.vert</vertex-shader>
737         <fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
738         <fragment-shader n="1">Shaders/terrain-nocolor.frag</fragment-shader>
739       </program>
740       <uniform>
741         <name>texture</name>
742         <type>sampler-2d</type>
743         <value type="int">0</value>
744       </uniform>
745       <color-mask type="vec4d">0 0 0 0</color-mask>
746     </pass>
747     <pass>
748       <lighting>true</lighting>
749       <material>
750         <ambient><use>material/ambient</use></ambient>
751         <diffuse><use>material/diffuse</use></diffuse>
752         <specular><use>material/specular</use></specular>
753         <emissive><use>material/emissive</use></emissive>
754         <shininess><use>material/shininess</use></shininess>
755         <color-mode>ambient-and-diffuse</color-mode>
756       </material>
757       <blend><use>transparent</use></blend>
758       <alpha-test><use>transparent</use></alpha-test>
759       <shade-model>smooth</shade-model>
760       <cull-face>back</cull-face>
761       <render-bin>
762         <bin-number><use>render-bin/bin-number</use></bin-number>
763         <bin-name><use>render-bin/bin-name</use></bin-name>
764       </render-bin>
765       <texture-unit>
766         <unit>0</unit>
767         <image><use>texture[0]/image</use></image>
768         <filter><use>texture[0]/filter</use></filter>
769         <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
770         <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
771         <internal-format><use>texture[0]/internal-format</use></internal-format>
772       </texture-unit>
773       <program>
774         <vertex-shader>Shaders/terrain-haze.vert</vertex-shader>
775         <fragment-shader>Shaders/terrain-haze.frag</fragment-shader>
776       </program>
777       <uniform>
778         <name>visibility</name>
779         <type>float</type>
780         <value><use>visibility</use></value>
781       </uniform>
782       <uniform>
783         <name>avisibility</name>
784         <type>float</type>
785         <value><use>avisibility</use></value>
786       </uniform>
787       <uniform>
788         <name>hazeLayerAltitude</name>
789         <type>float</type>
790         <value><use>lthickness</use></value>
791       </uniform>
792       <uniform>
793         <name>scattering</name>
794         <type>float</type>
795         <value><use>scattering</use></value>
796       </uniform>
797       <uniform>
798         <name>ground_scattering</name>
799         <type>float</type>
800         <value><use>ground_scattering</use></value>
801       </uniform>
802       <uniform>
803         <name>terminator</name>
804         <type>float</type>
805         <value><use>terminator</use></value>
806       </uniform>
807       <uniform>
808         <name>terrain_alt</name>
809         <type>float</type>
810         <value><use>terrain_alt</use></value>
811       </uniform>
812       <uniform>
813         <name>overcast</name>
814         <type>float</type>
815         <value><use>overcast</use></value>
816       </uniform>
817       <uniform>
818         <name>eye_alt</name>
819         <type>float</type>
820         <value><use>eye_alt</use></value>
821       </uniform>
822       <uniform>
823         <name>cloud_self_shading</name>
824         <type>float</type>
825         <value><use>cloud_self_shading</use></value>
826       </uniform>
827       <uniform>
828         <name>moonlight</name>
829         <type>float</type>
830         <value><use>moonlight</use></value>
831       </uniform>
832       <uniform>
833         <name>texture</name>
834         <type>sampler-2d</type>
835         <value type="int">0</value>
836       </uniform>
837       <uniform>
838         <name>colorMode</name>
839         <type>int</type>
840         <value>2</value>
841         <!-- AMBIENT_AND_DIFFUSE -->
842       </uniform>
843       <depth>
844         <function>lequal</function>
845         <write-mask type="bool">false</write-mask>
846       </depth>
847     </pass>
848   </technique>
849   <technique n="10">
850     <predicate>
851       <and>
852         <property>/sim/rendering/rembrandt/enabled</property>
853         <or>
854           <less-equal>
855             <value type="float">2.0</value>
856             <glversion/>
857           </less-equal>
858           <and>
859             <extension-supported>GL_ARB_shader_objects</extension-supported>
860             <extension-supported>GL_ARB_shading_language_100</extension-supported>
861             <extension-supported>GL_ARB_vertex_shader</extension-supported>
862             <extension-supported>GL_ARB_fragment_shader</extension-supported>
863           </and>
864         </or>
865       </and>
866     </predicate>
867     <pass>
868       <lighting>false</lighting>
869       <material>
870         <ambient><use>material/ambient</use></ambient>
871         <diffuse><use>material/diffuse</use></diffuse>
872         <specular><use>material/specular</use></specular>
873         <emissive><use>material/emissive</use></emissive>
874         <shininess><use>material/shininess</use></shininess>
875         <color-mode>ambient-and-diffuse</color-mode>
876       </material>
877       <blend>false</blend>
878       <alpha-test>true</alpha-test>
879       <shade-model>smooth</shade-model>
880       <cull-face>back</cull-face>
881       <render-bin>
882         <bin-number>1</bin-number>
883         <bin-name>RenderBin</bin-name>
884       </render-bin>
885       <texture-unit>
886         <unit>0</unit>
887         <image><use>texture[0]/image</use></image>
888         <filter><use>texture[0]/filter</use></filter>
889         <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
890         <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
891         <internal-format><use>texture[0]/internal-format</use></internal-format>
892         <environment>
893           <mode>modulate</mode>
894         </environment>
895       </texture-unit>
896       <program>
897         <vertex-shader>Shaders/deferred-gbuffer.vert</vertex-shader>
898         <fragment-shader>Shaders/deferred-gbuffer.frag</fragment-shader>
899         <fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
900         <fragment-shader>Shaders/gbuffer-encode.frag</fragment-shader>
901       </program>
902       <uniform>
903         <name>texture</name>
904         <type>sampler-2d</type>
905         <value type="int">0</value>
906       </uniform>
907       <!-- uniform>
908                         <name>materialID</name>
909                         <type>int</type>
910                         <value><use>material-id</use></value>
911                 </uniform -->
912     </pass>
913   </technique>
914   <technique n="11">
915     <predicate>
916       <and>
917                 <property>/sim/rendering/shaders/quality-level</property>
918         <property>/sim/rendering/shaders/generic</property>
919         <or>
920           <less-equal>
921             <value type="float">2.0</value>
922             <glversion/>
923           </less-equal>
924           <and>
925             <extension-supported>GL_ARB_shader_objects</extension-supported>
926             <extension-supported>GL_ARB_shading_language_100</extension-supported>
927             <extension-supported>GL_ARB_vertex_shader</extension-supported>
928             <extension-supported>GL_ARB_fragment_shader</extension-supported>
929           </and>
930         </or>
931       </and>
932     </predicate>
933     <pass>
934       <lighting>true</lighting>
935       <material>
936         <ambient><use>material/ambient</use></ambient>
937         <diffuse><use>material/diffuse</use></diffuse>
938         <specular><use>material/specular</use></specular>
939         <emissive><use>material/emissive</use></emissive>
940         <shininess><use>material/shininess</use></shininess>
941         <color-mode>ambient-and-diffuse</color-mode>
942       </material>
943       <alpha-test><use>transparent</use></alpha-test>
944       <shade-model>smooth</shade-model>
945       <cull-face>back</cull-face>
946       <render-bin>
947         <bin-number>-1</bin-number>
948         <bin-name>RenderBin</bin-name>
949       </render-bin>
950       <texture-unit>
951         <unit>0</unit>
952         <image><use>texture[0]/image</use></image>
953         <filter><use>texture[0]/filter</use></filter>
954         <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
955         <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
956         <internal-format><use>texture[0]/internal-format</use></internal-format>
957       </texture-unit>
958       <program>
959         <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader>
960         <vertex-shader n="1">Shaders/default.vert</vertex-shader>
961         <fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
962         <fragment-shader n="1">Shaders/terrain-nocolor.frag</fragment-shader>
963       </program>
964       <uniform>
965         <name>texture</name>
966         <type>sampler-2d</type>
967         <value type="int">0</value>
968       </uniform>
969       <color-mask type="vec4d">0 0 0 0</color-mask>
970     </pass>
971     <pass>
972       <lighting>true</lighting>
973       <material>
974         <ambient><use>material/ambient</use></ambient>
975         <diffuse><use>material/diffuse</use></diffuse>
976         <specular><use>material/specular</use></specular>
977         <emissive><use>material/emissive</use></emissive>
978         <shininess><use>material/shininess</use></shininess>
979         <color-mode>ambient-and-diffuse</color-mode>
980       </material>
981       <blend><use>transparent</use></blend>
982       <alpha-test><use>transparent</use></alpha-test>
983       <shade-model>smooth</shade-model>
984       <cull-face>back</cull-face>
985       <render-bin>
986         <bin-number><use>render-bin/bin-number</use></bin-number>
987         <bin-name><use>render-bin/bin-name</use></bin-name>
988       </render-bin>
989       <texture-unit>
990         <unit>0</unit>
991         <image><use>texture[0]/image</use></image>
992         <filter><use>texture[0]/filter</use></filter>
993         <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
994         <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
995         <internal-format><use>texture[0]/internal-format</use></internal-format>
996       </texture-unit>
997       <program>
998         <vertex-shader>Shaders/include_fog.vert</vertex-shader>
999         <vertex-shader>Shaders/default.vert</vertex-shader>
1000         <fragment-shader>Shaders/default.frag</fragment-shader>
1001         <fragment-shader>Shaders/include_fog.frag</fragment-shader>
1002       </program>
1003       <uniform>
1004         <name>visibility</name>
1005         <type>float</type>
1006         <value><use>visibility</use></value>
1007       </uniform>
1008       <uniform>
1009         <name>avisibility</name>
1010         <type>float</type>
1011         <value><use>avisibility</use></value>
1012       </uniform>
1013       <uniform>
1014         <name>hazeLayerAltitude</name>
1015         <type>float</type>
1016         <value><use>lthickness</use></value>
1017       </uniform>
1018       <uniform>
1019         <name>scattering</name>
1020         <type>float</type>
1021         <value><use>scattering</use></value>
1022       </uniform>
1023       <uniform>
1024         <name>terminator</name>
1025         <type>float</type>
1026         <value><use>terminator</use></value>
1027       </uniform>
1028       <uniform>
1029         <name>fogType</name>
1030         <type>int</type>
1031         <value><use>fogtype</use></value>
1032       </uniform>
1033       <uniform>
1034         <name>texture</name>
1035         <type>sampler-2d</type>
1036         <value type="int">0</value>
1037       </uniform>
1038       <uniform>
1039         <name>colorMode</name>
1040         <type>int</type>
1041         <value>2</value>
1042         <!-- AMBIENT_AND_DIFFUSE -->
1043       </uniform>
1044       <depth>
1045         <function>lequal</function>
1046         <write-mask type="bool">false</write-mask>
1047       </depth>
1048     </pass>
1049   </technique>
1050   <technique n="12">
1051     <pass>
1052       <lighting>true</lighting>
1053       <material>
1054         <ambient><use>material/ambient</use></ambient>
1055         <diffuse><use>material/diffuse</use></diffuse>
1056         <specular><use>material/specular</use></specular>
1057         <emissive><use>material/emissive</use></emissive>
1058         <shininess><use>material/shininess</use></shininess>
1059         <color-mode>ambient-and-diffuse</color-mode>
1060       </material>
1061       <blend><use>transparent</use></blend>
1062       <alpha-test><use>transparent</use></alpha-test>
1063       <shade-model>smooth</shade-model>
1064       <cull-face>back</cull-face>
1065       <render-bin>
1066         <bin-number><use>render-bin/bin-number</use></bin-number>
1067         <bin-name><use>render-bin/bin-name</use></bin-name>
1068       </render-bin>
1069       <texture-unit>
1070         <unit>0</unit>
1071         <image><use>texture[0]/image</use></image>
1072         <filter><use>texture[0]/filter</use></filter>
1073         <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
1074         <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
1075         <internal-format><use>texture[0]/internal-format</use></internal-format>
1076         <environment>
1077           <mode>modulate</mode>
1078         </environment>
1079       </texture-unit>
1080     </pass>
1081   </technique>
1082 </PropertyList>