Quality slider overwrites custom shader settings. All effects now listen to the new...
[fg:toms-fgdata.git] / Effects / flutter.eff
1 <?xml version="1.0" encoding="utf-8"?>
2 <PropertyList>
3         <name>Effects/flutter</name>
4         <inherits-from>Effects/model-default</inherits-from>
5         <parameters>
6                 <vertex-program-two-side type="bool">true</vertex-program-two-side>
7                 <material>
8                         <color-mode-uniform>1</color-mode-uniform>
9                         <!-- DIFFUSE -->
10                 </material>
11                 <shade-model>smooth</shade-model>
12                 <wind-speed>
13                         <!--<use>/environment/Vinson/rel-wind-speed-kts</use>-->
14                         <use>/environment/config/boundary/entry[0]/wind-speed-kt</use>
15                 </wind-speed>
16                 <offset>0.0</offset>
17                 <amplitude-factor>0.08</amplitude-factor>
18                 <windE>
19                         <use>/environment/sea/surface/wind-from-east-fps</use>
20                 </windE>
21                 <windN>
22                         <use>/environment/sea/surface/wind-from-north-fps</use>
23                 </windN>
24                 <speed-kt>0.0</speed-kt>
25                 <heading-deg>0.0</heading-deg>
26
27                 <!--  fog include -->
28                 <visibility>
29                         <use>/environment/ground-visibility-m</use>
30                 </visibility>
31                 <avisibility>
32                         <use>/environment/visibility-m</use>
33                 </avisibility>
34                 <lthickness>
35                         <use>/environment/ground-haze-thickness-m</use>
36                 </lthickness>
37                 <scattering>
38                         <use>/rendering/scene/scattering</use>
39                 </scattering>
40                 <terminator>
41                         <use>/environment/terminator-relative-position-m</use>
42                 </terminator>
43                 <fogtype>
44                         <use>/sim/rendering/shaders/skydome</use>
45                 </fogtype>
46                 <!--    END fog include -->
47
48         </parameters>
49         <technique n="9">
50                 <predicate>
51                         <and>
52                                 <property>/sim/rendering/shaders/generic</property>
53                                 <or>
54                                         <less-equal>
55                                                 <value type="float">2.0</value>
56                                                 <glversion/>
57                                         </less-equal>
58                                         <and>
59                                                 <extension-supported>GL_ARB_shader_objects</extension-supported>
60                                                 <extension-supported>GL_ARB_shading_language_100</extension-supported>
61                                                 <extension-supported>GL_ARB_vertex_shader</extension-supported>
62                                                 <extension-supported>GL_ARB_fragment_shader</extension-supported>
63                                         </and>
64                                 </or>
65                         </and>
66                 </predicate>
67                 <pass>
68                         <lighting>true</lighting>
69                         <material>
70                                 <active>
71                                         <use>material/active</use>
72                                 </active>
73                                 <ambient>
74                                         <use>material/ambient</use>
75                                 </ambient>
76                                 <diffuse>
77                                         <use>material/diffuse</use>
78                                 </diffuse>
79                                 <specular>
80                                         <use>material/specular</use>
81                                 </specular>
82                                 <emissive>
83                                         <use>material/emissive</use>
84                                 </emissive>
85                                 <shininess>
86                                         <use>material/shininess</use>
87                                 </shininess>
88                                 <color-mode>
89                                         <use>material/color-mode</use>
90                                 </color-mode>
91                         </material>
92                         <blend>
93                                 <active>
94                                         <use>blend/active</use>
95                                 </active>
96                                 <source>
97                                         <use>blend/source</use>
98                                 </source>
99                                 <destination>
100                                         <use>blend/destination</use>
101                                 </destination>
102                         </blend>
103                         <shade-model>
104                                 <use>shade-model</use>
105                         </shade-model>
106                         <cull-face>
107                                 <use>cull-face</use>
108                         </cull-face>
109                         <rendering-hint>
110                                 <use>rendering-hint</use>
111                         </rendering-hint>
112                         <texture-unit>
113                                 <!-- The texture unit is always active because the shaders expect
114              that. -->
115                                 <unit>0</unit>
116                                 <!-- If there is a texture, the type in the derived effect
117         will be "2d". -->
118                                 <type>
119                                         <use>texture[0]/type</use>
120                                 </type>
121                                 <image>
122                                         <use>texture[0]/image</use>
123                                 </image>
124                                 <filter>
125                                         <use>texture[0]/filter</use>
126                                 </filter>
127                                 <wrap-s>
128                                         <use>texture[0]/wrap-s</use>
129                                 </wrap-s>
130                                 <wrap-t>
131                                         <use>texture[0]/wrap-t</use>
132                                 </wrap-t>
133                                 <!--
134         <internal-format>
135           <use>texture[0]/internal-format</use>
136         </internal-format>
137         -->
138                         </texture-unit>
139                         <texture-unit>
140                                 <unit>9</unit>
141                                 <type>noise</type>
142                         </texture-unit>
143                         <vertex-program-two-side>
144                                 <use>vertex-program-two-side</use>
145                         </vertex-program-two-side>
146                         <program>
147                                 <vertex-shader>Shaders/include_fog.vert</vertex-shader>
148                                 <vertex-shader>Shaders/flutter.vert</vertex-shader>
149                                 <fragment-shader>Shaders/include_fog.frag</fragment-shader>
150                                 <fragment-shader>Shaders/default.frag</fragment-shader>
151                         </program>
152                         <!--<uniform>
153                                 <name>texture</name>
154                                 <type>sampler-2d</type>
155                                 <value type="int">0</value>
156                         </uniform>-->
157                         <uniform>
158                                 <name>colorMode</name>
159                                 <type>int</type>
160                                 <value>
161                                         <use>material/color-mode-uniform</use>
162                                 </value>
163                         </uniform>
164                         <uniform>
165                                 <name>WindSpeed</name>
166                                 <type>float</type>
167                                 <value>
168                                         <use>wind-speed</use>
169                                 </value>
170                         </uniform>
171                         <uniform>
172                                 <name>Offset</name>
173                                 <type>float</type>
174                                 <value>
175                                         <use>offset</use>
176                                 </value>
177                         </uniform>
178                         <uniform>
179                                 <name>AmpFactor</name>
180                                 <type>float</type>
181                                 <value>
182                                         <use>amplitude-factor</use>
183                                 </value>
184                         </uniform>
185                         <uniform>
186                                 <name>Noise</name>
187                                 <type>sampler-3d</type>
188                                 <value type="int">9</value>
189                         </uniform>
190                         <uniform>
191                                 <name>WindE</name>
192                                 <type>float</type>
193                                 <value>
194                                         <use>windE</use>
195                                 </value>
196                         </uniform>
197                         <uniform>
198                                 <name>WindN</name>
199                                 <type>float</type>
200                                 <value>
201                                         <use>windN</use>
202                                 </value>
203                         </uniform>
204                         <uniform>
205                                 <name>spd</name>
206                                 <type>float</type>
207                                 <value>
208                                         <use>speed-kt</use>
209                                 </value>
210                         </uniform>
211                         <uniform>
212                                 <name>hdg</name>
213                                 <type>float</type>
214                                 <value>
215                                         <use>heading-deg</use>
216                                 </value>
217                         </uniform>
218                         
219                         <!--        BEGIN fog include -->
220                         <uniform>
221                                 <name>visibility</name>
222                                 <type>float</type>
223                                 <value>
224                                         <use>visibility</use>
225                                 </value>
226                         </uniform>
227                         <uniform>
228                                 <name>avisibility</name>
229                                 <type>float</type>
230                                 <value>
231                                         <use>avisibility</use>
232                                 </value>
233                         </uniform>
234                         <uniform>
235                                 <name>hazeLayerAltitude</name>
236                                 <type>float</type>
237                                 <value>
238                                         <use>lthickness</use>
239                                 </value>
240                         </uniform>
241                         <uniform>
242                                 <name>scattering</name>
243                                 <type>float</type>
244                                 <value>
245                                         <use>scattering</use>
246                                 </value>
247                         </uniform>
248                         <uniform>
249                                 <name>terminator</name>
250                                 <type>float</type>
251                                 <value>
252                                         <use>terminator</use>
253                                 </value>
254                         </uniform>
255                         <uniform>
256                                 <name>fogType</name>
257                                 <type>int</type>
258                                 <value>
259                                         <use>fogtype</use>
260                                 </value>
261                         </uniform>
262                         <!--                    END fog include -->
263                 </pass>
264         </technique>
265
266 </PropertyList>