Debian Codegraph @

Effects/surface-lights.eff

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <PropertyList>
3 <name>Effects/surface-lights</name>
4 <parameters>
5 <!-- min-size, max-size, size, attenuation, cull-face parameters filled in by C++ code -->
6 <texture n="0">
7 <type>light-sprite</type>
8 <wrap-s>clamp</wrap-s>
9 <wrap-t>clamp</wrap-t>
10 </texture>
11 <visibility><use>/environment/ground-visibility-m</use></visibility>
12 <avisibility><use>/environment/visibility-m</use></avisibility>
13 <lthickness><use>/environment/ground-haze-thickness-m</use></lthickness>
14 <eye_alt><use>/sim/rendering/eye-altitude-m</use></eye_alt>
15 <terminator><use>/environment/terminator-relative-position-m</use></terminator>
16 <use_night_vision><use>/sim/rendering/als-filters/use-night-vision</use></use_night_vision>
17 <use_IR_vision><use>/sim/rendering/als-filters/use-IR-vision</use></use_IR_vision>
18 </parameters>
19
20 <technique n="10">
21 <!-- ALS -->
22 <predicate>
23 <and>
24 <property>/sim/rendering/point-sprites</property>
25 <property>/sim/rendering/shaders/skydome</property>
26 <or>
27 <less-equal>
28 <value type="float">2.0</value>
29 <glversion/>
30 </less-equal>
31 <and>
32 <extension-supported>GL_ARB_point_sprite</extension-supported>
33 <extension-supported>GL_ARB_point_parameters</extension-supported>
34 <extension-supported>GL_ARB_shader_objects</extension-supported>
35 <extension-supported>GL_ARB_shading_language_100</extension-supported>
36 <extension-supported>GL_ARB_vertex_shader</extension-supported>
37 <extension-supported>GL_ARB_fragment_shader</extension-supported>
38 </and>
39 </or>
40 </and>
41 </predicate>
42 <pass>
43 <render-bin>
44 <bin-number>8</bin-number>
45 <bin-name>DepthSortedBin</bin-name>
46 </render-bin>
47 <lighting>false</lighting>
48 <blend>
49 <source>src-alpha</source>
50 <destination>one-minus-src-alpha</destination>
51 </blend>
52 <depth>
53 <write-mask>false</write-mask>
54 </depth>
55 <!--<alpha-test>
56 <comparison>gequal</comparison>
57 <reference type="float">0.03</reference>
58 </alpha-test>-->
59 <cull-face><use>cull-face</use></cull-face>
60 <polygon-mode>
61 <front>point</front>
62 <back>point</back>
63 </polygon-mode>
64 <point>
65 <min-size><use>min-size</use></min-size>
66 <max-size><use>max-size</use></max-size>
67 <size><use>size</use></size>
68 <attenuation><use>attenuation</use></attenuation>
69 </point>
70 <texture-unit>
71 <unit>0</unit>
72 <point-sprite>true</point-sprite>
73 <type><use>texture[0]/type</use></type>
74 <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
75 <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
76 </texture-unit>
77 <program>
78 <vertex-shader>Shaders/surface-light-ALS.vert</vertex-shader>
79 <fragment-shader>Shaders/surface-light-ALS.frag</fragment-shader>
80 <fragment-shader>Shaders/noise.frag</fragment-shader>
81 </program>
82 <uniform>
83 <name>size</name>
84 <type>float</type>
85 <value><use>size</use></value>
86 </uniform>
87 <uniform>
88 <name>visibility</name>
89 <type>float</type>
90 <value><use>visibility</use></value>
91 </uniform>
92 <uniform>
93 <name>avisibility</name>
94 <type>float</type>
95 <value><use>avisibility</use></value>
96 </uniform>
97 <uniform>
98 <name>hazeLayerAltitude</name>
99 <type>float</type>
100 <value><use>lthickness</use></value>
101 </uniform>
102 <uniform>
103 <name>eye_alt</name>
104 <type>float</type>
105 <value><use>eye_alt</use></value>
106 </uniform>
107 <uniform>
108 <name>max_size</name>
109 <type>float</type>
110 <value><use>max-size</use></value>
111 </uniform>
112 <uniform>
113 <name>is_directional</name>
114 <type>bool</type>
115 <value><use>light-directional</use></value>
116 </uniform>
117 <uniform>
118 <name>use_night_vision</name>
119 <type>bool</type>
120 <value><use>use_night_vision</use></value>
121 </uniform>
122 <uniform>
123 <name>use_IR_vision</name>
124 <type>bool</type>
125 <value><use>use_IR_vision</use></value>
126 </uniform>
127 <uniform>
128 <name>texture</name>
129 <type>sampler-2d</type>
130 <value type="int">0</value>
131 </uniform>
132 <uniform>
133 <name>terminator</name>
134 <type>float</type>
135 <value><use>terminator</use></value>
136 </uniform>
137 <vertex-program-point-size>true</vertex-program-point-size>
138 </pass>
139 </technique>
140
141
142
143
144 <technique n="17">
145 <!-- Combined technique -->
146 <predicate>
147 <and>
148 <property>/sim/rendering/point-sprites</property>
149 <or>
150 <less-equal>
151 <value type="float">2.0</value>
152 <glversion/>
153 </less-equal>
154 <and>
155 <extension-supported>GL_ARB_point_sprite</extension-supported>
156 <extension-supported>GL_ARB_point_parameters</extension-supported>
157 </and>
158 </or>
159 </and>
160 </predicate>
161 <pass>
162 <render-bin>
163 <bin-number>8</bin-number>
164 <bin-name>DepthSortedBin</bin-name>
165 </render-bin>
166 <lighting>false</lighting>
167 <depth>
168 <write-mask>false</write-mask>
169 </depth>
170 <blend>
171 <source>src-alpha</source>
172 <destination>one-minus-src-alpha</destination>
173 </blend>
174 <alpha-test>
175 <comparison>gequal</comparison>
176 <reference type="float">0.1</reference>
177 </alpha-test>
178 <cull-face>back</cull-face>
179 <polygon-mode>
180 <front>point</front>
181 </polygon-mode>
182 <point>
183 <min-size><use>min-size</use></min-size>
184 <max-size><use>max-size</use></max-size>
185 <size><use>size</use></size>
186 <attenuation><use>attenuation</use></attenuation>
187 </point>
188 <texture-unit>
189 <unit>0</unit>
190 <point-sprite>true</point-sprite>
191 <type><use>texture[0]/type</use></type>
192 <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
193 <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
194 </texture-unit>
195 </pass>
196 </technique>
197
198 <technique n="18">
199 <!-- Sprite technique -->
200 <predicate>
201 <and>
202 <property>/sim/rendering/point-sprites</property>
203 <or>
204 <less-equal>
205 <value type="float">2.0</value>
206 <glversion/>
207 </less-equal>
208 <extension-supported>GL_ARB_point_sprite</extension-supported>
209 </or>
210 </and>
211 </predicate>
212 <pass>
213 <render-bin>
214 <bin-number>8</bin-number>
215 <bin-name>DepthSortedBin</bin-name>
216 </render-bin>
217 <lighting>false</lighting>
218 <depth>
219 <write-mask>false</write-mask>
220 </depth>
221 <blend>
222 <source>src-alpha</source>
223 <destination>one-minus-src-alpha</destination>
224 </blend>
225 <cull-face><use>cull-face</use></cull-face>
226 <polygon-mode>
227 <front>point</front>
228 </polygon-mode>
229 <texture-unit>
230 <unit>0</unit>
231 <point-sprite>true</point-sprite>
232 <type><use>texture[0]/type</use></type>
233 <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
234 <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
235 </texture-unit>
236 </pass>
237 </technique>
238
239 <technique n="19">
240 <!-- Attenuation technique -->
241 <predicate>
242 <and>
243 <or>
244 <less-equal>
245 <value type="float">2.0</value>
246 <glversion/>
247 </less-equal>
248 <extension-supported>GL_ARB_point_parameters</extension-supported>
249 </or>
250 </and>
251 </predicate>
252 <pass>
253 <point>
254 <min-size><use>min-size</use></min-size>
255 <max-size><use>max-size</use></max-size>
256 <size><use>size</use></size>
257 <attenuation><use>attenuation</use></attenuation>
258 </point>
259 <render-bin>
260 <bin-number>8</bin-number>
261 <bin-name>DepthSortedBin</bin-name>
262 </render-bin>
263 <depth>
264 <write-mask>false</write-mask>
265 </depth>
266 <blend>
267 <source>src-alpha</source>
268 <destination>one-minus-src-alpha</destination>
269 </blend>
270 <lighting>false</lighting>
271 <cull-face><use>cull-face</use></cull-face>
272 <polygon-mode>
273 <front>point</front>
274 <back>point</back>
275 </polygon-mode>
276 </pass>
277 </technique>
278
279 <technique n="20">
280 <!-- Basic technique -->
281 <pass>
282 <render-bin>
283 <bin-number>8</bin-number>
284 <bin-name>DepthSortedBin</bin-name>
285 </render-bin>
286 <lighting>false</lighting>
287 <depth>
288 <write-mask>false</write-mask>
289 </depth>
290 <blend>
291 <source>src-alpha</source>
292 <destination>one-minus-src-alpha</destination>
293 </blend>
294 <cull-face><use>cull-face</use></cull-face>
295 <polygon-mode>
296 <front>point</front>
297 </polygon-mode>
298 </pass>
299 </technique>
300 </PropertyList>