Merge branch 'master' of git://gitorious.org/fg/fgdata
This commit is contained in:
commit
9436399968
13 changed files with 809 additions and 15 deletions
|
@ -34,6 +34,13 @@
|
|||
<depth-factor type="float">0.04</depth-factor>
|
||||
<canopy-height type="float">15.0</canopy-height>
|
||||
<quality-level><use>/sim/rendering/quality-level</use></quality-level>
|
||||
|
||||
<!-- sets the season color -->
|
||||
<season-red type="float">0.12</season-red>
|
||||
<season-green type="float">0.86</season-green>
|
||||
<season-blue type="float">0.22</season-blue>
|
||||
<!-- end season color -->
|
||||
|
||||
</parameters>
|
||||
<generate>
|
||||
<tangent type="int">6</tangent>
|
||||
|
@ -173,6 +180,26 @@
|
|||
<type>float</type>
|
||||
<value><use>quality-level</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>red</name>
|
||||
<type>float</type>
|
||||
<value><use>season-red</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>green</name>
|
||||
<type>float</type>
|
||||
<value><use>season-green</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>blue</name>
|
||||
<type>float</type>
|
||||
<value><use>season-blue</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>alpha</name>
|
||||
<type>float</type>
|
||||
<value>0.0</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
||||
|
|
|
@ -34,6 +34,13 @@
|
|||
<depth-factor type="float">0.01</depth-factor>
|
||||
<canopy-height type="float">15.0</canopy-height>
|
||||
<quality-level><use>/sim/rendering/quality-level</use></quality-level>
|
||||
|
||||
<!-- sets the season color -->
|
||||
<season-red type="float">0.12</season-red>
|
||||
<season-green type="float">0.86</season-green>
|
||||
<season-blue type="float">0.22</season-blue>
|
||||
<!-- end season color -->
|
||||
|
||||
</parameters>
|
||||
<generate>
|
||||
<tangent type="int">6</tangent>
|
||||
|
@ -173,6 +180,26 @@
|
|||
<type>float</type>
|
||||
<value><use>quality-level</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>red</name>
|
||||
<type>float</type>
|
||||
<value><use>season-red</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>green</name>
|
||||
<type>float</type>
|
||||
<value><use>season-green</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>blue</name>
|
||||
<type>float</type>
|
||||
<value><use>season-blue</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>alpha</name>
|
||||
<type>float</type>
|
||||
<value>0.0</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<texture n="3">
|
||||
<image>Textures/Terrain/herbtundra-colors.png</image>
|
||||
<image>Textures/Terrain/forest-colors.png</image>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>mirror</wrap-s>
|
||||
<internal-format>normalized</internal-format>
|
||||
|
@ -33,6 +33,13 @@
|
|||
<snow-level><use>/sim/rendering/snow-level-m</use></snow-level>
|
||||
<depth-factor type="float">0.01</depth-factor>
|
||||
<canopy-height type="float">15.0</canopy-height>
|
||||
|
||||
<!-- sets the season color -->
|
||||
<season-red type="float">0.12</season-red>
|
||||
<season-green type="float">0.86</season-green>
|
||||
<season-blue type="float">0.22</season-blue>
|
||||
<!-- end season color -->
|
||||
|
||||
<quality-level><use>/sim/rendering/quality-level</use></quality-level>
|
||||
</parameters>
|
||||
<generate>
|
||||
|
@ -173,6 +180,26 @@
|
|||
<type>float</type>
|
||||
<value><use>quality-level</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>red</name>
|
||||
<type>float</type>
|
||||
<value><use>season-red</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>green</name>
|
||||
<type>float</type>
|
||||
<value><use>season-green</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>blue</name>
|
||||
<type>float</type>
|
||||
<value><use>season-blue</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>alpha</name>
|
||||
<type>float</type>
|
||||
<value>0.0</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
||||
|
|
41
Environment/clouds-altitude-interpolate.xml
Normal file
41
Environment/clouds-altitude-interpolate.xml
Normal file
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" ?>
|
||||
<!--
|
||||
This file is part of FlightGear, the free flight simulator
|
||||
http://www.flightgear.org/
|
||||
|
||||
Copyright (C) 2009 Torsten Dreyer, Torsten (at) t3r _dot_ de
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
-->
|
||||
<PropertyList>
|
||||
<params>
|
||||
<from>environment/metar/clouds/layer[0]/elevation-ft</from>
|
||||
<to>/environment/clouds/layer[0]/elevation-ft</to>
|
||||
</params>
|
||||
<name>MetarController:clouds:altitude_interpolate</name>
|
||||
<type>noise-spike</type>
|
||||
<max-rate-of-change>8.333</max-rate-of-change>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/metar/valid</property>
|
||||
<greater-than>
|
||||
<property alias="../../../../params/from"/>
|
||||
<value>-9000</value>
|
||||
</greater-than>
|
||||
<greater-than>
|
||||
<property alias="../../../../params/to"/>
|
||||
<value>-9000</value>
|
||||
</greater-than>
|
||||
</condition>
|
||||
</enable>
|
||||
<input alias="../params/from"/>
|
||||
<output alias="../params/to"/>
|
||||
</PropertyList>
|
43
Environment/clouds-altitude-set.xml
Normal file
43
Environment/clouds-altitude-set.xml
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" ?>
|
||||
<!--
|
||||
This file is part of FlightGear, the free flight simulator
|
||||
http://www.flightgear.org/
|
||||
|
||||
Copyright (C) 2009 Torsten Dreyer, Torsten (at) t3r _dot_ de
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
-->
|
||||
<PropertyList>
|
||||
<params>
|
||||
<from>environment/metar/clouds/layer[0]/elevation-ft</from>
|
||||
<to>/environment/clouds/layer[0]/elevation-ft</to>
|
||||
</params>
|
||||
<name>MetarController:clouds:altitude_set</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/metar/valid</property>
|
||||
<or>
|
||||
<less-than>
|
||||
<property alias="../../../../../params/from"/>
|
||||
<value>-9000</value>
|
||||
</less-than>
|
||||
<less-than>
|
||||
<property alias="../../../../../params/to"/>
|
||||
<value>-9000</value>
|
||||
</less-than>
|
||||
</or>
|
||||
</condition>
|
||||
</enable>
|
||||
<input alias="../params/from"/>
|
||||
<output alias="../params/to"/>
|
||||
</PropertyList>
|
37
Environment/clouds-coverage.xml
Normal file
37
Environment/clouds-coverage.xml
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" ?>
|
||||
<!--
|
||||
This file is part of FlightGear, the free flight simulator
|
||||
http://www.flightgear.org/
|
||||
|
||||
Copyright (C) 2009 Torsten Dreyer, Torsten (at) t3r _dot_ de
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
-->
|
||||
<PropertyList>
|
||||
<params>
|
||||
<from>/environment/metar/clouds/layer[0]/coverage-type</from>
|
||||
<to>environment/clouds/layer[0]/coverage-type</to>
|
||||
</params>
|
||||
<name>MetarController:clouds:coverage</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/metar/valid</property>
|
||||
<not-equals>
|
||||
<property alias="../../../../params/from"/>
|
||||
<property alias="../../../../params/to"/>
|
||||
</not-equals>
|
||||
</condition>
|
||||
</enable>
|
||||
<input alias="../params/from"/>
|
||||
<output alias="../params/to"/>
|
||||
</PropertyList>
|
29
Environment/clouds-thickness.xml
Normal file
29
Environment/clouds-thickness.xml
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" ?>
|
||||
<!--
|
||||
This file is part of FlightGear, the free flight simulator
|
||||
http://www.flightgear.org/
|
||||
|
||||
Copyright (C) 2009 Torsten Dreyer, Torsten (at) t3r _dot_ de
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
-->
|
||||
<PropertyList>
|
||||
<name>MetarController:clouds:thickness</name>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/metar/valid</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/environment/metar/clouds/layer[0]/thickness-ft</input>
|
||||
<output>/environment/clouds/layer[0]/thickness-ft</output>
|
||||
<type>noise-spike</type>
|
||||
<max-rate-of-change>8.3333</max-rate-of-change>
|
||||
</PropertyList>
|
|
@ -43,7 +43,7 @@
|
|||
</scenario>
|
||||
<scenario>
|
||||
<name>Stormy Monday</name>
|
||||
<metar>XXXX 012345Z 28035G50KT 9999 TSRA SCT022CB BKN030 13/09 Q1005</metar>
|
||||
<metar>XXXX 012345Z 28035G50KT 250V300 9999 TSRA SCT022CB BKN030 13/09 Q1005</metar>
|
||||
<description>You're out for an adventure? Gusty winds blowing from the west
|
||||
and isolated thunderstorms should be avoided. Fasten your seatbelt!</description>
|
||||
</scenario>
|
||||
|
@ -169,31 +169,33 @@
|
|||
</config>
|
||||
|
||||
<clouds>
|
||||
<status>true</status>
|
||||
<layer n="0">
|
||||
<coverage>clear</coverage>
|
||||
<elevation-ft>4000</elevation-ft>
|
||||
<elevation-ft>-9999</elevation-ft>
|
||||
<thickness-ft>600</thickness-ft>
|
||||
<transition-ft>150</transition-ft>
|
||||
<span-m>40000</span-m>
|
||||
</layer>
|
||||
<layer n="1">
|
||||
<coverage>clear</coverage>
|
||||
<elevation-ft>19500</elevation-ft>
|
||||
<elevation-ft>-9999</elevation-ft>
|
||||
<thickness-ft>65</thickness-ft>
|
||||
<transition-ft>25</transition-ft>
|
||||
<span-m>40000</span-m>
|
||||
</layer>
|
||||
<layer n="2">
|
||||
<coverage>clear</coverage>
|
||||
<elevation-ft>-9999</elevation-ft>
|
||||
<span-m>40000</span-m>
|
||||
</layer>
|
||||
<layer n="3">
|
||||
<coverage>clear</coverage>
|
||||
<elevation-ft>-9999</elevation-ft>
|
||||
<span-m>40000</span-m>
|
||||
</layer>
|
||||
<layer n="5">
|
||||
<layer n="4">
|
||||
<coverage>clear</coverage>
|
||||
<elevation-ft>-9999</elevation-ft>
|
||||
<span-m>40000</span-m>
|
||||
</layer>
|
||||
</clouds>
|
||||
|
|
111
Environment/interpolator.xml
Normal file
111
Environment/interpolator.xml
Normal file
|
@ -0,0 +1,111 @@
|
|||
<?xml version="1.0" ?>
|
||||
<!--
|
||||
This file is part of FlightGear, the free flight simulator
|
||||
http://www.flightgear.org/
|
||||
|
||||
Copyright (C) 2009 Torsten Dreyer, Torsten (at) t3r _dot_ de
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
-->
|
||||
<!--
|
||||
Interpolate the values of /environment/interpolated/* over time
|
||||
and write the results to /environment/*, the environment of our
|
||||
aircraft
|
||||
All filters are enabled on /environment/config/enabled=true
|
||||
-->
|
||||
<PropertyList>
|
||||
|
||||
<filter>
|
||||
<name>EnvironmentInterpolator:temperature-sea-level-degc</name>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/config/enabled</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/environment/config/interpolated/temperature-sea-level-degc</input>
|
||||
<output>/environment/temperature-sea-level-degc</output>
|
||||
<type>noise-spike</type>
|
||||
<max-rate-of-change>0.1667</max-rate-of-change>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>EnvironmentInterpolator:dewpoint-sea-level-degc</name>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/config/enabled</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/environment/config/interpolated/dewpoint-sea-level-degc</input>
|
||||
<output>/environment/dewpoint-sea-level-degc</output>
|
||||
<type>noise-spike</type>
|
||||
<max-rate-of-change>0.1667</max-rate-of-change>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<!--
|
||||
transfer the interpolated QNH to the global environment
|
||||
limit the rate of change to approx 1hpa/sec
|
||||
-->
|
||||
<name>EnvironmentInterpolator:pressure-sea-level-inhg</name>
|
||||
<type>noise-spike</type>
|
||||
<max-rate-of-change>0.03</max-rate-of-change>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/config/enabled</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/environment/config/interpolated/pressure-sea-level-inhg</input>
|
||||
<output>/environment/pressure-sea-level-inhg</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>EnvironmentInterpolator:visibility-m</name>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/config/enabled</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/environment/config/interpolated/visibility-m</input>
|
||||
<output>/environment/visibility-m</output>
|
||||
<type>exponential</type>
|
||||
<filter-time>10</filter-time>
|
||||
</filter>
|
||||
|
||||
<!--
|
||||
filter the wind vector by filtering the cartesian representation
|
||||
-->
|
||||
<filter>
|
||||
<name>EnvironmentInterpolator:wind-from-north</name>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/config/enabled</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/environment/config/interpolated/wind-from-north-fps</input>
|
||||
<output>/environment/wind-from-north-fps</output>
|
||||
<type>exponential</type>
|
||||
<filter-time>5</filter-time>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>EnvironmentInterpolator:wind-from-east</name>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/config/enabled</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/environment/config/interpolated/wind-from-east-fps</input>
|
||||
<output>/environment/wind-from-east-fps</output>
|
||||
<type>exponential</type>
|
||||
<filter-time>5</filter-time>
|
||||
</filter>
|
||||
|
||||
</PropertyList>
|
36
Environment/layer-heading-offset.xml
Normal file
36
Environment/layer-heading-offset.xml
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" ?>
|
||||
<!--
|
||||
This file is part of FlightGear, the free flight simulator
|
||||
http://www.flightgear.org/
|
||||
|
||||
Copyright (C) 2009 Torsten Dreyer, Torsten (at) t3r _dot_ de
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
-->
|
||||
<PropertyList>
|
||||
<name>MetarController:layer:wind-from-heading-deg</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/metar/valid</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>
|
||||
<property>/environment/config/boundary/entry[0]/wind-from-heading-deg</property>
|
||||
<offset>/environment/config/boundary/entry[1]/wind-heading-change-deg</offset>
|
||||
</input>
|
||||
<output>/environment/config/boundary/entry[1]/wind-from-heading-deg</output>
|
||||
<period>
|
||||
<min>0</min>
|
||||
<max>360</max>
|
||||
</period>
|
||||
</PropertyList>
|
39
Environment/layer-speed-change.xml
Normal file
39
Environment/layer-speed-change.xml
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" ?>
|
||||
<!--
|
||||
This file is part of FlightGear, the free flight simulator
|
||||
http://www.flightgear.org/
|
||||
|
||||
Copyright (C) 2009 Torsten Dreyer, Torsten (at) t3r _dot_ de
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
-->
|
||||
<PropertyList>
|
||||
<name>MetarController:layer:wind-speed-kt</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/metar/valid</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>
|
||||
<expression>
|
||||
<product>
|
||||
<property>/environment/config/boundary/entry[0]/wind-speed-kt</property>
|
||||
<sum>
|
||||
<property>/environment/config/boundary/entry[1]/wind-speed-change-rel</property>
|
||||
<value>1.0</value>
|
||||
</sum>
|
||||
</product>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/environment/config/boundary/entry[1]/wind-speed-kt</output>
|
||||
</PropertyList>
|
375
Environment/metarinterpolator.xml
Normal file
375
Environment/metarinterpolator.xml
Normal file
|
@ -0,0 +1,375 @@
|
|||
<?xml version="1.0" ?>
|
||||
<!--
|
||||
This file is part of FlightGear, the free flight simulator
|
||||
http://www.flightgear.org/
|
||||
|
||||
Copyright (C) 2009 Torsten Dreyer, Torsten (at) t3r _dot_ de
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
-->
|
||||
<!--
|
||||
Interpolate the METAR weather values over time and write
|
||||
the environment values in /environment/config/*
|
||||
All filters are enabled if /environment/metar/valid=true
|
||||
-->
|
||||
<PropertyList>
|
||||
<filter>
|
||||
<!--
|
||||
transfer the METAR QNH to the interpolation controller
|
||||
limit the rate of change to approx 0.01hpa/sec
|
||||
-->
|
||||
<name>MetarController:pressure-sea-level-inhg</name>
|
||||
<type>noise-spike</type>
|
||||
<max-rate-of-change>0.0003</max-rate-of-change>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/metar/valid</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/environment/metar/pressure-sea-level-inhg</input>
|
||||
<output>/environment/config/boundary/entry/pressure-sea-level-inhg</output>
|
||||
<output>/environment/config/aloft/entry/pressure-sea-level-inhg</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<!--
|
||||
transfer the sea-level temperature to each layer of
|
||||
interpolation controller. We have no idea here about
|
||||
the temperature gradient, so just assume ISA.
|
||||
-->
|
||||
<name>MetarController:temperature-sea-level-degc</name>
|
||||
<type>noise-spike</type>
|
||||
<max-rate-of-change>0.01667</max-rate-of-change>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/metar/valid</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/environment/metar/temperature-sea-level-degc</input>
|
||||
<output>/environment/config/boundary/entry[0]/temperature-sea-level-degc</output>
|
||||
<output>/environment/config/boundary/entry[1]/temperature-sea-level-degc</output>
|
||||
<output>/environment/config/aloft/entry[0]/temperature-sea-level-degc</output>
|
||||
<output>/environment/config/aloft/entry[1]/temperature-sea-level-degc</output>
|
||||
<output>/environment/config/aloft/entry[2]/temperature-sea-level-degc</output>
|
||||
<output>/environment/config/aloft/entry[3]/temperature-sea-level-degc</output>
|
||||
<output>/environment/config/aloft/entry[4]/temperature-sea-level-degc</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<!--
|
||||
transfer the sea-level temperature to each layer of
|
||||
interpolation controller.
|
||||
-->
|
||||
<name>MetarController:dewpoint-sea-level-degc</name>
|
||||
<type>noise-spike</type>
|
||||
<max-rate-of-change>0.01667</max-rate-of-change>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/metar/valid</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/environment/metar/dewpoint-sea-level-degc</input>
|
||||
<output>/environment/config/boundary/entry[0]/dewpoint-sea-level-degc</output>
|
||||
<output>/environment/config/boundary/entry[1]/dewpoint-sea-level-degc</output>
|
||||
<output>/environment/config/aloft/entry[0]/dewpoint-sea-level-degc</output>
|
||||
<output>/environment/config/aloft/entry[1]/dewpoint-sea-level-degc</output>
|
||||
<output>/environment/config/aloft/entry[2]/dewpoint-sea-level-degc</output>
|
||||
<output>/environment/config/aloft/entry[3]/dewpoint-sea-level-degc</output>
|
||||
<output>/environment/config/aloft/entry[4]/dewpoint-sea-level-degc</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<!--
|
||||
transfer the sea-level temperature to each layer of
|
||||
interpolation controller. We are not very creative here and
|
||||
use the same visibility for all layers but top three which
|
||||
are left untouched.
|
||||
-->
|
||||
<name>MetarController:visibility-m</name>
|
||||
<type>exponential</type>
|
||||
<filter-time>30</filter-time>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/metar/valid</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/environment/metar/min-visibility-m</input>
|
||||
<output>/environment/config/boundary/entry[0]/visibility-m</output>
|
||||
<output>/environment/config/boundary/entry[1]/visibility-m</output>
|
||||
<output>/environment/config/aloft/entry[0]/visibility-m</output>
|
||||
<output>/environment/config/aloft/entry[1]/visibility-m</output>
|
||||
</filter>
|
||||
|
||||
<!-- split the wind vector into it's components -->
|
||||
|
||||
<filter>
|
||||
<name>MetarController:wind-from-north-kt</name>
|
||||
<type>exponential</type>
|
||||
<filter-time>30</filter-time>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/metar/valid</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>
|
||||
<expression>
|
||||
<cos>
|
||||
<product>
|
||||
<property>/environment/metar/base-wind-dir-deg</property>
|
||||
<value>0.0174533</value>
|
||||
</product>
|
||||
</cos>
|
||||
</expression>
|
||||
<scale>/environment/metar/base-wind-speed-kt</scale>
|
||||
</input>
|
||||
<output>/environment/metar/base-wind-from-north-kt</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>MetarController:wind-from-east-kt</name>
|
||||
<type>exponential</type>
|
||||
<filter-time>30</filter-time>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/metar/valid</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>
|
||||
<expression>
|
||||
<sin>
|
||||
<product>
|
||||
<property>/environment/metar/base-wind-dir-deg</property>
|
||||
<value>0.0174533</value>
|
||||
</product>
|
||||
</sin>
|
||||
</expression>
|
||||
<scale>/environment/metar/base-wind-speed-kt</scale>
|
||||
</input>
|
||||
<output>/environment/metar/base-wind-from-east-kt</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>MetarController::wind-speed-kt</name>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/metar/valid</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>
|
||||
<expression>
|
||||
<!-- pythagoras in markup language -->
|
||||
<sqrt>
|
||||
<sum>
|
||||
<product>
|
||||
<property>/environment/metar/base-wind-from-east-kt</property>
|
||||
<property>/environment/metar/base-wind-from-east-kt</property>
|
||||
</product>
|
||||
<product>
|
||||
<property>/environment/metar/base-wind-from-north-kt</property>
|
||||
<property>/environment/metar/base-wind-from-north-kt</property>
|
||||
</product>
|
||||
</sum>
|
||||
</sqrt>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/environment/config/boundary/entry[0]/wind-speed-kt</output>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>MetarController:wind-from-heading-deg</name>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/metar/valid</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>
|
||||
<expression>
|
||||
<atan2>
|
||||
<property>/environment/metar/base-wind-from-east-kt</property>
|
||||
<property>/environment/metar/base-wind-from-north-kt</property>
|
||||
</atan2>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/environment/config/boundary/entry[0]/wind-from-heading-deg</output>
|
||||
<type>gain</type>
|
||||
<gain>57.3</gain> <!-- radians to degree -->
|
||||
<period>
|
||||
<min>0</min>
|
||||
<max>360</max>
|
||||
</period>
|
||||
</filter>
|
||||
|
||||
<!-- Adjust the wind-vector for the layers -->
|
||||
<!-- TODO: handle variable winds -->
|
||||
<filter include="layer-heading-offset.xml"/>
|
||||
<filter include="layer-heading-offset.xml">
|
||||
<input>
|
||||
<offset>/environment/config/aloft/entry[0]/wind-heading-change-deg</offset>
|
||||
</input>
|
||||
<output>/environment/config/aloft/entry[0]/wind-from-heading-deg</output>
|
||||
</filter>
|
||||
<filter include="layer-heading-offset.xml">
|
||||
<input>
|
||||
<offset>/environment/config/aloft/entry[1]/wind-heading-change-deg</offset>
|
||||
</input>
|
||||
<output>/environment/config/aloft/entry[1]/wind-from-heading-deg</output>
|
||||
</filter>
|
||||
<filter include="layer-heading-offset.xml">
|
||||
<input>
|
||||
<offset>/environment/config/aloft/entry[2]/wind-heading-change-deg</offset>
|
||||
</input>
|
||||
<output>/environment/config/aloft/entry[2]/wind-from-heading-deg</output>
|
||||
</filter>
|
||||
<filter include="layer-heading-offset.xml">
|
||||
<input>
|
||||
<offset>/environment/config/aloft/entry[3]/wind-heading-change-deg</offset>
|
||||
</input>
|
||||
<output>/environment/config/aloft/entry[3]/wind-from-heading-deg</output>
|
||||
</filter>
|
||||
<filter include="layer-heading-offset.xml">
|
||||
<input>
|
||||
<offset>/environment/config/aloft/entry[4]/wind-heading-change-deg</offset>
|
||||
</input>
|
||||
<output>/environment/config/aloft/entry[4]/wind-from-heading-deg</output>
|
||||
</filter>
|
||||
|
||||
<filter include="layer-speed-change.xml"/>
|
||||
<filter include="layer-speed-change.xml">
|
||||
<input>
|
||||
<offset>/environment/config/aloft/entry[0]/wind-speed-change-rel</offset>
|
||||
</input>
|
||||
<output>/environment/config/aloft/entry[0]/wind-speed-kt</output>
|
||||
</filter>
|
||||
<filter include="layer-speed-change.xml">
|
||||
<input>
|
||||
<offset>/environment/config/aloft/entry[1]/wind-speed-change-rel</offset>
|
||||
</input>
|
||||
<output>/environment/config/aloft/entry[1]/wind-speed-kt</output>
|
||||
</filter>
|
||||
<filter include="layer-speed-change.xml">
|
||||
<input>
|
||||
<offset>/environment/config/aloft/entry[2]/wind-speed-change-rel</offset>
|
||||
</input>
|
||||
<output>/environment/config/aloft/entry[2]/wind-speed-kt</output>
|
||||
</filter>
|
||||
<filter include="layer-speed-change.xml">
|
||||
<input>
|
||||
<offset>/environment/config/aloft/entry[3]/wind-speed-change-rel</offset>
|
||||
</input>
|
||||
<output>/environment/config/aloft/entry[3]/wind-speed-kt</output>
|
||||
</filter>
|
||||
<filter include="layer-speed-change.xml">
|
||||
<input>
|
||||
<offset>/environment/config/aloft/entry[4]/wind-speed-change-rel</offset>
|
||||
</input>
|
||||
<output>/environment/config/aloft/entry[4]/wind-speed-kt</output>
|
||||
</filter>
|
||||
|
||||
<!-- Clouds -->
|
||||
<!-- don't interpolate to/from altitude -9999 -->
|
||||
<filter include="clouds-altitude-set.xml"/>
|
||||
<filter include="clouds-altitude-set.xml">
|
||||
<params>
|
||||
<from>/environment/metar/clouds/layer[1]/elevation-ft</from>
|
||||
<to>/environment/clouds/layer[1]/elevation-ft</to>
|
||||
</params>
|
||||
</filter>
|
||||
<filter include="clouds-altitude-set.xml">
|
||||
<params>
|
||||
<from>/environment/metar/clouds/layer[2]/elevation-ft</from>
|
||||
<to>/environment/clouds/layer[2]/elevation-ft</to>
|
||||
</params>
|
||||
</filter>
|
||||
<filter include="clouds-altitude-set.xml">
|
||||
<params>
|
||||
<from>/environment/metar/clouds/layer[3]/elevation-ft</from>
|
||||
<to>/environment/clouds/layer[3]/elevation-ft</to>
|
||||
</params>
|
||||
</filter>
|
||||
<filter include="clouds-altitude-set.xml">
|
||||
<params>
|
||||
<from>/environment/metar/clouds/layer[4]/elevation-ft</from>
|
||||
<to>/environment/clouds/layer[4]/elevation-ft</to>
|
||||
</params>
|
||||
</filter>
|
||||
|
||||
<filter include="clouds-altitude-interpolate.xml"/>
|
||||
<filter include="clouds-altitude-interpolate.xml">
|
||||
<params>
|
||||
<from>/environment/metar/clouds/layer[1]/elevation-ft</from>
|
||||
<to>/environment/clouds/layer[1]/elevation-ft</to>
|
||||
</params>
|
||||
</filter>
|
||||
<filter include="clouds-altitude-interpolate.xml">
|
||||
<params>
|
||||
<from>/environment/metar/clouds/layer[2]/elevation-ft</from>
|
||||
<to>/environment/clouds/layer[2]/elevation-ft</to>
|
||||
</params>
|
||||
</filter>
|
||||
<filter include="clouds-altitude-interpolate.xml">
|
||||
<params>
|
||||
<from>/environment/metar/clouds/layer[3]/elevation-ft</from>
|
||||
<to>/environment/clouds/layer[3]/elevation-ft</to>
|
||||
</params>
|
||||
</filter>
|
||||
<filter include="clouds-altitude-interpolate.xml">
|
||||
<params>
|
||||
<from>/environment/metar/clouds/layer[4]/elevation-ft</from>
|
||||
<to>/environment/clouds/layer[4]/elevation-ft</to>
|
||||
</params>
|
||||
</filter>
|
||||
|
||||
<filter include="clouds-thickness.xml"/>
|
||||
<filter include="clouds-thickness.xml">
|
||||
<input>/environment/metar/clouds/layer[1]/thickness-ft</input>
|
||||
<output>/environment/clouds/layer[1]/thickness-ft</output>
|
||||
</filter>
|
||||
<filter include="clouds-thickness.xml">
|
||||
<input>/environment/metar/clouds/layer[2]/thickness-ft</input>
|
||||
<output>/environment/clouds/layer[2]/thickness-ft</output>
|
||||
</filter>
|
||||
<filter include="clouds-thickness.xml">
|
||||
<input>/environment/metar/clouds/layer[3]/thickness-ft</input>
|
||||
<output>/environment/clouds/layer[3]/thickness-ft</output>
|
||||
</filter>
|
||||
<filter include="clouds-thickness.xml">
|
||||
<input>/environment/metar/clouds/layer[4]/thickness-ft</input>
|
||||
<output>/environment/clouds/layer[4]/thickness-ft</output>
|
||||
</filter>
|
||||
|
||||
<filter include="clouds-coverage.xml"/>
|
||||
<filter include="clouds-coverage.xml">
|
||||
<params>
|
||||
<from>/environment/metar/clouds/layer[1]/coverage-type</from>
|
||||
<to>environment/clouds/layer[1]/coverage-type</to>
|
||||
</params>
|
||||
</filter>
|
||||
<filter include="clouds-coverage.xml">
|
||||
<params>
|
||||
<from>/environment/metar/clouds/layer[2]/coverage-type</from>
|
||||
<to>environment/clouds/layer[2]/coverage-type</to>
|
||||
</params>
|
||||
</filter>
|
||||
<filter include="clouds-coverage.xml">
|
||||
<params>
|
||||
<from>/environment/metar/clouds/layer[3]/coverage-type</from>
|
||||
<to>environment/clouds/layer[3]/coverage-type</to>
|
||||
</params>
|
||||
</filter>
|
||||
<filter include="clouds-coverage.xml">
|
||||
<params>
|
||||
<from>/environment/metar/clouds/layer[4]/coverage-type</from>
|
||||
<to>environment/clouds/layer[4]/coverage-type</to>
|
||||
</params>
|
||||
</filter>
|
||||
</PropertyList>
|
|
@ -15,6 +15,8 @@ uniform sampler2D SampleTex2;
|
|||
uniform sampler2D NormalTex;
|
||||
uniform float depth_factor;
|
||||
|
||||
uniform float red, green, blue, alpha;
|
||||
|
||||
uniform float quality_level; // From /sim/rendering/quality-level
|
||||
uniform float snowlevel; // From /sim/rendering/snow-level-m
|
||||
|
||||
|
@ -102,7 +104,7 @@ void main (void)
|
|||
fogFactor = exp2(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord * LOG2);
|
||||
float biasFactor = exp2(-0.00000002 * fogCoord * fogCoord * LOG2);
|
||||
|
||||
float n=0.02;
|
||||
float n=0.06;
|
||||
n += nvL[0]*0.4;
|
||||
n += nvL[1]*0.6;
|
||||
n += nvL[2]*2.0;
|
||||
|
@ -126,9 +128,10 @@ void main (void)
|
|||
|
||||
//draw floor where !steep, and another blurb for smoothing transitions
|
||||
vec4 c3, c4, c5, c3a, c4a, c5a;
|
||||
c3 = mix(vec4(n-0.88, n-0.14, -n, 0.0), c1, smoothstep(0.990, 0.970, abs(normalize(Normal).z)+nvL[2]*1.3));
|
||||
c4 = mix(vec4(n-0.88, n-0.74, -n, 0.0), c1, smoothstep(0.990, 0.890, abs(normalize(Normal).z)+nvL[2]*0.9));
|
||||
c4a = mix(vec4(n-0.76, n-0.66, -n, 0.3), c1, smoothstep(0.990, 0.970, abs(normalize(Normal).z)+nvL[2]*1.32));
|
||||
float subred = 1.0 - red; float subgreen = 1.0 - green; float subblue = 1.0 - blue;
|
||||
c3 = mix(vec4(n-subred, n-subgreen, -n-subblue, 0.0), c1, smoothstep(0.990, 0.970, abs(normalize(Normal).z)+nvL[2]*1.3));
|
||||
c4 = mix(vec4(n-subred, n-subgreen-0.6, -n-subblue, 0.0), c1, smoothstep(0.990, 0.890, abs(normalize(Normal).z)+nvL[2]*0.9));
|
||||
c4a = mix(vec4(n-subred+0.12, n-subgreen-0.52, -n-subblue, 0.3), c1, smoothstep(0.990, 0.970, abs(normalize(Normal).z)+nvL[2]*1.32));
|
||||
c5 = mix(c3, c4, 1.0);
|
||||
c5a = mix(c3, c4a, 1.0);
|
||||
|
||||
|
@ -172,11 +175,8 @@ void main (void)
|
|||
c1 = mix(c1, c5, clamp(0.65, n*0.5, 0.6));
|
||||
diffuse = gl_Color.rgb * max(0.8, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz));
|
||||
}
|
||||
|
||||
//should come as varying!
|
||||
vec4 constantColor = vec4(1.0, 1.0, 1.0, 0.0);
|
||||
|
||||
vec4 ambient_light = gl_LightSource[0].diffuse * constantColor * vec4(diffuse, 1.0);
|
||||
vec4 ambient_light = gl_LightSource[0].diffuse * vec4(diffuse, 0.0);
|
||||
|
||||
c1 *= ambient_light;
|
||||
vec4 finalColor = c1;
|
||||
|
@ -184,5 +184,5 @@ void main (void)
|
|||
if(gl_Fog.density == 1.0)
|
||||
fogFactor=1.0;
|
||||
|
||||
gl_FragColor = mix(gl_Fog.color ,finalColor, fogFactor);
|
||||
gl_FragColor = mix(gl_Fog.color,finalColor, fogFactor);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue