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