Support for creating high altitude noctilucent clouds in Advanced Weather/ALS
[fg:toms-fgdata.git] / Effects / cloud-noctilucent.eff
1 <?xml version="1.0" encoding="utf-8"?>
2 <PropertyList>
3   <name>Effects/cloud-noctilucent</name>
4   <parameters>
5     <texture n ="0">
6     </texture>
7     <terminator><use>/environment/terminator-relative-position-m</use></terminator>
8     <altitude><use>/sim/rendering/eye-altitude-m</use></altitude>
9     <cloud_self_shading><use>/environment/cloud-self-shading</use></cloud_self_shading>
10     <moonlight><use>/environment/moonlight</use></moonlight>
11   </parameters>
12
13 <technique n="9">
14     <predicate>
15       <and>
16         <property>/sim/rendering/shaders/skydome</property>
17         <property>/sim/rendering/clouds3d-enable</property>
18         <less-equal>
19           <value type="float">1.0</value>
20           <shader-language/>
21         </less-equal>
22       </and>
23     </predicate>
24     <pass n="0">
25       <!-- This is apparently not used, so maybe we'll blow it way soon. -->
26       <lighting>true</lighting>
27       <material>
28         <ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
29         <diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
30         <color-mode>off</color-mode>
31       </material>
32       <alpha-test>
33         <comparison>greater</comparison>
34         <reference type="float">0.01</reference>
35       </alpha-test>
36       <shade-model>smooth</shade-model>
37       <blend>
38         <source>src-alpha</source>
39         <destination>one-minus-src-alpha</destination>
40       </blend>
41       <depth>
42         <write-mask>false</write-mask>
43       </depth>
44       <render-bin>
45         <bin-number>9</bin-number>
46         <bin-name>DepthSortedBin</bin-name>
47       </render-bin>
48       <texture-unit>
49         <unit>0</unit>
50         <type><use>texture[0]/type</use></type>
51         <image><use>texture[0]/image</use></image>
52         <filter><use>texture[0]/filter</use></filter>
53         <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
54         <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
55         <!--<wrap-s>clamp</wrap-s>
56         <wrap-t>clamp</wrap-t>-->
57       </texture-unit>
58       <program>
59         <vertex-shader>Shaders/cloud-noctilucent-lightfield.vert</vertex-shader>
60         <fragment-shader>Shaders/cloud-static-lightfield.frag</fragment-shader>
61       </program>
62       <uniform>
63         <name>baseTexture</name>
64         <type>sampler-2d</type>
65         <value type="int">0</value>
66       </uniform>
67       <uniform>
68         <name>terminator</name>
69         <type>float</type>
70         <value><use>terminator</use></value>
71       </uniform>
72       <uniform>
73         <name>altitude</name>
74         <type>float</type>
75         <value><use>altitude</use></value>
76       </uniform>
77       <uniform>
78         <name>cloud_self_shading</name>
79         <type>float</type>
80         <value><use>cloud_self_shading</use></value>
81       </uniform>
82       <uniform>
83         <name>moonlight</name>
84         <type>float</type>
85         <value><use>moonlight</use></value>
86       </uniform>
87       <vertex-program-two-side>true</vertex-program-two-side>
88     </pass>
89   </technique>
90   <technique n="10">
91     <predicate>
92       <and>
93         <property>/sim/rendering/clouds3d-enable</property>
94         <less-equal>
95           <value type="float">1.0</value>
96           <shader-language/>
97         </less-equal>
98       </and>
99     </predicate>
100     <pass n="0">
101       <!-- This is apparently not used, so maybe we'll blow it way soon. -->
102       <lighting>true</lighting>
103       <material>
104         <ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
105         <diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
106         <color-mode>off</color-mode>
107       </material>
108       <alpha-test>
109         <comparison>greater</comparison>
110         <reference type="float">0.01</reference>
111       </alpha-test>
112       <shade-model>smooth</shade-model>
113       <blend>
114         <source>src-alpha</source>
115         <destination>one-minus-src-alpha</destination>
116       </blend>
117       <depth>
118         <write-mask>false</write-mask>
119       </depth>
120       <render-bin>
121         <bin-number>9</bin-number>
122         <bin-name>DepthSortedBin</bin-name>
123       </render-bin>
124       <texture-unit>
125         <unit>0</unit>
126         <type><use>texture[0]/type</use></type>
127         <image><use>texture[0]/image</use></image>
128         <filter><use>texture[0]/filter</use></filter>
129         <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
130         <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
131         <!--<wrap-s>clamp</wrap-s>
132         <wrap-t>clamp</wrap-t>-->
133       </texture-unit>
134       <program>
135         <vertex-shader>Shaders/cloud-static.vert</vertex-shader>
136         <fragment-shader>Shaders/cloud-static.frag</fragment-shader>
137       </program>
138       <uniform>
139         <name>baseTexture</name>
140         <type>sampler-2d</type>
141         <value type="int">0</value>
142       </uniform>
143       <uniform>
144         <name>terminator</name>
145         <type>float</type>
146         <value><use>terminator</use></value>
147       </uniform>
148       <uniform>
149         <name>altitude</name>
150         <type>float</type>
151         <value><use>altitude</use></value>
152       </uniform>
153       <vertex-program-two-side>true</vertex-program-two-side>
154     </pass>
155   </technique>
156 </PropertyList>