Effects file for surface lights
[fg:toms-fgdata.git] / Effects / surface-lights.eff
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         </parameters>
12
13         <technique n="17">
14     <!-- Combined technique -->
15     <predicate>
16       <and>
17         <property>/sim/rendering/point-sprites</property>
18         <or>
19           <less-equal>
20             <value type="float">2.0</value>
21             <glversion/>
22           </less-equal>
23           <and>
24             <extension-supported>GL_ARB_point_sprite</extension-supported>
25             <extension-supported>GL_ARB_point_parameters</extension-supported>
26           </and>
27         </or>
28       </and>
29     </predicate>
30                 <pass>
31                         <render-bin>
32                                 <bin-number>8</bin-number>
33                                 <bin-name>DepthSortedBin</bin-name>
34                         </render-bin>
35                         <lighting>false</lighting>
36                         <blend>
37                                 <source>src-alpha</source>
38                                 <destination>one-minus-src-alpha</destination>
39                         </blend>
40                         <alpha-test>
41                                 <comparison>gequal</comparison>
42                                 <reference type="float">0.1</reference>
43                         </alpha-test>
44                         <cull-face><use>directional</use></cull-face>
45                         <polygon-mode>
46         <front>point</front>
47         <back>point</back>
48       </polygon-mode>
49       <point>
50         <min-size><use>min-size</use></min-size>
51         <max-size><use>max-size</use></max-size>
52         <size><use>size</use></size>
53         <attenuation><use>attenuation</use></attenuation>
54       </point>
55       <texture-unit>
56         <unit>0</unit>
57         <point-sprite>true</point-sprite>
58         <type><use>texture[0]/type</use></type>
59         <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
60         <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
61       </texture-unit>
62                 </pass>
63   </technique>
64
65
66         <technique n="18">
67     <!-- Sprite technique -->
68     <predicate>
69       <and>
70         <property>/sim/rendering/point-sprites</property>
71         <or>
72           <less-equal>
73             <value type="float">2.0</value>
74             <glversion/>
75           </less-equal>
76           <extension-supported>GL_ARB_point_sprite</extension-supported>
77         </or>
78       </and>
79     </predicate>
80                 <pass>
81                         <render-bin>
82                                 <bin-number>8</bin-number>
83                                 <bin-name>DepthSortedBin</bin-name>
84                         </render-bin>
85                         <lighting>false</lighting>
86                         <blend>
87                                 <source>src-alpha</source>
88                                 <destination>one-minus-src-alpha</destination>
89                         </blend>
90                         <cull-face><use>directional</use></cull-face>
91                         <polygon-mode>
92         <front>point</front>
93         <back>point</back>
94       </polygon-mode>
95       <texture-unit>
96         <unit>0</unit>
97         <point-sprite>true</point-sprite>
98         <type><use>texture[0]/type</use></type>
99         <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
100         <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
101       </texture-unit>
102                 </pass>
103   </technique>
104
105         <technique n="19">
106     <!-- Attenuation technique -->
107     <predicate>
108       <and>
109         <or>
110           <less-equal>
111             <value type="float">2.0</value>
112             <glversion/>
113           </less-equal>
114           <extension-supported>GL_ARB_point_parameters</extension-supported>
115         </or>
116       </and>
117     </predicate>
118                 <pass>
119       <point>
120         <min-size><use>min-size</use></min-size>
121         <max-size><use>max-size</use></max-size>
122         <size><use>size</use></size>
123         <attenuation><use>attenuation</use></attenuation>
124       </point>
125                         <render-bin>
126                                 <bin-number>8</bin-number>
127                                 <bin-name>DepthSortedBin</bin-name>
128                         </render-bin>
129                         <blend>
130                                 <source>src-alpha</source>
131                                 <destination>one-minus-src-alpha</destination>
132                         </blend>
133                         <lighting>false</lighting>
134                         <cull-face><use>directional</use></cull-face>
135                         <polygon-mode>
136         <front>point</front>
137         <back>point</back>
138       </polygon-mode>
139                 </pass>
140         </technique>
141
142         <technique n="20">
143     <!-- Basic technique -->
144                 <pass>
145                         <render-bin>
146                                 <bin-number>8</bin-number>
147                                 <bin-name>DepthSortedBin</bin-name>
148                         </render-bin>
149                         <lighting>false</lighting>
150                         <blend>
151                                 <source>src-alpha</source>
152                                 <destination>one-minus-src-alpha</destination>
153                         </blend>
154                         <cull-face><use>directional</use></cull-face>
155                         <polygon-mode>
156         <front>point</front>
157         <back>point</back>
158       </polygon-mode>
159                 </pass>
160         </technique>
161 </PropertyList>