glassout.eff 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <PropertyList>
  3. <name>Effects/glass</name>
  4. <inherits-from>Effects/model-transparent</inherits-from>
  5. <parameters>
  6. <reflection-enabled type="int">1</reflection-enabled>
  7. <reflect-map-enabled type="int">0</reflect-map-enabled>
  8. <reflection-dynamic type="int">1</reflection-dynamic>
  9. <rain-enabled>1</rain-enabled>
  10. <reflection-fresnel type="float">0.01</reflection-fresnel>
  11. <reflection-rainbow type="float">0.09</reflection-rainbow>
  12. <reflection-noise type="float">0.01</reflection-noise>
  13. <reflection-correction type="float">-0.75</reflection-correction>
  14. <ambient-correction type="float">0.01</ambient-correction>
  15. <!-- texture for reflections in the glass -->
  16. <texture n="3">
  17. <type>cubemap</type>
  18. <images>
  19. <positive-x>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_px.png</positive-x>
  20. <negative-x>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nx.png</negative-x>
  21. <positive-y>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_py.png</positive-y>
  22. <negative-y>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_ny.png</negative-y>
  23. <positive-z>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_pz.png</positive-z>
  24. <negative-z>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nz.png</negative-z>
  25. </images>
  26. </texture>
  27. <!-- placeholder lightmap texture for reflections in the glass -->
  28. <texture n="4">
  29. <type>cubemap</type>
  30. <images>
  31. <positive-x>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_px.png</positive-x>
  32. <negative-x>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nx.png</negative-x>
  33. <positive-y>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_py.png</positive-y>
  34. <negative-y>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_ny.png</negative-y>
  35. <positive-z>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_pz.png</positive-z>
  36. <negative-z>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nz.png</negative-z>
  37. </images>
  38. </texture>
  39. <glass-tint type="vec4d" n="0"> 1.0 1.0 1.0 1.0</glass-tint>
  40. <overlay-color type="vec3d" n="0"> 1.0 1.0 1.0</overlay-color>
  41. <splash-x><use>/environment/aircraft-effects/splash-vector-x</use></splash-x>
  42. <splash-y><use>/environment/aircraft-effects/splash-vector-y</use></splash-y>
  43. <splash-z><use>/environment/aircraft-effects/splash-vector-z</use></splash-z>
  44. <rnorm><use>/environment/rain-norm</use></rnorm>
  45. <gsnorm><use>/environment/aircraft-effects/ground-splash-norm</use></gsnorm>
  46. <frost-level><use>/environment/aircraft-effects/frost-level</use></frost-level>
  47. <surface-mapping-scheme type="int">0</surface-mapping-scheme>
  48. <fog-level><use>/environment/aircraft-effects/fog-level</use></fog-level>
  49. <use-wipers><use>/environment/aircraft-effects/use-wipers</use></use-wipers>
  50. <use-overlay><use>/environment/aircraft-effects/use-overlay</use></use-overlay>
  51. <overlay-alpha><use>/environment/aircraft-effects/overlay-alpha</use></overlay-alpha>
  52. <overlay-glare type="float">0.5</overlay-glare>
  53. <use-reflection type="int">0</use-reflection>
  54. <reflection-strength type="float">1.0</reflection-strength>
  55. <use-mask type="int">0</use-mask>
  56. <use-reflection-lightmap type="int">0</use-reflection-lightmap>
  57. <lightmap-multi type="int">0</lightmap-multi>
  58. <lightmap-factor type="float" n="0">1.0</lightmap-factor>
  59. <lightmap-color type="vec3d" n="0"> 1.0 1.0 1.0 </lightmap-color>
  60. <lightmap-factor type="float" n="1">1.0</lightmap-factor>
  61. <lightmap-color type="vec3d" n="1"> 1.0 1.0 1.0 </lightmap-color>
  62. <lightmap-factor type="float" n="2">1.0</lightmap-factor>
  63. <lightmap-color type="vec3d" n="2"> 1.0 1.0 1.0 </lightmap-color>
  64. <lightmap-factor type="float" n="3">1.0</lightmap-factor>
  65. <lightmap-color type="vec3d" n="3"> 1.0 1.0 1.0 </lightmap-color>
  66. <texture n="8">
  67. <image>Textures/PBR/dfg_lut.dds</image>
  68. <type>2d</type>
  69. <filter>linear</filter>
  70. <mag-filter>linear</mag-filter>
  71. <wrap-s>clamp-to-edge</wrap-s>
  72. <wrap-t>clamp-to-edge</wrap-t>
  73. <internal-format>normalized</internal-format>
  74. </texture>
  75. </parameters>
  76. <technique n="4">
  77. <predicate>
  78. <and>
  79. <property>/sim/rendering/shaders/skydome</property>
  80. <or>
  81. <less-equal>
  82. <value type="float">2.0</value>
  83. <glversion/>
  84. </less-equal>
  85. <and>
  86. <extension-supported>GL_ARB_shader_objects</extension-supported>
  87. <extension-supported>GL_ARB_shading_language_100</extension-supported>
  88. <extension-supported>GL_ARB_vertex_shader</extension-supported>
  89. <extension-supported>GL_ARB_fragment_shader</extension-supported>
  90. </and>
  91. </or>
  92. </and>
  93. </predicate>
  94. <pass>
  95. <lighting>true</lighting>
  96. <depth>
  97. <write-mask type="bool">false</write-mask>
  98. </depth>
  99. <material>
  100. <active><use>material/active</use></active>
  101. <ambient><use>material/ambient</use></ambient>
  102. <diffuse><use>material/diffuse</use></diffuse>
  103. <specular><use>material/specular</use></specular>
  104. <emissive><use>material/emissive</use></emissive>
  105. <shininess><use>material/shininess</use></shininess>
  106. <color-mode><use>material/color-mode</use></color-mode>
  107. </material>
  108. <blend>
  109. <active><use>blend/active</use></active>
  110. <source><use>blend/source</use></source>
  111. <destination><use>blend/destination</use></destination>
  112. </blend>
  113. <shade-model><use>shade-model</use></shade-model>
  114. <cull-face><use>cull-face</use></cull-face>
  115. <rendering-hint><use>rendering-hint</use></rendering-hint>
  116. <render-bin>
  117. <bin-number>111</bin-number>
  118. <bin-name>DepthSortedBin</bin-name>
  119. </render-bin>
  120. <texture-unit>
  121. <!-- The texture unit is always active because the shaders expect
  122. that. -->
  123. <unit>0</unit>
  124. <type><use>texture[0]/type</use></type>
  125. <image><use>texture[0]/image</use></image>
  126. <filter><use>texture[0]/filter</use></filter>
  127. <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
  128. <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
  129. <internal-format> <use>texture[0]/internal-format</use> </internal-format>
  130. </texture-unit>
  131. <texture-unit>
  132. <unit>1</unit>
  133. <type><use>texture[1]/type</use></type>
  134. <image><use>texture[1]/image</use></image>
  135. <filter><use>texture[1]/filter</use></filter>
  136. <wrap-s><use>texture[1]/wrap-s</use></wrap-s>
  137. <wrap-t><use>texture[1]/wrap-t</use></wrap-t>
  138. <internal-format><use>texture[1]/internal-format</use></internal-format>
  139. </texture-unit>
  140. <texture-unit>
  141. <unit>2</unit>
  142. <type><use>texture[2]/type</use></type>
  143. <image><use>texture[2]/image</use></image>
  144. <filter><use>texture[2]/filter</use></filter>
  145. <wrap-s><use>texture[2]/wrap-s</use></wrap-s>
  146. <wrap-t><use>texture[2]/wrap-t</use></wrap-t>
  147. <internal-format><use>texture[2]/internal-format</use></internal-format>
  148. </texture-unit>
  149. <texture-unit>
  150. <unit>3</unit>
  151. <type><use>texture[3]/type</use></type>
  152. <images><use>texture[3]/images</use></images>
  153. </texture-unit>
  154. <texture-unit>
  155. <unit>4</unit>
  156. <type><use>texture[4]/type</use></type>
  157. <images><use>texture[4]/images</use></images>
  158. </texture-unit>
  159. <vertex-program-two-side>
  160. <use>vertex-program-two-side</use>
  161. </vertex-program-two-side>
  162. <program>
  163. <vertex-shader>Shaders/glass-ALS.vert</vertex-shader>
  164. <fragment-shader>Shaders/glass-ALS.frag</fragment-shader>
  165. <fragment-shader>Shaders/noise.frag</fragment-shader>
  166. <fragment-shader>Shaders/filters-ALS.frag</fragment-shader>
  167. </program>
  168. <uniform>
  169. <name>tint</name>
  170. <type>float-vec4</type>
  171. <value><use>glass-tint</use></value>
  172. </uniform>
  173. <uniform>
  174. <name>overlay_color</name>
  175. <type>float-vec3</type>
  176. <value><use>overlay-color</use></value>
  177. </uniform>
  178. <uniform>
  179. <name>lightmap_r_factor</name>
  180. <type>float</type>
  181. <value><use>lightmap-factor[0]</use></value>
  182. </uniform>
  183. <uniform>
  184. <name>lightmap_r_color</name>
  185. <type>float-vec3</type>
  186. <value><use>lightmap-color[0]</use></value>
  187. </uniform>
  188. <uniform>
  189. <name>lightmap_g_factor</name>
  190. <type>float</type>
  191. <value><use>lightmap-factor[1]</use></value>
  192. </uniform>
  193. <uniform>
  194. <name>lightmap_g_color</name>
  195. <type>float-vec3</type>
  196. <value><use>lightmap-color[1]</use></value>
  197. </uniform>
  198. <uniform>
  199. <name>lightmap_b_factor</name>
  200. <type>float</type>
  201. <value><use>lightmap-factor[2]</use></value>
  202. </uniform>
  203. <uniform>
  204. <name>lightmap_b_color</name>
  205. <type>float-vec3</type>
  206. <value><use>lightmap-color[2]</use></value>
  207. </uniform>
  208. <uniform>
  209. <name>lightmap_a_factor</name>
  210. <type>float</type>
  211. <value><use>lightmap-factor[3]</use></value>
  212. </uniform>
  213. <uniform>
  214. <name>lightmap_a_color</name>
  215. <type>float-vec3</type>
  216. <value><use>lightmap-color[3]</use></value>
  217. </uniform>
  218. <uniform>
  219. <name>splash_x</name>
  220. <type>float</type>
  221. <value><use>splash-x</use></value>
  222. </uniform>
  223. <uniform>
  224. <name>splash_y</name>
  225. <type>float</type>
  226. <value><use>splash-y</use></value>
  227. </uniform>
  228. <uniform>
  229. <name>splash_z</name>
  230. <type>float</type>
  231. <value><use>splash-z</use></value>
  232. </uniform>
  233. <uniform>
  234. <name>rain_norm</name>
  235. <type>float</type>
  236. <value><use>rnorm</use></value>
  237. </uniform>
  238. <uniform>
  239. <name>ground_splash_norm</name>
  240. <type>float</type>
  241. <value><use>gsnorm</use></value>
  242. </uniform>
  243. <uniform>
  244. <name>frost_level</name>
  245. <type>float</type>
  246. <value><use>frost-level</use></value>
  247. </uniform>
  248. <uniform>
  249. <name>fog_level</name>
  250. <type>float</type>
  251. <value><use>fog-level</use></value>
  252. </uniform>
  253. <uniform>
  254. <name>scattering</name>
  255. <type>float</type>
  256. <value><use>scattering</use></value>
  257. </uniform>
  258. <uniform>
  259. <name>terminator</name>
  260. <type>float</type>
  261. <value><use>terminator</use></value>
  262. </uniform>
  263. <uniform>
  264. <name>ground_scattering</name>
  265. <type>float</type>
  266. <value><use>ground_scattering</use></value>
  267. </uniform>
  268. <uniform>
  269. <name>terminator</name>
  270. <type>float</type>
  271. <value><use>terminator</use></value>
  272. </uniform>
  273. <uniform>
  274. <name>overcast</name>
  275. <type>float</type>
  276. <value><use>overcast</use></value>
  277. </uniform>
  278. <uniform>
  279. <name>hazeLayerAltitude</name>
  280. <type>float</type>
  281. <value><use>lthickness</use></value>
  282. </uniform>
  283. <uniform>
  284. <name>eye_alt</name>
  285. <type>float</type>
  286. <value><use>eye_alt</use></value>
  287. </uniform>
  288. <uniform>
  289. <name>cloud_self_shading</name>
  290. <type>float</type>
  291. <value><use>cloud_self_shading</use></value>
  292. </uniform>
  293. <uniform>
  294. <name>moonlight</name>
  295. <type>float</type>
  296. <value><use>moonlight</use></value>
  297. </uniform>
  298. <uniform>
  299. <name>air_pollution</name>
  300. <type>float</type>
  301. <value><use>air_pollution</use></value>
  302. </uniform>
  303. <uniform>
  304. <name>reflection_strength</name>
  305. <type>float</type>
  306. <value><use>reflection-strength</use></value>
  307. </uniform>
  308. <uniform>
  309. <name>overlay_alpha</name>
  310. <type>float</type>
  311. <value><use>overlay-alpha</use></value>
  312. </uniform>
  313. <uniform>
  314. <name>overlay_glare</name>
  315. <type>float</type>
  316. <value><use>overlay-glare</use></value>
  317. </uniform>
  318. <!-- filtering -->
  319. <uniform>
  320. <name>gamma</name>
  321. <type>float</type>
  322. <value><use>gamma</use></value>
  323. </uniform>
  324. <uniform>
  325. <name>brightness</name>
  326. <type>float</type>
  327. <value><use>brightness</use></value>
  328. </uniform>
  329. <uniform>
  330. <name>use_filtering</name>
  331. <type>bool</type>
  332. <value><use>use_filtering</use></value>
  333. </uniform>
  334. <uniform>
  335. <name>use_night_vision</name>
  336. <type>bool</type>
  337. <value><use>use_night_vision</use></value>
  338. </uniform>
  339. <uniform>
  340. <name>use_IR_vision</name>
  341. <type>bool</type>
  342. <value><use>use_IR_vision</use></value>
  343. </uniform>
  344. <uniform>
  345. <name>delta_T</name>
  346. <type>float</type>
  347. <value><use>delta_T</use></value>
  348. </uniform>
  349. <uniform>
  350. <name>fact_grey</name>
  351. <type>float</type>
  352. <value><use>fact_grey</use></value>
  353. </uniform>
  354. <uniform>
  355. <name>fact_black</name>
  356. <type>float</type>
  357. <value><use>fact_black</use></value>
  358. </uniform>
  359. <uniform>
  360. <name>display_xsize</name>
  361. <type>int</type>
  362. <value><use>display_xsize</use></value>
  363. </uniform>
  364. <uniform>
  365. <name>display_ysize</name>
  366. <type>int</type>
  367. <value><use>display_ysize</use></value>
  368. </uniform>
  369. <uniform>
  370. <name>texture</name>
  371. <type>sampler-2d</type>
  372. <value type="int">0</value>
  373. </uniform>
  374. <uniform>
  375. <name>frost_texture</name>
  376. <type>sampler-2d</type>
  377. <value type="int">1</value>
  378. </uniform>
  379. <uniform>
  380. <name>func_texture</name>
  381. <type>sampler-2d</type>
  382. <value type="int">2</value>
  383. </uniform>
  384. <uniform>
  385. <name>cube_texture</name>
  386. <type>sampler-cube</type>
  387. <value type="int">3</value>
  388. </uniform>
  389. <uniform>
  390. <name>cube_light_texture</name>
  391. <type>sampler-cube</type>
  392. <value type="int">4</value>
  393. </uniform>
  394. <uniform>
  395. <name>use_reflection</name>
  396. <type>int</type>
  397. <value><use>use-reflection</use></value>
  398. </uniform>
  399. <uniform>
  400. <name>use_mask</name>
  401. <type>int</type>
  402. <value><use>use-mask</use></value>
  403. </uniform>
  404. <uniform>
  405. <name>use_wipers</name>
  406. <type>int</type>
  407. <value><use>use-wipers</use></value>
  408. </uniform>
  409. <uniform>
  410. <name>use_overlay</name>
  411. <type>int</type>
  412. <value><use>use-overlay</use></value>
  413. </uniform>
  414. <uniform>
  415. <name>use_reflection_lightmap</name>
  416. <type>int</type>
  417. <value><use>use-reflection-lightmap</use></value>
  418. </uniform>
  419. <uniform>
  420. <name>lightmap_multi</name>
  421. <type>int</type>
  422. <value><use>lightmap-multi</use></value>
  423. </uniform>
  424. <uniform>
  425. <name>adaptive_mapping</name>
  426. <type>int</type>
  427. <value><use>surface-mapping-scheme</use></value>
  428. </uniform>
  429. <uniform>
  430. <name>colorMode</name>
  431. <type>int</type>
  432. <value><use>material/color-mode-uniform</use></value>
  433. </uniform>
  434. </pass>
  435. </technique>
  436. </PropertyList>