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