Quality slider overwrites custom shader settings. All effects now listen to the new...
[fg:toms-fgdata.git] / Effects / lightmap.eff
1 <?xml version="1.0" encoding="utf-8"?>
2 <PropertyList>
3   <name>Effects/lightmap</name>
4   <parameters>
5     <texture n ="0">
6       <type>white</type>
7     </texture>
8     <vertex-program-two-side type="bool">false</vertex-program-two-side>
9     <material>
10       <color-mode-uniform>1</color-mode-uniform> <!-- DIFFUSE -->
11     </material>
12     <condition><use>/sim/rendering/shader/generic</use></condition>
13     <factor>1</factor>
14   </parameters>
15   <technique n="10">
16     <predicate>
17       <and>
18         <property>/sim/rendering/shaders/generic</property>
19         <or>
20           <less-equal>
21             <value type="float">2.0</value>
22             <glversion/>
23           </less-equal>
24           <and>
25             <extension-supported>GL_ARB_shader_objects</extension-supported>
26             <extension-supported>GL_ARB_shading_language_100</extension-supported>
27             <extension-supported>GL_ARB_vertex_shader</extension-supported>
28             <extension-supported>GL_ARB_fragment_shader</extension-supported>
29           </and>
30         </or>
31       </and>
32     </predicate>
33     <pass>
34       <lighting>true</lighting>
35       <material>
36         <active><use>material/active</use></active>
37         <ambient><use>material/ambient</use></ambient>
38         <diffuse><use>material/diffuse</use></diffuse>
39         <specular><use>material/specular</use></specular>
40         <emissive><use>material/emissive</use></emissive>
41         <shininess><use>material/shininess</use></shininess>
42         <color-mode><use>material/color-mode</use></color-mode>
43       </material>
44       <blend>
45         <active><use>blend/active</use></active>
46         <source><use>blend/source</use></source>
47         <destination><use>blend/destination</use></destination>
48       </blend>
49       <shade-model><use>shade-model</use></shade-model>
50       <cull-face><use>cull-face</use></cull-face>
51       <rendering-hint><use>rendering-hint</use></rendering-hint>
52       <texture-unit>
53         <!-- The texture unit is always active because the shaders expect
54              that. -->
55         <unit>0</unit>
56         <!-- If there is a texture, the type in the derived effect
57         will be "2d". -->
58         <type><use>texture[0]/type</use></type>
59         <image><use>texture[0]/image</use></image>
60         <filter><use>texture[0]/filter</use></filter>
61         <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
62         <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
63         <!--
64         <internal-format>
65           <use>texture[0]/internal-format</use>
66         </internal-format>
67         -->
68       </texture-unit>
69           <texture-unit>
70         <!-- The texture unit is always active because the shaders expect
71              that. -->
72         <unit>1</unit>
73         <!-- If there is a texture, the type in the derived effect
74         will be "2d". -->
75         <type><use>texture[1]/type</use></type>
76         <image><use>texture[1]/image</use></image>
77         <filter>linear-mipmap-linear</filter>
78                 <wrap-s>repeat</wrap-s>
79                 <wrap-t>repeat</wrap-t>
80       </texture-unit>
81       <vertex-program-two-side>
82         <use>vertex-program-two-side</use>
83       </vertex-program-two-side>
84       <program>
85         <vertex-shader>Shaders/lightmap.vert</vertex-shader>
86         <fragment-shader>Shaders/lightmap.frag</fragment-shader>
87       </program>
88       <uniform>
89         <name>texture</name>
90         <type>sampler-2d</type>
91         <value type="int">0</value>
92       </uniform>
93           <uniform>
94         <name>lightmap_texture</name>
95         <type>sampler-2d</type>
96         <value type="int">1</value>
97       </uniform>
98       <uniform>
99         <name>colorMode</name>
100         <type>int</type>
101         <value><use>material/color-mode-uniform</use></value>
102       </uniform>
103           <uniform>
104         <name>condition</name>
105         <type>float</type>
106         <value><use>condition</use></value>
107       </uniform>
108       <uniform>
109         <name>lightmap_factor</name>
110         <type>float</type>
111         <value><use>factor</use></value>
112       </uniform>
113     </pass>
114   </technique>
115   <technique n="11">
116     <pass>
117       <lighting>true</lighting>
118       <material>
119         <active><use>material/active</use></active>
120         <ambient><use>material/ambient</use></ambient>
121         <diffuse><use>material/diffuse</use></diffuse>
122         <specular><use>material/specular</use></specular>
123         <emissive><use>material/emissive</use></emissive>
124         <shininess><use>material/shininess</use></shininess>
125         <color-mode><use>material/color-mode</use></color-mode>
126       </material>
127       <blend>
128         <active><use>blend/active</use></active>
129         <source><use>blend/source</use></source>
130         <destination><use>blend/destination</use></destination>
131       </blend>
132       <shade-model><use>shade-model</use></shade-model>
133       <cull-face><use>cull-face</use></cull-face>
134       <rendering-hint><use>rendering-hint</use></rendering-hint>
135       <texture-unit>
136         <active><use>texture[0]/active</use></active>
137         <unit>0</unit>
138           <image><use>texture[0]/image</use></image>
139           <filter><use>texture[0]/filter</use></filter>
140           <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
141           <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
142           <!--
143           <internal-format>
144             <use>texture[0]/internal-format</use>
145           </internal-format>
146           -->
147         <environment>
148           <mode>modulate</mode>
149         </environment>
150       </texture-unit>
151       <!-- A two-sided lighting model is set by default near the root
152            of the scene graph. Perhaps that ought to be set in this
153            effect?
154         -->
155     </pass>
156   </technique>
157 </PropertyList>