Merge branch 'master' of git://mapserver.flightgear.org/fgdata
0
Aircraft/Instruments-3d/garmin196/README
Executable file → Normal file
0
Aircraft/Instruments-3d/garmin196/airports_atis.xml
Executable file → Normal file
0
Aircraft/Instruments-3d/garmin196/cities.xml
Executable file → Normal file
0
Aircraft/Instruments-3d/garmin196/coque.png
Executable file → Normal file
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/description.jpg
Executable file → Normal file
Before Width: | Height: | Size: 155 KiB After Width: | Height: | Size: 155 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/doc-en.htm
Executable file → Normal file
0
Aircraft/Instruments-3d/garmin196/doc/doc-fr.htm
Executable file → Normal file
0
Aircraft/Instruments-3d/garmin196/doc/dto_aviation_01.jpg
Executable file → Normal file
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/dto_aviation_02.jpg
Executable file → Normal file
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/dto_aviation_03.jpg
Executable file → Normal file
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/dto_aviation_04.jpg
Executable file → Normal file
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/dto_recent_01.jpg
Executable file → Normal file
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/dto_user_01.jpg
Executable file → Normal file
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/eteint.jpg
Executable file → Normal file
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/garmin196.jpg
Executable file → Normal file
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 184 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/luminosite.jpg
Executable file → Normal file
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 140 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/mappage.jpg
Executable file → Normal file
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/menu_aircraft_01.jpg
Executable file → Normal file
Before Width: | Height: | Size: 141 KiB After Width: | Height: | Size: 141 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/menu_aircraft_02.jpg
Executable file → Normal file
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/menu_e6b.jpg
Executable file → Normal file
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/menu_flights_01.jpg
Executable file → Normal file
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 128 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/menu_flights_02.jpg
Executable file → Normal file
Before Width: | Height: | Size: 141 KiB After Width: | Height: | Size: 141 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/menu_gps.jpg
Executable file → Normal file
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/menu_map.jpg
Executable file → Normal file
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/menu_points_01.jpg
Executable file → Normal file
Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 136 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/menu_points_02.jpg
Executable file → Normal file
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/menu_routes_01.jpg
Executable file → Normal file
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/menu_routes_01_bis.jpg
Executable file → Normal file
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/menu_routes_02.jpg
Executable file → Normal file
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/menu_routes_02_bis.jpg
Executable file → Normal file
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/menu_routes_03.jpg
Executable file → Normal file
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/menu_routes_04.jpg
Executable file → Normal file
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/menu_setup_01.jpg
Executable file → Normal file
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 140 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/menu_setup_02.jpg
Executable file → Normal file
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 111 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/nrst_airport_01.jpg
Executable file → Normal file
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/panelpage.jpg
Executable file → Normal file
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 189 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/positionpage.jpg
Executable file → Normal file
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
0
Aircraft/Instruments-3d/garmin196/doc/startup.jpg
Executable file → Normal file
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 146 KiB |
0
Aircraft/Instruments-3d/garmin196/garmin196.ac
Executable file → Normal file
0
Aircraft/Instruments-3d/garmin196/garmin196.nas
Executable file → Normal file
0
Aircraft/Instruments-3d/garmin196/garmin196.xml
Executable file → Normal file
0
Aircraft/Instruments-3d/garmin196/garmin196_dto_display.xml
Executable file → Normal file
0
Aircraft/Instruments-3d/garmin196/garmin196_map_symbols.ac
Executable file → Normal file
0
Aircraft/Instruments-3d/garmin196/garmin196_map_symbols.xml
Executable file → Normal file
0
Aircraft/Instruments-3d/garmin196/garmin196_nrst_display.xml
Executable file → Normal file
0
Aircraft/Instruments-3d/garmin196/garmin196_support1.xml
Executable file → Normal file
0
Aircraft/Instruments-3d/garmin196/screens.png
Executable file → Normal file
Before Width: | Height: | Size: 690 KiB After Width: | Height: | Size: 690 KiB |
0
Aircraft/Instruments-3d/garmin196/support1.ac
Executable file → Normal file
0
Aircraft/Instruments-3d/garmin196/support1.png
Executable file → Normal file
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
0
Aircraft/Instruments-3d/garmin196/symbols.png
Executable file → Normal file
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
@ -155,14 +155,12 @@ Random Buildings
|
||||||
|
|
||||||
Random Buildings come in three sizes, with individual constraints.
|
Random Buildings come in three sizes, with individual constraints.
|
||||||
|
|
||||||
Small buildings, which may have pitched roofs. They have different front, back and
|
Small buildings. These have different textures on the sides compared to the front and back.
|
||||||
side textures. Small buildings are never deeper than they are wide.
|
Small buildings are never deeper than they are wide.
|
||||||
|
|
||||||
Medium buildings, which have flat roofs. They have different front and side textures.
|
Medium buildings, which are never taller than they are wide.
|
||||||
They are never taller than they are wide.
|
|
||||||
|
|
||||||
Large buildings, which have flat roofs. They have different front and size textures. There
|
Large buildings. There are no constraints on their width, depth or height.
|
||||||
are no constraints on their width, depth or height.
|
|
||||||
|
|
||||||
building-coverage : The coverage of random buildings in areas marked for random objects in
|
building-coverage : The coverage of random buildings in areas marked for random objects in
|
||||||
m^2. A lower number means a higher density of buildings. A value of
|
m^2. A lower number means a higher density of buildings. A value of
|
||||||
|
@ -212,5 +210,8 @@ building-large-max-width-m : Maximum width of large buildings. (default 75)
|
||||||
building-large-min-depth-m : Minimum depth of large buildings. (default 50)
|
building-large-min-depth-m : Minimum depth of large buildings. (default 50)
|
||||||
building-large-max-depth-m : Maximum depty of large buildings. (default 75)
|
building-large-max-depth-m : Maximum depty of large buildings. (default 75)
|
||||||
|
|
||||||
texture : The texture used for all buildings. See Docs/buildings.png for details.
|
building-texture : The texture used for all buildings. See Docs/buildings.png for details.
|
||||||
(default Texture/buildings.png)
|
(default Texture/buildings.png)
|
||||||
|
|
||||||
|
building-lightmap: Emissive texture for all buildings, which is faded in at night to provide
|
||||||
|
illusion of lit windows. Same texture coordinates and format at building-texture above.
|
||||||
|
|
145
Effects/building.eff
Normal file
|
@ -0,0 +1,145 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<PropertyList>
|
||||||
|
<name>Effects/building</name>
|
||||||
|
<inherits-from>Effects/model-default</inherits-from>
|
||||||
|
<parameters>
|
||||||
|
<texture n="0">
|
||||||
|
<active>true</active>
|
||||||
|
<type>2d</type>
|
||||||
|
<internal-format>normalized</internal-format>
|
||||||
|
<filter>linear-mipmap-linear</filter>
|
||||||
|
<wrap-s>clamp</wrap-s>
|
||||||
|
<wrap-t>clamp</wrap-t>
|
||||||
|
</texture>
|
||||||
|
<texture n="1">
|
||||||
|
<active>true</active>
|
||||||
|
<type>2d</type>
|
||||||
|
<internal-format>normalized</internal-format>
|
||||||
|
<filter>linear-mipmap-linear</filter>
|
||||||
|
<wrap-s>clamp</wrap-s>
|
||||||
|
<wrap-t>clamp</wrap-t>
|
||||||
|
</texture>
|
||||||
|
<transparent>false</transparent>
|
||||||
|
<material>
|
||||||
|
<active>true</active>
|
||||||
|
<color-mode-uniform>1</color-mode-uniform>
|
||||||
|
<ambient type="vec4d">0.6 0.6 0.6 1.0</ambient>
|
||||||
|
<diffuse type="vec4d">1.0 1.0 1.0 1.0</diffuse>
|
||||||
|
<specular type="vec4d">0.0 0.0 0.0 1.0</specular>
|
||||||
|
<emissive type="vec4d">0.02 0.02 0.02 1.0</emissive>
|
||||||
|
<shininess>0.0</shininess>
|
||||||
|
<color-mode>ambient-and-diffuse</color-mode>
|
||||||
|
<color-mode-uniform>ambient-and-diffuse</color-mode-uniform>
|
||||||
|
<!-- DIFFUSE -->
|
||||||
|
</material>
|
||||||
|
<material-id>0</material-id>
|
||||||
|
<blend>
|
||||||
|
<active>0</active>
|
||||||
|
<source>0</source>
|
||||||
|
<destination>0</destination>
|
||||||
|
</blend>
|
||||||
|
<shade-model>flat</shade-model>
|
||||||
|
<cull-face>back</cull-face>
|
||||||
|
<rendering-hint>opaque</rendering-hint>
|
||||||
|
<vertex-program-two-side>false</vertex-program-two-side>
|
||||||
|
<!-- fog include -->
|
||||||
|
<visibility>
|
||||||
|
<use>/environment/ground-visibility-m</use>
|
||||||
|
</visibility>
|
||||||
|
<avisibility>
|
||||||
|
<use>/environment/visibility-m</use>
|
||||||
|
</avisibility>
|
||||||
|
<lthickness>
|
||||||
|
<use>/environment/ground-haze-thickness-m</use>
|
||||||
|
</lthickness>
|
||||||
|
<scattering>
|
||||||
|
<use>/rendering/scene/scattering</use>
|
||||||
|
</scattering>
|
||||||
|
<terminator>
|
||||||
|
<use>/environment/terminator-relative-position-m</use>
|
||||||
|
</terminator>
|
||||||
|
<fogtype>
|
||||||
|
<use>/sim/rendering/shaders/skydome</use>
|
||||||
|
</fogtype>
|
||||||
|
<!-- END fog include -->
|
||||||
|
<sun-angle>
|
||||||
|
<use>/sim/time/sun-angle-rad</use>
|
||||||
|
</sun-angle>
|
||||||
|
</parameters>
|
||||||
|
|
||||||
|
<!-- Override some of the default shaders so we can add emissive lighting -->
|
||||||
|
<!-- Skydome -->
|
||||||
|
<technique n="5">
|
||||||
|
<pass n="0">
|
||||||
|
<program n="0">
|
||||||
|
<vertex-shader n="0">Shaders/terrain-haze.vert</vertex-shader>
|
||||||
|
<fragment-shader n="0">Shaders/terrain-haze.frag</fragment-shader>
|
||||||
|
</program>
|
||||||
|
</pass>
|
||||||
|
</technique>
|
||||||
|
|
||||||
|
<!-- Rembrandt -->
|
||||||
|
<!-- FredB: What is the purpose of that ? -->
|
||||||
|
<technique n="10">
|
||||||
|
<pass n="0">
|
||||||
|
<program n="0">
|
||||||
|
<vertex-shader n="0">Shaders/deferred-gbuffer.vert</vertex-shader>
|
||||||
|
<fragment-shader n="0">Shaders/deferred-gbuffer.frag</fragment-shader>
|
||||||
|
<fragment-shader n="1">Shaders/gbuffer-functions.frag</fragment-shader>
|
||||||
|
<fragment-shader n="2">Shaders/gbuffer-encode.frag</fragment-shader>
|
||||||
|
</program>
|
||||||
|
</pass>
|
||||||
|
</technique>
|
||||||
|
|
||||||
|
<!-- Default shader -->
|
||||||
|
<technique n="11">
|
||||||
|
<pass n="0">
|
||||||
|
<texture-unit n="1">
|
||||||
|
<!-- Emissive texture-->
|
||||||
|
<unit>1</unit>
|
||||||
|
<!-- If there is a texture, the type in the derived effect
|
||||||
|
will be "2d". -->
|
||||||
|
<type>
|
||||||
|
<use>texture[1]/type</use>
|
||||||
|
</type>
|
||||||
|
<image>
|
||||||
|
<use>texture[1]/image</use>
|
||||||
|
</image>
|
||||||
|
<filter>
|
||||||
|
<use>texture[1]/filter</use>
|
||||||
|
</filter>
|
||||||
|
<wrap-s>
|
||||||
|
<use>texture[1]/wrap-s</use>
|
||||||
|
</wrap-s>
|
||||||
|
<wrap-t>
|
||||||
|
<use>texture[1]/wrap-t</use>
|
||||||
|
</wrap-t>
|
||||||
|
<!--
|
||||||
|
<internal-format>
|
||||||
|
<use>texture[1]/internal-format</use>
|
||||||
|
</internal-format>
|
||||||
|
-->
|
||||||
|
</texture-unit>
|
||||||
|
<program n="0">
|
||||||
|
<!-- <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader> -->
|
||||||
|
<!--fog include-->
|
||||||
|
<vertex-shader n="1">Shaders/default.vert</vertex-shader>
|
||||||
|
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
||||||
|
<!--fog include-->
|
||||||
|
<fragment-shader n="1">Shaders/building-default.frag</fragment-shader>
|
||||||
|
</program>
|
||||||
|
<uniform n="9">
|
||||||
|
<name>lightmap</name>
|
||||||
|
<type>sampler-2d</type>
|
||||||
|
<value type="int">1</value>
|
||||||
|
</uniform>
|
||||||
|
<uniform n="10">
|
||||||
|
<name>sunangle</name>
|
||||||
|
<type>float</type>
|
||||||
|
<value>
|
||||||
|
<use>sun-angle</use>
|
||||||
|
</value>
|
||||||
|
</uniform>
|
||||||
|
</pass>
|
||||||
|
</technique>
|
||||||
|
</PropertyList>
|
|
@ -258,7 +258,7 @@
|
||||||
</internal-format>
|
</internal-format>
|
||||||
</texture-unit>
|
</texture-unit>
|
||||||
<program>
|
<program>
|
||||||
<vertex-shader n="0">Shaders/include_fog.vert</vertex-shader>
|
<!-- <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader> -->
|
||||||
<vertex-shader n="1">Shaders/landmass-g.vert</vertex-shader>
|
<vertex-shader n="1">Shaders/landmass-g.vert</vertex-shader>
|
||||||
<geometry-shader>Shaders/landmass.geom</geometry-shader>
|
<geometry-shader>Shaders/landmass.geom</geometry-shader>
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
||||||
|
@ -457,7 +457,7 @@
|
||||||
</internal-format>
|
</internal-format>
|
||||||
</texture-unit>
|
</texture-unit>
|
||||||
<program>
|
<program>
|
||||||
<vertex-shader n="0">Shaders/include_fog.vert</vertex-shader>
|
<!-- <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader> -->
|
||||||
<vertex-shader n="1">Shaders/landmass.vert</vertex-shader>
|
<vertex-shader n="1">Shaders/landmass.vert</vertex-shader>
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
||||||
<fragment-shader n="1">Shaders/landmass.frag</fragment-shader>
|
<fragment-shader n="1">Shaders/landmass.frag</fragment-shader>
|
||||||
|
|
|
@ -53,8 +53,7 @@ the objects that use it, and replaces it with the default shader.
|
||||||
<vertex-shader>Shaders/ubershader.vert</vertex-shader>
|
<vertex-shader>Shaders/ubershader.vert</vertex-shader>
|
||||||
<fragment-shader>Shaders/ubershader-gbuffer.frag</fragment-shader>
|
<fragment-shader>Shaders/ubershader-gbuffer.frag</fragment-shader>
|
||||||
<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
|
<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
|
||||||
<!-- <vertex-shader n="1">Shaders/deferred-gbuffer.vert</vertex-shader>
|
<fragment-shader>Shaders/gbuffer-encode.frag</fragment-shader>
|
||||||
<fragment-shader n="1">Shaders/deferred-gbuffer.frag</fragment-shader>-->
|
|
||||||
</program>
|
</program>
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
|
|
|
@ -119,6 +119,13 @@
|
||||||
<type>float</type>
|
<type>float</type>
|
||||||
<value><use>scattering</use></value>
|
<value><use>scattering</use></value>
|
||||||
</uniform>
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>terminator</name>
|
||||||
|
<type>float</type>
|
||||||
|
<value>
|
||||||
|
<use>terminator</use>
|
||||||
|
</value>
|
||||||
|
</uniform>
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>texture</name>
|
<name>texture</name>
|
||||||
<type>sampler-2d</type>
|
<type>sampler-2d</type>
|
||||||
|
@ -188,6 +195,7 @@
|
||||||
<vertex-shader>Shaders/deferred-gbuffer.vert</vertex-shader>
|
<vertex-shader>Shaders/deferred-gbuffer.vert</vertex-shader>
|
||||||
<fragment-shader>Shaders/deferred-gbuffer.frag</fragment-shader>
|
<fragment-shader>Shaders/deferred-gbuffer.frag</fragment-shader>
|
||||||
<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
|
<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
|
||||||
|
<fragment-shader>Shaders/gbuffer-encode.frag</fragment-shader>
|
||||||
</program>
|
</program>
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>texture</name>
|
<name>texture</name>
|
||||||
|
@ -296,7 +304,7 @@
|
||||||
<use>vertex-program-two-side</use>
|
<use>vertex-program-two-side</use>
|
||||||
</vertex-program-two-side>
|
</vertex-program-two-side>
|
||||||
<program>
|
<program>
|
||||||
<vertex-shader n="0">Shaders/include_fog.vert</vertex-shader>
|
<!-- <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader> -->
|
||||||
<!--fog include-->
|
<!--fog include-->
|
||||||
<vertex-shader n="1">Shaders/default.vert</vertex-shader>
|
<vertex-shader n="1">Shaders/default.vert</vertex-shader>
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
||||||
|
|
|
@ -4,14 +4,26 @@
|
||||||
<parameters>
|
<parameters>
|
||||||
<filtering><use>/sim/rendering/shadows/filtering</use></filtering>
|
<filtering><use>/sim/rendering/shadows/filtering</use></filtering>
|
||||||
</parameters>
|
</parameters>
|
||||||
<technique n="9">
|
<technique n="8">
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shadows/enabled</property>
|
<property>/sim/rendering/shadows/enabled</property>
|
||||||
<less>
|
<or> <!-- filtering >= 3 || ( filtering >= 2 && num-cascades >= 2 ) -->
|
||||||
<value type="float">1.0</value>
|
<less>
|
||||||
<float-property>/sim/rendering/shadows/filtering</float-property>
|
<value type="float">2.0</value>
|
||||||
</less>
|
<float-property>/sim/rendering/shadows/filtering</float-property>
|
||||||
|
</less>
|
||||||
|
<and>
|
||||||
|
<less>
|
||||||
|
<value type="float">1.0</value>
|
||||||
|
<float-property>/sim/rendering/shadows/filtering</float-property>
|
||||||
|
</less>
|
||||||
|
<less>
|
||||||
|
<value type="float">1.0</value>
|
||||||
|
<float-property>/sim/rendering/shadows/num-cascades</float-property>
|
||||||
|
</less>
|
||||||
|
</and>
|
||||||
|
</or>
|
||||||
</and>
|
</and>
|
||||||
</predicate>
|
</predicate>
|
||||||
<pass>
|
<pass>
|
||||||
|
@ -96,9 +108,16 @@
|
||||||
-->
|
-->
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
<technique n="10">
|
<technique n="9">
|
||||||
<predicate>
|
<predicate>
|
||||||
<property>/sim/rendering/shadows/enabled</property>
|
<and>
|
||||||
|
<property>/sim/rendering/shadows/enabled</property>
|
||||||
|
<!-- num-cascades >= 2 -->
|
||||||
|
<less>
|
||||||
|
<value type="float">1.0</value>
|
||||||
|
<float-property>/sim/rendering/shadows/num-cascades</float-property>
|
||||||
|
</less>
|
||||||
|
</and>
|
||||||
</predicate>
|
</predicate>
|
||||||
<pass>
|
<pass>
|
||||||
<lighting>false</lighting>
|
<lighting>false</lighting>
|
||||||
|
@ -177,6 +196,92 @@
|
||||||
-->
|
-->
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
|
<technique n="10">
|
||||||
|
<predicate>
|
||||||
|
<property>/sim/rendering/shadows/enabled</property>
|
||||||
|
</predicate>
|
||||||
|
<pass>
|
||||||
|
<lighting>false</lighting>
|
||||||
|
<depth>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</depth>
|
||||||
|
<blend>
|
||||||
|
<source>one</source>
|
||||||
|
<destination>one</destination>
|
||||||
|
</blend>
|
||||||
|
<render-bin>
|
||||||
|
<bin-number>1</bin-number>
|
||||||
|
<bin-name>RenderBin</bin-name>
|
||||||
|
</render-bin>
|
||||||
|
<texture-unit>
|
||||||
|
<unit>0</unit>
|
||||||
|
<type>depth-buffer</type>
|
||||||
|
</texture-unit>
|
||||||
|
<texture-unit>
|
||||||
|
<unit>1</unit>
|
||||||
|
<type>normal-buffer</type>
|
||||||
|
</texture-unit>
|
||||||
|
<texture-unit>
|
||||||
|
<unit>2</unit>
|
||||||
|
<type>diffuse-buffer</type>
|
||||||
|
</texture-unit>
|
||||||
|
<texture-unit>
|
||||||
|
<unit>3</unit>
|
||||||
|
<type>spec-emis-buffer</type>
|
||||||
|
</texture-unit>
|
||||||
|
<texture-unit>
|
||||||
|
<unit>4</unit>
|
||||||
|
<type>shadow-buffer</type>
|
||||||
|
</texture-unit>
|
||||||
|
<program>
|
||||||
|
<vertex-shader>Shaders/sunlight-simple.vert</vertex-shader>
|
||||||
|
<fragment-shader>Shaders/sunlight-simple.frag</fragment-shader>
|
||||||
|
<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
|
||||||
|
</program>
|
||||||
|
<uniform>
|
||||||
|
<name>depth_tex</name>
|
||||||
|
<type>sampler-2d</type>
|
||||||
|
<value type="int">0</value>
|
||||||
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>normal_tex</name>
|
||||||
|
<type>sampler-2d</type>
|
||||||
|
<value type="int">1</value>
|
||||||
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>color_tex</name>
|
||||||
|
<type>sampler-2d</type>
|
||||||
|
<value type="int">2</value>
|
||||||
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>spec_emis_tex</name>
|
||||||
|
<type>sampler-2d</type>
|
||||||
|
<value type="int">3</value>
|
||||||
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>shadow_tex</name>
|
||||||
|
<type>sampler-2d</type>
|
||||||
|
<value type="int">4</value>
|
||||||
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>filtering</name>
|
||||||
|
<type>int</type>
|
||||||
|
<value type="int"><use>filtering</use></value>
|
||||||
|
</uniform>
|
||||||
|
<!-- The following uniforms are automatically defined and initialized :
|
||||||
|
- fg_SunAmbientColor
|
||||||
|
- fg_SunDiffuseColor
|
||||||
|
- fg_SunSpecularColor
|
||||||
|
- fg_SunDirection
|
||||||
|
- fg_ProjectionMatrixInverse
|
||||||
|
- fg_ViewMatrixInverse
|
||||||
|
- fg_ViewMatrix
|
||||||
|
- fg_Planes
|
||||||
|
- fg_ShadowNumber
|
||||||
|
- fg_ShadowDistances
|
||||||
|
-->
|
||||||
|
</pass>
|
||||||
|
</technique>
|
||||||
<technique n="11">
|
<technique n="11">
|
||||||
<pass>
|
<pass>
|
||||||
<lighting>false</lighting>
|
<lighting>false</lighting>
|
||||||
|
@ -210,6 +315,7 @@
|
||||||
<program>
|
<program>
|
||||||
<vertex-shader>Shaders/sunlight.vert</vertex-shader>
|
<vertex-shader>Shaders/sunlight.vert</vertex-shader>
|
||||||
<fragment-shader>Shaders/sunlight-noshadow.frag</fragment-shader>
|
<fragment-shader>Shaders/sunlight-noshadow.frag</fragment-shader>
|
||||||
|
<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
|
||||||
</program>
|
</program>
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>depth_tex</name>
|
<name>depth_tex</name>
|
||||||
|
|
|
@ -465,6 +465,7 @@
|
||||||
<vertex-shader>Shaders/deferred-gbuffer.vert</vertex-shader>
|
<vertex-shader>Shaders/deferred-gbuffer.vert</vertex-shader>
|
||||||
<fragment-shader>Shaders/deferred-gbuffer.frag</fragment-shader>
|
<fragment-shader>Shaders/deferred-gbuffer.frag</fragment-shader>
|
||||||
<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
|
<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
|
||||||
|
<fragment-shader>Shaders/gbuffer-encode.frag</fragment-shader>
|
||||||
</program>
|
</program>
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>texture</name>
|
<name>texture</name>
|
||||||
|
|
|
@ -67,6 +67,8 @@
|
||||||
<program>
|
<program>
|
||||||
<vertex-shader>Shaders/deferred-tree.vert</vertex-shader>
|
<vertex-shader>Shaders/deferred-tree.vert</vertex-shader>
|
||||||
<fragment-shader>Shaders/deferred-tree.frag</fragment-shader>
|
<fragment-shader>Shaders/deferred-tree.frag</fragment-shader>
|
||||||
|
<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
|
||||||
|
<fragment-shader>Shaders/gbuffer-encode.frag</fragment-shader>
|
||||||
</program>
|
</program>
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>texture</name>
|
<name>texture</name>
|
||||||
|
@ -161,7 +163,7 @@
|
||||||
</uniform>
|
</uniform>
|
||||||
<!-- END fog include -->
|
<!-- END fog include -->
|
||||||
</pass>
|
</pass>
|
||||||
|
|
||||||
<pass n="1">
|
<pass n="1">
|
||||||
<lighting>true</lighting>
|
<lighting>true</lighting>
|
||||||
<material>
|
<material>
|
||||||
|
@ -194,7 +196,7 @@
|
||||||
<wrap-t>clamp</wrap-t>
|
<wrap-t>clamp</wrap-t>
|
||||||
</texture-unit>
|
</texture-unit>
|
||||||
<program>
|
<program>
|
||||||
<vertex-shader n="0">Shaders/include_fog.vert</vertex-shader>
|
<!-- <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader> -->
|
||||||
<vertex-shader n="1">Shaders/tree.vert</vertex-shader>
|
<vertex-shader n="1">Shaders/tree.vert</vertex-shader>
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
||||||
<fragment-shader n="1">Shaders/tree.frag</fragment-shader>
|
<fragment-shader n="1">Shaders/tree.frag</fragment-shader>
|
||||||
|
|
|
@ -159,6 +159,7 @@
|
||||||
<vertex-shader>Shaders/urban-gbuffer.vert</vertex-shader>
|
<vertex-shader>Shaders/urban-gbuffer.vert</vertex-shader>
|
||||||
<fragment-shader>Shaders/urban-gbuffer.frag</fragment-shader>
|
<fragment-shader>Shaders/urban-gbuffer.frag</fragment-shader>
|
||||||
<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
|
<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
|
||||||
|
<fragment-shader>Shaders/gbuffer-encode.frag</fragment-shader>
|
||||||
<attribute>
|
<attribute>
|
||||||
<name>tangent</name>
|
<name>tangent</name>
|
||||||
<index>6</index>
|
<index>6</index>
|
||||||
|
@ -323,6 +324,7 @@
|
||||||
<vertex-shader>Shaders/urban-gbuffer.vert</vertex-shader>
|
<vertex-shader>Shaders/urban-gbuffer.vert</vertex-shader>
|
||||||
<fragment-shader>Shaders/urban-gbuffer.frag</fragment-shader>
|
<fragment-shader>Shaders/urban-gbuffer.frag</fragment-shader>
|
||||||
<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
|
<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
|
||||||
|
<fragment-shader>Shaders/gbuffer-encode.frag</fragment-shader>
|
||||||
<attribute>
|
<attribute>
|
||||||
<name>tangent</name>
|
<name>tangent</name>
|
||||||
<index>6</index>
|
<index>6</index>
|
||||||
|
@ -735,7 +737,7 @@
|
||||||
<type>noise</type>
|
<type>noise</type>
|
||||||
</texture-unit>
|
</texture-unit>
|
||||||
<program>
|
<program>
|
||||||
<vertex-shader n="0">Shaders/include_fog.vert</vertex-shader>
|
<!-- <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader> -->
|
||||||
<vertex-shader n="1">Shaders/urban.vert</vertex-shader>
|
<vertex-shader n="1">Shaders/urban.vert</vertex-shader>
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
||||||
<fragment-shader n="1">Shaders/urban.frag</fragment-shader>
|
<fragment-shader n="1">Shaders/urban.frag</fragment-shader>
|
||||||
|
|
|
@ -2195,6 +2195,16 @@
|
||||||
|
|
||||||
<!-- runway and taxiway signs -->
|
<!-- runway and taxiway signs -->
|
||||||
|
|
||||||
|
<material>
|
||||||
|
<name>signcase</name>
|
||||||
|
<texture>Signs/signs_case.png</texture>
|
||||||
|
<emissive>
|
||||||
|
<r>0.1</r>
|
||||||
|
<g>0.1</g>
|
||||||
|
<b>0.1</b>
|
||||||
|
</emissive>
|
||||||
|
<glyph> <name>cover</name> <left>0.00000</left> <right>0.625</right> </glyph>
|
||||||
|
</material>
|
||||||
|
|
||||||
<material>
|
<material>
|
||||||
<name>YellowSign.unlighted</name>
|
<name>YellowSign.unlighted</name>
|
||||||
|
|
|
@ -292,6 +292,8 @@ var fly_by_view_handler = {
|
||||||
} else {
|
} else {
|
||||||
# use actual distance
|
# use actual distance
|
||||||
dist = me.last.distance_to(pos);
|
dist = me.last.distance_to(pos);
|
||||||
|
# reset when too far (i.e. position changed due to skipping time in replay mode)
|
||||||
|
if (dist>5000) return me.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
# check if the aircraft has moved enough
|
# check if the aircraft has moved enough
|
||||||
|
|
63
Shaders/building-default.frag
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
// -*-C++-*-
|
||||||
|
|
||||||
|
// Ambient term comes in gl_Color.rgb.
|
||||||
|
#version 120
|
||||||
|
|
||||||
|
varying vec4 diffuse_term;
|
||||||
|
varying vec3 normal;
|
||||||
|
|
||||||
|
uniform sampler2D texture;
|
||||||
|
uniform sampler2D lightmap;
|
||||||
|
uniform float sunangle;
|
||||||
|
|
||||||
|
////fog "include" /////
|
||||||
|
uniform int fogType;
|
||||||
|
|
||||||
|
vec3 fog_Func(vec3 color, int type);
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
float luminance(vec3 color)
|
||||||
|
{
|
||||||
|
return dot(vec3(0.212671, 0.715160, 0.072169), color);
|
||||||
|
}
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec3 n;
|
||||||
|
float NdotL, NdotHV, fogFactor;
|
||||||
|
vec4 color = gl_Color;
|
||||||
|
vec3 lightDir = gl_LightSource[0].position.xyz;
|
||||||
|
vec3 halfVector = gl_LightSource[0].halfVector.xyz;
|
||||||
|
vec4 texel;
|
||||||
|
vec4 emissive;
|
||||||
|
vec4 fragColor;
|
||||||
|
vec4 specular = vec4(0.0);
|
||||||
|
|
||||||
|
// If gl_Color.a == 0, this is a back-facing polygon and the
|
||||||
|
// normal should be reversed.
|
||||||
|
n = (2.0 * gl_Color.a - 1.0) * normal;
|
||||||
|
n = normalize(n);
|
||||||
|
|
||||||
|
NdotL = dot(n, lightDir);
|
||||||
|
if (NdotL > 0.0) {
|
||||||
|
color += diffuse_term * NdotL;
|
||||||
|
NdotHV = max(dot(n, halfVector), 0.0);
|
||||||
|
if (gl_FrontMaterial.shininess > 0.0)
|
||||||
|
specular.rgb = (gl_FrontMaterial.specular.rgb
|
||||||
|
* gl_LightSource[0].specular.rgb
|
||||||
|
* pow(NdotHV, gl_FrontMaterial.shininess));
|
||||||
|
}
|
||||||
|
color.a = diffuse_term.a;
|
||||||
|
// This shouldn't be necessary, but our lighting becomes very
|
||||||
|
// saturated. Clamping the color before modulating by the texture
|
||||||
|
// is closer to what the OpenGL fixed function pipeline does.
|
||||||
|
color = clamp(color, 0.0, 1.0);
|
||||||
|
texel = texture2D(texture, gl_TexCoord[0].st);
|
||||||
|
emissive = texture2D(lightmap, gl_TexCoord[0].st);
|
||||||
|
|
||||||
|
// The lights are only switched on when the sun is below the horizon
|
||||||
|
fragColor = color * texel + specular + smoothstep(1.6, 1.8, sunangle) * emissive;
|
||||||
|
fragColor.rgb = fog_Func(fragColor.rgb, fogType);
|
||||||
|
|
||||||
|
gl_FragColor = fragColor;
|
||||||
|
}
|
|
@ -1,15 +1,15 @@
|
||||||
#extension GL_EXT_gpu_shader4 : enable
|
#extension GL_EXT_gpu_shader4 : enable
|
||||||
|
// -*- mode: C; -*-
|
||||||
|
// Licence: GPL v2
|
||||||
|
// Author: Frederic Bouvier.
|
||||||
//
|
//
|
||||||
// attachment 0: normal.x | normal.x | normal.y | normal.y
|
|
||||||
// attachment 1: diffuse.r | diffuse.g | diffuse.b | material Id
|
|
||||||
// attachment 2: specular.l | shininess | emission.l | unused
|
|
||||||
//
|
|
||||||
varying vec3 ecNormal;
|
varying vec3 ecNormal;
|
||||||
varying float alpha;
|
varying float alpha;
|
||||||
uniform int materialID;
|
uniform int materialID;
|
||||||
uniform sampler2D texture;
|
uniform sampler2D texture;
|
||||||
|
|
||||||
vec2 normal_encode(vec3 n);
|
void encode_gbuffer(vec3 normal, vec3 color, int mId, float specular, float shininess, float emission, float depth);
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
vec4 texel = texture2D(texture, gl_TexCoord[0].st);
|
vec4 texel = texture2D(texture, gl_TexCoord[0].st);
|
||||||
|
@ -19,8 +19,6 @@ void main() {
|
||||||
float shininess = gl_FrontMaterial.shininess;
|
float shininess = gl_FrontMaterial.shininess;
|
||||||
float emission = dot( gl_FrontLightModelProduct.sceneColor.rgb, vec3( 0.3, 0.59, 0.11 ) );
|
float emission = dot( gl_FrontLightModelProduct.sceneColor.rgb, vec3( 0.3, 0.59, 0.11 ) );
|
||||||
|
|
||||||
vec3 normal2 = normalize( (2.0 * gl_Color.a - 1.0) * ecNormal );
|
vec3 normal2 = normalize( (2.0 * gl_Color.a - 1.0) * ecNormal );
|
||||||
gl_FragData[0] = vec4( normal_encode(normal2), 0.0, 1.0 );
|
encode_gbuffer(normal2, gl_Color.rgb * texel.rgb, materialID, specular, shininess, emission, gl_FragCoord.z);
|
||||||
gl_FragData[1] = vec4( gl_Color.rgb * texel.rgb, float( materialID ) / 255.0 );
|
|
||||||
gl_FragData[2] = vec4( specular, shininess / 128.0, emission, 1.0 );
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
// -*- mode: C; -*-
|
||||||
|
// Licence: GPL v2
|
||||||
|
// Author: Frederic Bouvier.
|
||||||
//
|
//
|
||||||
// attachment 0: normal.x | normal.x | normal.y | normal.y
|
|
||||||
// attachment 1: diffuse.r | diffuse.g | diffuse.b | material Id
|
|
||||||
// attachment 2: specular.l | shininess | emission.l | unused
|
|
||||||
//
|
|
||||||
varying vec3 ecNormal;
|
varying vec3 ecNormal;
|
||||||
varying float alpha;
|
varying float alpha;
|
||||||
void main() {
|
void main() {
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
//
|
//
|
||||||
uniform int materialID;
|
uniform int materialID;
|
||||||
uniform sampler2D texture;
|
uniform sampler2D texture;
|
||||||
|
void encode_gbuffer(vec3 normal, vec3 color, int mId, float specular, float shininess, float emission, float depth);
|
||||||
void main() {
|
void main() {
|
||||||
vec4 texel = texture2D(texture, gl_TexCoord[0].st);
|
vec4 texel = texture2D(texture, gl_TexCoord[0].st);
|
||||||
if (texel.a < 0.1)
|
if (texel.a < 0.1)
|
||||||
|
@ -14,9 +15,6 @@ void main() {
|
||||||
float shininess = 0.1;
|
float shininess = 0.1;
|
||||||
float emission = 0.0;
|
float emission = 0.0;
|
||||||
|
|
||||||
// Normal is straight towards the viewer.
|
// Normal is straight towards the viewer. (FB: Are they really billboards ? )
|
||||||
vec3 normal2 = vec3(0.0, 0.0, 0.0);
|
encode_gbuffer(vec3(0.5, 0.5, 0.0), gl_Color.rgb * texel.rgb, materialID, specular, shininess, emission, gl_FragCoord.z);
|
||||||
gl_FragData[0] = vec4( 0.5, 0.5, 0.0, 1.0 );
|
|
||||||
gl_FragData[1] = vec4( gl_Color.rgb * texel.rgb, float( materialID ) / 255.0 );
|
|
||||||
gl_FragData[2] = vec4( specular, shininess / 255.0, emission, 1.0 );
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ uniform sampler2D lighting_tex;
|
||||||
//uniform sampler2D ao_tex;
|
//uniform sampler2D ao_tex;
|
||||||
uniform float exposure;
|
uniform float exposure;
|
||||||
uniform bool showBuffers;
|
uniform bool showBuffers;
|
||||||
|
uniform bool fg_DepthInColor;
|
||||||
|
|
||||||
vec3 HDR(vec3 L) {
|
vec3 HDR(vec3 L) {
|
||||||
L = L * exposure;
|
L = L * exposure;
|
||||||
|
@ -19,22 +20,22 @@ vec3 HDR(vec3 L) {
|
||||||
void main() {
|
void main() {
|
||||||
vec2 coords = gl_TexCoord[0].xy;
|
vec2 coords = gl_TexCoord[0].xy;
|
||||||
vec4 color;
|
vec4 color;
|
||||||
if (showBuffers) {
|
if (showBuffers) {
|
||||||
if (coords.x < 0.2 && coords.y < 0.2) {
|
if (coords.x < 0.2 && coords.y < 0.2) {
|
||||||
color = texture2D( normal_tex, coords * 5.0 );
|
color = texture2D( normal_tex, coords * 5.0 );
|
||||||
} else if (coords.x >= 0.8 && coords.y >= 0.8) {
|
} else if (coords.x >= 0.8 && coords.y >= 0.8) {
|
||||||
color = texture2D( specular_tex, (coords - vec2( 0.8, 0.8 )) * 5.0 );
|
color = texture2D( specular_tex, (coords - vec2( 0.8, 0.8 )) * 5.0 );
|
||||||
} else if (coords.x >= 0.8 && coords.y < 0.2) {
|
} else if (coords.x >= 0.8 && coords.y < 0.2) {
|
||||||
color = texture2D( color_tex, (coords - vec2( 0.8, 0.0 )) * 5.0 );
|
color = texture2D( color_tex, (coords - vec2( 0.8, 0.0 )) * 5.0 );
|
||||||
// } else if (coords.x < 0.2 && coords.y >= 0.8) {
|
} else if (coords.x < 0.2 && coords.y >= 0.8 && fg_DepthInColor) {
|
||||||
// color = texture2D( ao_tex, (coords - vec2( 0.0, 0.8 )) * 5.0 );
|
color = texture2D( depth_tex, (coords - vec2( 0.0, 0.8 )) * 5.0 );
|
||||||
} else {
|
} else {
|
||||||
color = texture2D( lighting_tex, coords ) /* + texture2D( bloom_tex, coords ) */;
|
color = texture2D( lighting_tex, coords ) /* + texture2D( bloom_tex, coords ) */;
|
||||||
//color = vec4( HDR( color.rgb ), 1.0 );
|
//color = vec4( HDR( color.rgb ), 1.0 );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
color = texture2D( lighting_tex, coords ) /* + texture2D( bloom_tex, coords ) */;
|
color = texture2D( lighting_tex, coords ) /* + texture2D( bloom_tex, coords ) */;
|
||||||
//color = vec4( HDR( color.rgb ), 1.0 );
|
//color = vec4( HDR( color.rgb ), 1.0 );
|
||||||
}
|
}
|
||||||
gl_FragColor = color;
|
gl_FragColor = color;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ uniform float fg_FogDensity;
|
||||||
uniform vec3 fg_Planes;
|
uniform vec3 fg_Planes;
|
||||||
varying vec3 ray;
|
varying vec3 ray;
|
||||||
|
|
||||||
vec3 position( vec3 viewdir, float depth );
|
vec3 position( vec3 viewDir, vec2 coords, sampler2D depth_tex );
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
vec2 coords = gl_TexCoord[0].xy;
|
vec2 coords = gl_TexCoord[0].xy;
|
||||||
|
@ -15,11 +15,7 @@ void main() {
|
||||||
if ( initialized < 0.1 )
|
if ( initialized < 0.1 )
|
||||||
discard;
|
discard;
|
||||||
vec3 normal;
|
vec3 normal;
|
||||||
normal.xy = texture2D( normal_tex, coords ).rg * 2.0 - vec2(1.0,1.0);
|
vec3 pos = position( normalize(ray), coords, depth_tex );
|
||||||
normal.z = sqrt( 1.0 - dot( normal.xy, normal.xy ) );
|
|
||||||
float len = length(normal);
|
|
||||||
normal /= len;
|
|
||||||
vec3 pos = position( normalize(ray), texture2D( depth_tex, coords ).r );
|
|
||||||
|
|
||||||
float fogFactor = 0.0;
|
float fogFactor = 0.0;
|
||||||
const float LOG2 = 1.442695;
|
const float LOG2 = 1.442695;
|
||||||
|
|
24
Shaders/gbuffer-encode.frag
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
// -*- mode: C; -*-
|
||||||
|
// Licence: GPL v2
|
||||||
|
// Author: Frederic Bouvier.
|
||||||
|
|
||||||
|
uniform bool fg_DepthInColor;
|
||||||
|
|
||||||
|
vec2 normal_encode(vec3 n);
|
||||||
|
vec3 float_to_color(in float f);
|
||||||
|
|
||||||
|
// attachment 0: normal.x | normal.y | 0.0 | 1.0
|
||||||
|
// attachment 1: diffuse.r | diffuse.g | diffuse.b | material Id
|
||||||
|
// attachment 2: specular.l | shininess | emission.l | unused
|
||||||
|
// attachment 3: ---------- depth ------------ | unused (optional)
|
||||||
|
//
|
||||||
|
void encode_gbuffer(vec3 normal, vec3 color, int mId, float specular, float shininess, float emission, float depth)
|
||||||
|
{
|
||||||
|
gl_FragData[0] = vec4( normal_encode(normal), 0.0, 1.0 );
|
||||||
|
gl_FragData[1] = vec4( color, float( mId ) / 255.0 );
|
||||||
|
gl_FragData[2] = vec4( specular, shininess / 128.0, emission, 1.0 );
|
||||||
|
vec3 dcol = vec3(1.0, 1.0, 1.0);
|
||||||
|
if (fg_DepthInColor)
|
||||||
|
dcol = float_to_color(depth);
|
||||||
|
gl_FragData[3] = vec4(dcol, 1.0);
|
||||||
|
}
|
|
@ -1,4 +1,9 @@
|
||||||
|
// -*- mode: C; -*-
|
||||||
|
// Licence: GPL v2
|
||||||
|
// Author: Frederic Bouvier.
|
||||||
|
|
||||||
uniform vec3 fg_Planes;
|
uniform vec3 fg_Planes;
|
||||||
|
uniform bool fg_DepthInColor;
|
||||||
|
|
||||||
// normal compression functions from
|
// normal compression functions from
|
||||||
// http://aras-p.info/texts/CompactNormalStorage.html#method04spheremap
|
// http://aras-p.info/texts/CompactNormalStorage.html#method04spheremap
|
||||||
|
@ -19,10 +24,46 @@ vec3 normal_decode(vec2 enc)
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// depth to color encoding and decoding functions from
|
||||||
|
// Deferred Shading Tutorial by Fabio Policarpo and Francisco Fonseca
|
||||||
|
// (corrected by Frederic Bouvier)
|
||||||
|
vec3 float_to_color(in float f)
|
||||||
|
{
|
||||||
|
vec3 color;
|
||||||
|
f *= 255.0;
|
||||||
|
color.x = floor(f);
|
||||||
|
f = (f-color.x)*255.0;
|
||||||
|
color.y = floor(f);
|
||||||
|
color.z = f-color.y;
|
||||||
|
color.xy /= 255.0;
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
|
||||||
|
float color_to_float(vec3 color)
|
||||||
|
{
|
||||||
|
const vec3 byte_to_float = vec3(1.0, 1.0/255.0, 1.0/(255.0*255.0));
|
||||||
|
return dot(color,byte_to_float);
|
||||||
|
}
|
||||||
|
|
||||||
vec3 position( vec3 viewDir, float depth )
|
vec3 position( vec3 viewDir, float depth )
|
||||||
{
|
{
|
||||||
vec3 pos;
|
vec3 pos;
|
||||||
pos.z = - fg_Planes.y / (fg_Planes.x + depth * fg_Planes.z);
|
pos.z = - fg_Planes.y / (fg_Planes.x + depth * fg_Planes.z);
|
||||||
pos.xy = viewDir.xy / viewDir.z * pos.z;
|
pos.xy = viewDir.xy / viewDir.z * pos.z;
|
||||||
return pos;
|
return pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
vec3 position( vec3 viewDir, vec3 depthColor )
|
||||||
|
{
|
||||||
|
return position( viewDir, color_to_float(depthColor) );
|
||||||
|
}
|
||||||
|
|
||||||
|
vec3 position( vec3 viewDir, vec2 coords, sampler2D depth_tex )
|
||||||
|
{
|
||||||
|
float depth;
|
||||||
|
if (fg_DepthInColor)
|
||||||
|
depth = color_to_float( texture2D( depth_tex, coords ).rgb );
|
||||||
|
else
|
||||||
|
depth = texture2D( depth_tex, coords ).r;
|
||||||
|
return position( viewDir, depth );
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ uniform float Far;
|
||||||
|
|
||||||
varying vec4 ecPosition;
|
varying vec4 ecPosition;
|
||||||
|
|
||||||
vec3 position( vec3 viewdir, float depth );
|
vec3 position( vec3 viewDir, vec2 coords, sampler2D depth_tex );
|
||||||
vec3 normal_decode(vec2 enc);
|
vec3 normal_decode(vec2 enc);
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
@ -27,7 +27,7 @@ void main() {
|
||||||
vec3 normal = normal_decode(texture2D( normal_tex, coords ).rg);
|
vec3 normal = normal_decode(texture2D( normal_tex, coords ).rg);
|
||||||
vec4 spec_emis = texture2D( spec_emis_tex, coords );
|
vec4 spec_emis = texture2D( spec_emis_tex, coords );
|
||||||
|
|
||||||
vec3 pos = position(viewDir, texture2D( depth_tex, coords ).r);
|
vec3 pos = position(viewDir, coords, depth_tex);
|
||||||
|
|
||||||
if ( pos.z < ecPos3.z ) // Negative direction in z
|
if ( pos.z < ecPos3.z ) // Negative direction in z
|
||||||
discard; // Don't light surface outside the light volume
|
discard; // Don't light surface outside the light volume
|
||||||
|
|
|
@ -19,7 +19,7 @@ uniform float Far;
|
||||||
|
|
||||||
varying vec4 ecPosition;
|
varying vec4 ecPosition;
|
||||||
|
|
||||||
vec3 position( vec3 viewdir, float depth );
|
vec3 position( vec3 viewDir, vec2 coords, sampler2D depth_tex );
|
||||||
vec3 normal_decode(vec2 enc);
|
vec3 normal_decode(vec2 enc);
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
@ -31,7 +31,7 @@ void main() {
|
||||||
vec3 normal = normal_decode(texture2D( normal_tex, coords ).rg);
|
vec3 normal = normal_decode(texture2D( normal_tex, coords ).rg);
|
||||||
vec4 spec_emis = texture2D( spec_emis_tex, coords );
|
vec4 spec_emis = texture2D( spec_emis_tex, coords );
|
||||||
|
|
||||||
vec3 pos = position(viewDir, texture2D( depth_tex, coords ).r);
|
vec3 pos = position(viewDir, coords, depth_tex);
|
||||||
|
|
||||||
if ( pos.z < ecPos3.z ) // Negative direction in z
|
if ( pos.z < ecPos3.z ) // Negative direction in z
|
||||||
discard; // Don't light surface outside the light volume
|
discard; // Don't light surface outside the light volume
|
||||||
|
|
|
@ -12,7 +12,7 @@ uniform int fg_ShadowNumber;
|
||||||
uniform vec4 fg_ShadowDistances;
|
uniform vec4 fg_ShadowDistances;
|
||||||
varying vec3 ray;
|
varying vec3 ray;
|
||||||
|
|
||||||
vec3 position( vec3 viewdir, float depth );
|
vec3 position( vec3 viewDir, vec2 coords, sampler2D depth_tex );
|
||||||
vec3 normal_decode(vec2 enc);
|
vec3 normal_decode(vec2 enc);
|
||||||
|
|
||||||
vec4 DynamicShadow( in vec4 ecPosition, out vec4 tint )
|
vec4 DynamicShadow( in vec4 ecPosition, out vec4 tint )
|
||||||
|
@ -57,7 +57,7 @@ void main() {
|
||||||
float len = length(normal);
|
float len = length(normal);
|
||||||
normal /= len;
|
normal /= len;
|
||||||
vec3 viewDir = normalize(ray);
|
vec3 viewDir = normalize(ray);
|
||||||
vec3 pos = position( viewDir, texture2D( depth_tex, coords ).r );
|
vec3 pos = position( viewDir, coords, depth_tex );
|
||||||
|
|
||||||
vec4 tint;
|
vec4 tint;
|
||||||
float shadow = shadow2DProj( shadow_tex, DynamicShadow( vec4( pos, 1.0 ), tint ) ).r;
|
float shadow = shadow2DProj( shadow_tex, DynamicShadow( vec4( pos, 1.0 ), tint ) ).r;
|
||||||
|
|
|
@ -8,23 +8,19 @@ uniform vec4 fg_SunSpecularColor;
|
||||||
uniform vec3 fg_SunDirection;
|
uniform vec3 fg_SunDirection;
|
||||||
uniform vec3 fg_Planes;
|
uniform vec3 fg_Planes;
|
||||||
varying vec3 ray;
|
varying vec3 ray;
|
||||||
|
|
||||||
|
vec3 normal_decode(vec2 enc);
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
vec2 coords = gl_TexCoord[0].xy;
|
vec2 coords = gl_TexCoord[0].xy;
|
||||||
vec4 spec_emis = texture2D( spec_emis_tex, coords );
|
vec4 spec_emis = texture2D( spec_emis_tex, coords );
|
||||||
if ( spec_emis.a < 0.1 )
|
if ( spec_emis.a < 0.1 )
|
||||||
discard;
|
discard;
|
||||||
vec3 normal;
|
vec3 normal = normal_decode(texture2D( normal_tex, coords ).rg);
|
||||||
normal.xy = texture2D( normal_tex, coords ).rg * 2.0 - vec2(1.0,1.0);
|
|
||||||
normal.z = sqrt( 1.0 - dot( normal.xy, normal.xy ) );
|
|
||||||
float len = length(normal);
|
float len = length(normal);
|
||||||
normal /= len;
|
normal /= len;
|
||||||
vec3 viewDir = normalize(ray);
|
vec3 viewDir = normalize(ray);
|
||||||
float depth = texture2D( depth_tex, coords ).r;
|
|
||||||
vec3 pos;
|
|
||||||
pos.z = - fg_Planes.y / (fg_Planes.x + depth * fg_Planes.z);
|
|
||||||
pos.xy = viewDir.xy / viewDir.z * pos.z;
|
|
||||||
|
|
||||||
vec4 tint;
|
|
||||||
vec3 lightDir = (fg_ViewMatrix * vec4( fg_SunDirection, 0.0 )).xyz;
|
vec3 lightDir = (fg_ViewMatrix * vec4( fg_SunDirection, 0.0 )).xyz;
|
||||||
lightDir = normalize( lightDir );
|
lightDir = normalize( lightDir );
|
||||||
vec3 color = texture2D( color_tex, coords ).rgb;
|
vec3 color = texture2D( color_tex, coords ).rgb;
|
||||||
|
|
74
Shaders/sunlight-simple.frag
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
uniform mat4 fg_ViewMatrix;
|
||||||
|
uniform sampler2D depth_tex;
|
||||||
|
uniform sampler2D normal_tex;
|
||||||
|
uniform sampler2D color_tex;
|
||||||
|
uniform sampler2D spec_emis_tex;
|
||||||
|
uniform sampler2DShadow shadow_tex;
|
||||||
|
uniform vec4 fg_SunDiffuseColor;
|
||||||
|
uniform vec4 fg_SunSpecularColor;
|
||||||
|
uniform vec3 fg_SunDirection;
|
||||||
|
uniform vec3 fg_Planes;
|
||||||
|
uniform vec4 fg_ShadowDistances;
|
||||||
|
uniform int filtering;
|
||||||
|
|
||||||
|
varying vec3 ray;
|
||||||
|
varying vec4 eyePlaneS;
|
||||||
|
varying vec4 eyePlaneT;
|
||||||
|
varying vec4 eyePlaneR;
|
||||||
|
varying vec4 eyePlaneQ;
|
||||||
|
|
||||||
|
vec3 position( vec3 viewDir, vec2 coords, sampler2D depth_tex );
|
||||||
|
vec3 normal_decode(vec2 enc);
|
||||||
|
|
||||||
|
vec4 DynamicShadow( in vec4 ecPosition, out vec4 tint )
|
||||||
|
{
|
||||||
|
vec4 coords;
|
||||||
|
if (ecPosition.z > -fg_ShadowDistances.x) {
|
||||||
|
tint = vec4(0.0,1.0,0.0,1.0);
|
||||||
|
coords.s = dot( ecPosition, eyePlaneS );
|
||||||
|
coords.t = dot( ecPosition, eyePlaneT );
|
||||||
|
coords.p = dot( ecPosition, eyePlaneR );
|
||||||
|
coords.q = dot( ecPosition, eyePlaneQ );
|
||||||
|
} else {
|
||||||
|
return vec4(1.1,1.1,0.0,1.0); // outside, clamp to border
|
||||||
|
}
|
||||||
|
return coords;
|
||||||
|
}
|
||||||
|
void main() {
|
||||||
|
vec2 coords = gl_TexCoord[0].xy;
|
||||||
|
vec4 spec_emis = texture2D( spec_emis_tex, coords );
|
||||||
|
if ( spec_emis.a < 0.1 )
|
||||||
|
discard;
|
||||||
|
vec3 normal = normal_decode(texture2D( normal_tex, coords ).rg);
|
||||||
|
float len = length(normal);
|
||||||
|
normal /= len;
|
||||||
|
vec3 viewDir = normalize(ray);
|
||||||
|
vec3 pos = position( viewDir, coords, depth_tex );
|
||||||
|
|
||||||
|
vec4 tint;
|
||||||
|
float shadow;
|
||||||
|
if (filtering == 2) {
|
||||||
|
shadow += 0.333 * shadow2DProj( shadow_tex, DynamicShadow( vec4(pos, 1.0), tint ) ).r;
|
||||||
|
shadow += 0.166 * shadow2DProj( shadow_tex, DynamicShadow( vec4(pos + vec3(-0.003 * pos.z, -0.002 * pos.z, 0), 1.0), tint ) ).r;
|
||||||
|
shadow += 0.166 * shadow2DProj( shadow_tex, DynamicShadow( vec4(pos + vec3( 0.003 * pos.z, 0.002 * pos.z, 0), 1.0), tint ) ).r;
|
||||||
|
shadow += 0.166 * shadow2DProj( shadow_tex, DynamicShadow( vec4(pos + vec3(-0.003 * pos.z, 0.002 * pos.z, 0), 1.0), tint ) ).r;
|
||||||
|
shadow += 0.166 * shadow2DProj( shadow_tex, DynamicShadow( vec4(pos + vec3( 0.003 * pos.z, -0.002 * pos.z, 0), 1.0), tint ) ).r;
|
||||||
|
} else {
|
||||||
|
shadow = shadow2DProj( shadow_tex, DynamicShadow( vec4( pos, 1.0 ), tint ) ).r;
|
||||||
|
}
|
||||||
|
|
||||||
|
vec3 lightDir = (fg_ViewMatrix * vec4( fg_SunDirection, 0.0 )).xyz;
|
||||||
|
lightDir = normalize( lightDir );
|
||||||
|
vec3 color = texture2D( color_tex, coords ).rgb;
|
||||||
|
vec3 Idiff = clamp( dot( lightDir, normal ), 0.0, 1.0 ) * color * fg_SunDiffuseColor.rgb;
|
||||||
|
vec3 halfDir = lightDir - viewDir;
|
||||||
|
len = length( halfDir );
|
||||||
|
vec3 Ispec = vec3(0.0);
|
||||||
|
vec3 Iemis = spec_emis.z * color;
|
||||||
|
if (len > 0.0001) {
|
||||||
|
halfDir /= len;
|
||||||
|
Ispec = pow( clamp( dot( halfDir, normal ), 0.0, 1.0 ), spec_emis.y * 128.0 ) * spec_emis.x * fg_SunSpecularColor.rgb;
|
||||||
|
}
|
||||||
|
gl_FragColor = vec4(mix(vec3(0.0), Idiff + Ispec, shadow) + Iemis, 1.0);
|
||||||
|
// gl_FragColor = mix(tint, vec4(mix(vec3(0.0), Idiff + Ispec, shadow) + Iemis, 1.0), 0.92);
|
||||||
|
}
|
19
Shaders/sunlight-simple.vert
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
//uniform mat4 fg_ViewMatrixInverse;
|
||||||
|
uniform mat4 fg_ProjectionMatrixInverse;
|
||||||
|
varying vec3 ray;
|
||||||
|
varying vec4 eyePlaneS;
|
||||||
|
varying vec4 eyePlaneT;
|
||||||
|
varying vec4 eyePlaneR;
|
||||||
|
varying vec4 eyePlaneQ;
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
gl_Position = gl_Vertex;
|
||||||
|
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||||
|
// ray = (fg_ViewMatrixInverse * vec4((fg_ProjectionMatrixInverse * gl_Vertex).xyz, 0.0)).xyz;
|
||||||
|
ray = (fg_ProjectionMatrixInverse * gl_Vertex).xyz;
|
||||||
|
|
||||||
|
eyePlaneS = gl_EyePlaneS[1];
|
||||||
|
eyePlaneT = gl_EyePlaneT[1];
|
||||||
|
eyePlaneR = gl_EyePlaneR[1];
|
||||||
|
eyePlaneQ = gl_EyePlaneQ[1];
|
||||||
|
}
|
|
@ -14,7 +14,7 @@ uniform vec4 fg_ShadowDistances;
|
||||||
uniform int filtering;
|
uniform int filtering;
|
||||||
varying vec3 ray;
|
varying vec3 ray;
|
||||||
|
|
||||||
vec3 position( vec3 viewdir, float depth );
|
vec3 position( vec3 viewDir, vec2 coords, sampler2D depth_tex );
|
||||||
vec3 normal_decode(vec2 enc);
|
vec3 normal_decode(vec2 enc);
|
||||||
|
|
||||||
vec4 DynamicShadow( in vec4 ecPosition, out vec4 tint )
|
vec4 DynamicShadow( in vec4 ecPosition, out vec4 tint )
|
||||||
|
@ -59,7 +59,7 @@ void main() {
|
||||||
float len = length(normal);
|
float len = length(normal);
|
||||||
normal /= len;
|
normal /= len;
|
||||||
vec3 viewDir = normalize(ray);
|
vec3 viewDir = normalize(ray);
|
||||||
vec3 pos = position( viewDir, texture2D( depth_tex, coords ).r );
|
vec3 pos = position( viewDir, coords, depth_tex );
|
||||||
|
|
||||||
vec4 tint;
|
vec4 tint;
|
||||||
float shadow = 0.0;
|
float shadow = 0.0;
|
||||||
|
|
|
@ -56,7 +56,7 @@ uniform vec3 dirt_g_color;
|
||||||
uniform vec3 dirt_b_color;
|
uniform vec3 dirt_b_color;
|
||||||
|
|
||||||
//uniform vec4 fg_SunAmbientColor;
|
//uniform vec4 fg_SunAmbientColor;
|
||||||
vec2 normal_encode(vec3 n);
|
void encode_gbuffer(vec3 normal, vec3 color, int mId, float specular, float shininess, float emission, float depth);
|
||||||
|
|
||||||
///fog include//////////////////////
|
///fog include//////////////////////
|
||||||
uniform int fogType;
|
uniform int fogType;
|
||||||
|
@ -76,7 +76,8 @@ void main (void)
|
||||||
//vec3 ambient = fg_SunAmbientColor.rgb;
|
//vec3 ambient = fg_SunAmbientColor.rgb;
|
||||||
vec3 N;
|
vec3 N;
|
||||||
vec3 dotN;
|
vec3 dotN;
|
||||||
float emission = dot( gl_FrontLightModelProduct.sceneColor.rgb + gl_FrontMaterial.emission , vec3( 0.3, 0.59, 0.11 ) );
|
float emission = dot( gl_FrontLightModelProduct.sceneColor.rgb + gl_FrontMaterial.emission,
|
||||||
|
vec3( 0.3, 0.59, 0.11 ) );
|
||||||
float pf;
|
float pf;
|
||||||
|
|
||||||
///BEGIN bump
|
///BEGIN bump
|
||||||
|
@ -108,9 +109,9 @@ void main (void)
|
||||||
reflFactor = reflmap.a + transparency_offset;
|
reflFactor = reflmap.a + transparency_offset;
|
||||||
} else if (nmap_enabled > 0) {
|
} else if (nmap_enabled > 0) {
|
||||||
// set the reflectivity proportional to shininess with user input
|
// set the reflectivity proportional to shininess with user input
|
||||||
reflFactor = (gl_FrontMaterial.shininess / 128.0) * nmap.a + transparency_offset;
|
reflFactor = gl_FrontMaterial.shininess * 0.0078125 * nmap.a + transparency_offset;
|
||||||
} else {
|
} else {
|
||||||
reflFactor = gl_FrontMaterial.shininess/128.0 + transparency_offset;
|
reflFactor = gl_FrontMaterial.shininess * 0.0078125 + transparency_offset;
|
||||||
}
|
}
|
||||||
reflFactor = clamp(reflFactor, 0.0, 1.0);
|
reflFactor = clamp(reflFactor, 0.0, 1.0);
|
||||||
|
|
||||||
|
@ -130,17 +131,16 @@ void main (void)
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
//begin DIRT
|
//begin DIRT
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
if (dirt_enabled > 0.0){
|
if (dirt_enabled > 0.0){
|
||||||
float dirtFactorR = reflmap.r * dirt_r_factor;
|
vec3 dirtFactorIn = vec3 (dirt_r_factor, dirt_g_factor, dirt_b_factor);
|
||||||
dirtFactorR = smoothstep(0.0, 1.0, dirtFactorR);
|
vec3 dirtFactor = reflmap.rgb * dirtFactorIn.rgb;
|
||||||
mixedcolor.rgb = mix(mixedcolor.rgb, dirt_r_color, dirtFactorR);
|
//dirtFactor.r = smoothstep(0.0, 1.0, dirtFactor.r);
|
||||||
|
mixedcolor.rgb = mix(mixedcolor.rgb, dirt_r_color, smoothstep(0.0, 1.0, dirtFactor.r));
|
||||||
if (dirt_multi > 0) {
|
if (dirt_multi > 0) {
|
||||||
float dirtFactorG = reflmap.g * dirt_g_factor;
|
//dirtFactor.g = smoothstep(0.0, 1.0, dirtFactor.g);
|
||||||
float dirtFactorB = reflmap.b * dirt_b_factor;
|
//dirtFactor.b = smoothstep(0.0, 1.0, dirtFactor.b);
|
||||||
dirtFactorG = smoothstep(0.0, 1.0, dirtFactorG);
|
mixedcolor.rgb = mix(mixedcolor.rgb, dirt_g_color, smoothstep(0.0, 1.0, dirtFactor.g));
|
||||||
dirtFactorB = smoothstep(0.0, 1.0, dirtFactorB);
|
mixedcolor.rgb = mix(mixedcolor.rgb, dirt_b_color, smoothstep(0.0, 1.0, dirtFactor.b));
|
||||||
mixedcolor.rgb = mix(mixedcolor.rgb, dirt_g_color, dirtFactorG);
|
|
||||||
mixedcolor.rgb = mix(mixedcolor.rgb, dirt_b_color, dirtFactorB);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
@ -162,25 +162,27 @@ void main (void)
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
if ( lightmap_enabled >= 1 ) {
|
if ( lightmap_enabled >= 1 ) {
|
||||||
vec3 lightmapcolor;
|
vec3 lightmapcolor;
|
||||||
|
vec4 lightmapFactor = vec4(lightmap_r_factor, lightmap_g_factor, lightmap_b_factor, lightmap_a_factor);
|
||||||
|
lightmapFactor = lightmapFactor * lightmapTexel;
|
||||||
if (lightmap_multi >0 ){
|
if (lightmap_multi >0 ){
|
||||||
lightmapcolor = lightmap_r_color * lightmap_r_factor * lightmapTexel.r +
|
lightmapcolor = lightmap_r_color * lightmapFactor.r +
|
||||||
lightmap_g_color * lightmap_g_factor * lightmapTexel.g +
|
lightmap_g_color * lightmapFactor.g +
|
||||||
lightmap_b_color * lightmap_b_factor * lightmapTexel.b +
|
lightmap_b_color * lightmapFactor.b +
|
||||||
lightmap_a_color * lightmap_a_factor * lightmapTexel.a ;
|
lightmap_a_color * lightmapFactor.a ;
|
||||||
emission = max(max(lightmap_r_factor * lightmapTexel.r, lightmap_g_factor * lightmapTexel.g),max( lightmap_b_factor * lightmapTexel.b, lightmap_a_factor * lightmapTexel.a));
|
emission = max(max(lightmapFactor.r * lightmapTexel.r, lightmapFactor.g * lightmapTexel.g),
|
||||||
|
max( lightmapFactor.b * lightmapTexel.b, lightmapFactor.a * lightmapTexel.a));
|
||||||
} else {
|
} else {
|
||||||
lightmapcolor = lightmapTexel.r * lightmap_r_color * lightmap_r_factor;
|
lightmapcolor = lightmapTexel.rgb * lightmap_r_color * lightmapFactor.r;
|
||||||
emission = lightmapTexel.r * lightmap_r_factor;
|
emission = lightmapTexel.r * lightmapFactor.r;
|
||||||
}
|
}
|
||||||
//fragColor.rgb = max(fragColor.rgb, lightmapcolor * gl_FrontMaterial.diffuse.rgb * mixedcolor);
|
//fragColor.rgb = max(fragColor.rgb, lightmapcolor * gl_FrontMaterial.diffuse.rgb * mixedcolor);
|
||||||
emission = length(lightmapcolor);
|
emission = length(lightmapcolor);
|
||||||
fragColor.rgb = max(fragColor.rgb * (1.0 - emission), lightmapcolor * gl_FrontMaterial.diffuse.rgb * mixedcolor);
|
fragColor.rgb = max(fragColor.rgb * (1.0 - emission),
|
||||||
|
lightmapcolor * gl_FrontMaterial.diffuse.rgb * mixedcolor);
|
||||||
}
|
}
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// END lightmap
|
// END lightmap
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
gl_FragData[0]=vec4(normal_encode(N), 0.0, 1.0);
|
encode_gbuffer(N, fragColor.rgb, 1, specular, gl_FrontMaterial.shininess, emission, gl_FragCoord.z);
|
||||||
gl_FragData[1]=vec4(fragColor.rgb,1.0/255.0);
|
|
||||||
gl_FragData[2]=vec4(specular, gl_FrontMaterial.shininess/128.0, emission, 1.0);
|
|
||||||
}
|
}
|
|
@ -78,7 +78,7 @@ void main (void)
|
||||||
N = nmap.rgb * 2.0 - 1.0;
|
N = nmap.rgb * 2.0 - 1.0;
|
||||||
N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal);
|
N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal);
|
||||||
if (nmap_dds > 0)
|
if (nmap_dds > 0)
|
||||||
N = -N;
|
N = -N;
|
||||||
} else {
|
} else {
|
||||||
N = normalize(VNormal);
|
N = normalize(VNormal);
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,8 @@ void main (void)
|
||||||
float nDotVP = max(0.0, dot(N, normalize(gl_LightSource[0].position.xyz)));
|
float nDotVP = max(0.0, dot(N, normalize(gl_LightSource[0].position.xyz)));
|
||||||
float nDotHV = max(0.0, dot(N, normalize(gl_LightSource[0].halfVector.xyz)));
|
float nDotHV = max(0.0, dot(N, normalize(gl_LightSource[0].halfVector.xyz)));
|
||||||
//glare on the backside of tranparent objects
|
//glare on the backside of tranparent objects
|
||||||
if ((gl_FrontMaterial.diffuse.a < 1.0 || texel.a < 1.0) && dot(N, normalize(gl_LightSource[0].position.xyz)) < 0.0) {
|
if ((gl_FrontMaterial.diffuse.a < 1.0 || texel.a < 1.0)
|
||||||
|
&& dot(N, normalize(gl_LightSource[0].position.xyz)) < 0.0) {
|
||||||
nDotVP = max(0.0, dot(-N, normalize(gl_LightSource[0].position.xyz)));
|
nDotVP = max(0.0, dot(-N, normalize(gl_LightSource[0].position.xyz)));
|
||||||
nDotHV = max(0.0, dot(-N, normalize(gl_LightSource[0].halfVector.xyz)));
|
nDotHV = max(0.0, dot(-N, normalize(gl_LightSource[0].halfVector.xyz)));
|
||||||
}
|
}
|
||||||
|
@ -122,9 +123,9 @@ void main (void)
|
||||||
reflFactor = reflmap.a + transparency_offset;
|
reflFactor = reflmap.a + transparency_offset;
|
||||||
} else if (nmap_enabled > 0 && shader_qual > 2) {
|
} else if (nmap_enabled > 0 && shader_qual > 2) {
|
||||||
// set the reflectivity proportional to shininess with user input
|
// set the reflectivity proportional to shininess with user input
|
||||||
reflFactor = (gl_FrontMaterial.shininess / 128.0) * nmap.a + transparency_offset;
|
reflFactor = gl_FrontMaterial.shininess * 0.0078125 * nmap.a + transparency_offset;
|
||||||
} else {
|
} else {
|
||||||
reflFactor = gl_FrontMaterial.shininess/128.0 + transparency_offset;
|
reflFactor = gl_FrontMaterial.shininess* 0.0078125 + transparency_offset;
|
||||||
}
|
}
|
||||||
reflFactor = clamp(reflFactor, 0.0, 1.0);
|
reflFactor = clamp(reflFactor, 0.0, 1.0);
|
||||||
|
|
||||||
|
@ -148,16 +149,15 @@ void main (void)
|
||||||
//begin DIRT
|
//begin DIRT
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
if (dirt_enabled > 0.0){
|
if (dirt_enabled > 0.0){
|
||||||
float dirtFactorR = reflmap.r * dirt_r_factor;
|
vec3 dirtFactorIn = vec3 (dirt_r_factor, dirt_g_factor, dirt_b_factor);
|
||||||
dirtFactorR = smoothstep(0.0, 1.0, dirtFactorR);
|
vec3 dirtFactor = reflmap.rgb * dirtFactorIn.rgb;
|
||||||
mixedcolor.rgb = mix(mixedcolor.rgb, dirt_r_color, dirtFactorR);
|
//dirtFactor.r = smoothstep(0.0, 1.0, dirtFactor.r);
|
||||||
|
mixedcolor.rgb = mix(mixedcolor.rgb, dirt_r_color, smoothstep(0.0, 1.0, dirtFactor.r));
|
||||||
if (dirt_multi > 0) {
|
if (dirt_multi > 0) {
|
||||||
float dirtFactorG = reflmap.g * dirt_g_factor;
|
//dirtFactor.g = smoothstep(0.0, 1.0, dirtFactor.g);
|
||||||
float dirtFactorB = reflmap.b * dirt_b_factor;
|
//dirtFactor.b = smoothstep(0.0, 1.0, dirtFactor.b);
|
||||||
dirtFactorG = smoothstep(0.0, 1.0, dirtFactorG);
|
mixedcolor.rgb = mix(mixedcolor.rgb, dirt_g_color, smoothstep(0.0, 1.0, dirtFactor.g));
|
||||||
dirtFactorB = smoothstep(0.0, 1.0, dirtFactorB);
|
mixedcolor.rgb = mix(mixedcolor.rgb, dirt_b_color, smoothstep(0.0, 1.0, dirtFactor.b));
|
||||||
mixedcolor.rgb = mix(mixedcolor.rgb, dirt_g_color, dirtFactorG);
|
|
||||||
mixedcolor.rgb = mix(mixedcolor.rgb, dirt_b_color, dirtFactorB);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
@ -167,7 +167,8 @@ void main (void)
|
||||||
|
|
||||||
// set ambient adjustment to remove bluiness with user input
|
// set ambient adjustment to remove bluiness with user input
|
||||||
float ambient_offset = clamp(amb_correction, -1.0, 1.0);
|
float ambient_offset = clamp(amb_correction, -1.0, 1.0);
|
||||||
vec4 ambient_Correction = vec4(gl_LightSource[0].ambient.rg, gl_LightSource[0].ambient.b * 0.6, 0.5) * ambient_offset ;
|
vec4 ambient_Correction = vec4(gl_LightSource[0].ambient.rg, gl_LightSource[0].ambient.b * 0.6, 0.5)
|
||||||
|
* ambient_offset ;
|
||||||
ambient_Correction = clamp(ambient_Correction, -1.0, 1.0);
|
ambient_Correction = clamp(ambient_Correction, -1.0, 1.0);
|
||||||
|
|
||||||
color.a = texel.a * alpha;
|
color.a = texel.a * alpha;
|
||||||
|
@ -182,13 +183,16 @@ void main (void)
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
if ( lightmap_enabled >= 1 ) {
|
if ( lightmap_enabled >= 1 ) {
|
||||||
vec3 lightmapcolor;
|
vec3 lightmapcolor;
|
||||||
|
vec4 lightmapFactor = vec4(lightmap_r_factor, lightmap_g_factor,
|
||||||
|
lightmap_b_factor, lightmap_a_factor);
|
||||||
|
lightmapFactor = lightmapFactor * lightmapTexel;
|
||||||
if (lightmap_multi >0 ){
|
if (lightmap_multi >0 ){
|
||||||
lightmapcolor = lightmap_r_color * lightmap_r_factor * lightmapTexel.r +
|
lightmapcolor = lightmap_r_color * lightmapFactor.r +
|
||||||
lightmap_g_color * lightmap_g_factor * lightmapTexel.g +
|
lightmap_g_color * lightmapFactor.g +
|
||||||
lightmap_b_color * lightmap_b_factor * lightmapTexel.b +
|
lightmap_b_color * lightmapFactor.b +
|
||||||
lightmap_a_color * lightmap_a_factor * lightmapTexel.a ;
|
lightmap_a_color * lightmapFactor.a ;
|
||||||
} else {
|
} else {
|
||||||
lightmapcolor = lightmapTexel.rgb * lightmap_r_color * lightmap_r_factor;
|
lightmapcolor = lightmapTexel.rgb * lightmap_r_color * lightmapFactor.r;
|
||||||
}
|
}
|
||||||
fragColor.rgb = max(fragColor.rgb, lightmapcolor * gl_FrontMaterial.diffuse.rgb * mixedcolor);
|
fragColor.rgb = max(fragColor.rgb, lightmapcolor * gl_FrontMaterial.diffuse.rgb * mixedcolor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ uniform int rembrandt_enabled;
|
||||||
|
|
||||||
void rotationMatrixPR(in float sinRx, in float cosRx, in float sinRy, in float cosRy, out mat4 rotmat)
|
void rotationMatrixPR(in float sinRx, in float cosRx, in float sinRy, in float cosRy, out mat4 rotmat)
|
||||||
{
|
{
|
||||||
rotmat = mat4( cosRy , sinRx * sinRy, cosRx * sinRy , 0.0,
|
rotmat = mat4( cosRy , sinRx * sinRy , cosRx * sinRy, 0.0,
|
||||||
0.0 , cosRx , -sinRx * cosRx, 0.0,
|
0.0 , cosRx , -sinRx * cosRx, 0.0,
|
||||||
-sinRy, sinRx * cosRy, cosRx * cosRy , 0.0,
|
-sinRy, sinRx * cosRy, cosRx * cosRy , 0.0,
|
||||||
0.0 , 0.0 , 0.0 , 1.0 );
|
0.0 , 0.0 , 0.0 , 1.0 );
|
||||||
|
@ -39,9 +39,9 @@ void rotationMatrixPR(in float sinRx, in float cosRx, in float sinRy, in float c
|
||||||
void rotationMatrixH(in float sinRz, in float cosRz, out mat4 rotmat)
|
void rotationMatrixH(in float sinRz, in float cosRz, out mat4 rotmat)
|
||||||
{
|
{
|
||||||
rotmat = mat4( cosRz, -sinRz, 0.0, 0.0,
|
rotmat = mat4( cosRz, -sinRz, 0.0, 0.0,
|
||||||
sinRz, cosRz , 0.0, 0.0,
|
sinRz, cosRz, 0.0, 0.0,
|
||||||
0.0 , 0.0 , 1.0, 0.0,
|
0.0 , 0.0 , 1.0, 0.0,
|
||||||
0.0 , 0.0 , 0.0, 1.0 );
|
0.0 , 0.0 , 0.0, 1.0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void main(void)
|
void main(void)
|
||||||
|
@ -103,7 +103,8 @@ void main(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(rembrandt_enabled < 1){
|
if(rembrandt_enabled < 1){
|
||||||
gl_FrontColor = gl_FrontMaterial.emission + gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient);
|
gl_FrontColor = gl_FrontMaterial.emission + gl_Color
|
||||||
|
* (gl_LightModel.ambient + gl_LightSource[0].ambient);
|
||||||
} else {
|
} else {
|
||||||
gl_FrontColor = gl_Color;
|
gl_FrontColor = gl_Color;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ int linear_search_steps = 10;
|
||||||
int GlobalIterationCount = 0;
|
int GlobalIterationCount = 0;
|
||||||
int gIterationCap = 64;
|
int gIterationCap = 64;
|
||||||
|
|
||||||
vec2 normal_encode(vec3 n);
|
void encode_gbuffer(vec3 normal, vec3 color, int mId, float specular, float shininess, float emission, float depth);
|
||||||
|
|
||||||
void QDM(inout vec3 p, inout vec3 v)
|
void QDM(inout vec3 p, inout vec3 v)
|
||||||
{
|
{
|
||||||
|
@ -190,7 +190,6 @@ void main (void)
|
||||||
N.z = sqrt(1.0 - min(1.0,dot(N.xy, N.xy)));
|
N.z = sqrt(1.0 - min(1.0,dot(N.xy, N.xy)));
|
||||||
float Nz = N.z;
|
float Nz = N.z;
|
||||||
N = normalize(N.x * tangent + N.y * binormal + N.z * normal);
|
N = normalize(N.x * tangent + N.y * binormal + N.z * normal);
|
||||||
gl_FragData[0] = vec4( normal_encode(N), 0.0, 1.0 );
|
|
||||||
|
|
||||||
vec4 ambient_light = constantColor + vec4(gl_Color.rgb, 1.0);
|
vec4 ambient_light = constantColor + vec4(gl_Color.rgb, 1.0);
|
||||||
|
|
||||||
|
@ -216,9 +215,6 @@ void main (void)
|
||||||
|
|
||||||
vec4 p = vec4( ecPos3 + tile_size * V * (d-1.0) * depth_factor / s.z, 1.0 );
|
vec4 p = vec4( ecPos3 + tile_size * V * (d-1.0) * depth_factor / s.z, 1.0 );
|
||||||
|
|
||||||
gl_FragData[1] = vec4( finalColor.rgb, 1.0 / 255.0 );
|
|
||||||
gl_FragData[2] = vec4( dot(specular.xyz,vec3(0.3, 0.59, 0.11 )), specular.w/128.0, 0.0, 1.0 );
|
|
||||||
|
|
||||||
if (dot(normal,-V) > 0.1) {
|
if (dot(normal,-V) > 0.1) {
|
||||||
vec4 iproj = gl_ProjectionMatrix * p;
|
vec4 iproj = gl_ProjectionMatrix * p;
|
||||||
iproj /= iproj.w;
|
iproj /= iproj.w;
|
||||||
|
@ -226,4 +222,5 @@ void main (void)
|
||||||
} else {
|
} else {
|
||||||
gl_FragDepth = gl_FragCoord.z;
|
gl_FragDepth = gl_FragCoord.z;
|
||||||
}
|
}
|
||||||
|
encode_gbuffer(N, finalColor.rgb, 1, dot(specular.xyz,vec3(0.3, 0.59, 0.11 )), specular.w, 0.0, gl_FragDepth);
|
||||||
}
|
}
|
||||||
|
|
BIN
Textures/Signs/signs_case.png
Normal file
After Width: | Height: | Size: 520 B |
BIN
Textures/buildings-lightmap.png
Normal file
After Width: | Height: | Size: 609 KiB |
|
@ -59,10 +59,11 @@
|
||||||
|
|
||||||
<!-- AI menu -->
|
<!-- AI menu -->
|
||||||
<ai>KI</ai>
|
<ai>KI</ai>
|
||||||
|
<scenario>Flugverkehr und Szenarien</scenario>
|
||||||
|
<atc-in-range>ATC Stationen in der Nähe</atc-in-range>
|
||||||
<wingman>Steuerung Flügelmann</wingman>
|
<wingman>Steuerung Flügelmann</wingman>
|
||||||
<tanker>Steuerung Tanker</tanker>
|
<tanker>Steuerung Tanker</tanker>
|
||||||
<carrier>Steuerung Flugzeugträger</carrier>
|
<carrier>Steuerung Flugzeugträger</carrier>
|
||||||
<scenario>Auswahl der KI Szenarien (Neustart notwendig)</scenario>
|
|
||||||
<jetway>Steuerung Fluggastbrücke</jetway>
|
<jetway>Steuerung Fluggastbrücke</jetway>
|
||||||
|
|
||||||
<!-- Equipment -->
|
<!-- Equipment -->
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||||
|
|
||||||
<!-- FlightGear options translations for German -->
|
<!-- FlightGear options: German language resource -->
|
||||||
|
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<!-- Fall back -->
|
<!-- Fall back -->
|
||||||
|
|
|
@ -62,10 +62,11 @@
|
||||||
|
|
||||||
<!-- AI menu -->
|
<!-- AI menu -->
|
||||||
<ai>AI</ai>
|
<ai>AI</ai>
|
||||||
|
<scenario>Traffic and Scenario Settings</scenario>
|
||||||
|
<atc-in-range>ATC Services in Range</atc-in-range>
|
||||||
<wingman>Wingman Controls</wingman>
|
<wingman>Wingman Controls</wingman>
|
||||||
<tanker>Tanker Controls</tanker>
|
<tanker>Tanker Controls</tanker>
|
||||||
<carrier>Carrier Controls</carrier>
|
<carrier>Carrier Controls</carrier>
|
||||||
<scenario>Scenario Select (requires restart)</scenario>
|
|
||||||
<jetway>Jetway Settings</jetway>
|
<jetway>Jetway Settings</jetway>
|
||||||
|
|
||||||
<!-- Multiplayer menu -->
|
<!-- Multiplayer menu -->
|
||||||
|
|
|
@ -51,16 +51,52 @@
|
||||||
</group>
|
</group>
|
||||||
<hrule/>
|
<hrule/>
|
||||||
|
|
||||||
|
<!-- main dialog area -->
|
||||||
<group>
|
<group>
|
||||||
<layout>table</layout>
|
<layout>table</layout>
|
||||||
<halign>center</halign>
|
<halign>center</halign>
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
<row>0</row><col>0</col>
|
<row>0</row>
|
||||||
|
<col>0</col>
|
||||||
|
<label>Options:</label>
|
||||||
|
<halign>right</halign>
|
||||||
|
</text>
|
||||||
|
<checkbox>
|
||||||
|
<row>0</row>
|
||||||
|
<col>1</col>
|
||||||
|
<colspan>2</colspan>
|
||||||
|
<halign>left</halign>
|
||||||
|
<name>hide-replay</name>
|
||||||
|
<label>Hide replay sessions over MP (less annoying to other players)</label>
|
||||||
|
<property>/sim/multiplay/freeze-on-replay</property>
|
||||||
|
<binding>
|
||||||
|
<command>dialog-apply</command>
|
||||||
|
<object-name>hide-replay</object-name>
|
||||||
|
</binding>
|
||||||
|
</checkbox>
|
||||||
|
|
||||||
|
<checkbox>
|
||||||
|
<row>1</row>
|
||||||
|
<col>1</col>
|
||||||
|
<colspan>2</colspan>
|
||||||
|
<halign>left</halign>
|
||||||
|
<name>ai-traffic</name>
|
||||||
|
<label>Show AI Traffic (mixing MP and AI traffic may be confusing)</label>
|
||||||
|
<property>/sim/traffic-manager/enabled</property>
|
||||||
|
<binding>
|
||||||
|
<command>dialog-apply</command>
|
||||||
|
<object-name>ai-traffic</object-name>
|
||||||
|
</binding>
|
||||||
|
</checkbox>
|
||||||
|
|
||||||
|
<text>
|
||||||
|
<row>2</row><col>0</col>
|
||||||
<halign>right</halign>
|
<halign>right</halign>
|
||||||
<label>Callsign:</label>
|
<label>Callsign:</label>
|
||||||
</text>
|
</text>
|
||||||
<input>
|
<input>
|
||||||
<row>0</row><col>1</col>
|
<row>2</row><col>1</col>
|
||||||
<halign>left</halign>
|
<halign>left</halign>
|
||||||
<property>/sim/multiplay/callsign</property>
|
<property>/sim/multiplay/callsign</property>
|
||||||
<enable>
|
<enable>
|
||||||
|
@ -69,19 +105,16 @@
|
||||||
</not>
|
</not>
|
||||||
</enable>
|
</enable>
|
||||||
</input>
|
</input>
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
<row>0</row><col>2</col>
|
<row>3</row><col>0</col>
|
||||||
<halign>left</halign>
|
|
||||||
<label>(requires reconnect)</label>
|
|
||||||
</text>
|
|
||||||
<text>
|
|
||||||
<row>1</row><col>0</col>
|
|
||||||
<halign>right</halign>
|
<halign>right</halign>
|
||||||
<label>Server:</label>
|
<label>Server:</label>
|
||||||
</text>
|
</text>
|
||||||
<combo>
|
<combo>
|
||||||
<name>host</name>
|
<name>host</name>
|
||||||
<row>1</row><col>1</col>
|
<halign>left</halign>
|
||||||
|
<row>3</row><col>1</col>
|
||||||
<colspan>2</colspan>
|
<colspan>2</colspan>
|
||||||
<pref-width>350</pref-width>
|
<pref-width>350</pref-width>
|
||||||
<property>/sim/multiplay/selected-server</property>
|
<property>/sim/multiplay/selected-server</property>
|
||||||
|
@ -99,22 +132,23 @@
|
||||||
<value>mpserver12.flightgear.org (Amsterdam, Netherlands)</value>
|
<value>mpserver12.flightgear.org (Amsterdam, Netherlands)</value>
|
||||||
<value>mpserver13.flightgear.org (Grenoble, France)</value>
|
<value>mpserver13.flightgear.org (Grenoble, France)</value>
|
||||||
</combo>
|
</combo>
|
||||||
<!-- status area -->
|
|
||||||
|
<!-- status area -->
|
||||||
<text>
|
<text>
|
||||||
<visible>
|
<visible>
|
||||||
<not><property>/sim/multiplay/online</property></not>
|
<not><property>/sim/multiplay/online</property></not>
|
||||||
</visible>
|
</visible>
|
||||||
<row>3</row>
|
<row>5</row>
|
||||||
<col>1</col>
|
<col>1</col>
|
||||||
<halign>left</halign>
|
<halign>left</halign>
|
||||||
<label>Not connected</label>
|
<label>Not connected</label>
|
||||||
</text>
|
</text>
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
<visible>
|
<visible>
|
||||||
<property>/sim/multiplay/online</property>
|
<property>/sim/multiplay/online</property>
|
||||||
</visible>
|
</visible>
|
||||||
<row>3</row>
|
<row>5</row>
|
||||||
<col>1</col>
|
<col>1</col>
|
||||||
<halign>left</halign>
|
<halign>left</halign>
|
||||||
<label>MMMMMMMMMMMMMMMMM</label>
|
<label>MMMMMMMMMMMMMMMMM</label>
|
||||||
|
@ -123,7 +157,8 @@
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
</text>
|
</text>
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
|
<!-- button area -->
|
||||||
<hrule/>
|
<hrule/>
|
||||||
<group>
|
<group>
|
||||||
<layout>hbox</layout>
|
<layout>hbox</layout>
|
||||||
|
@ -160,6 +195,7 @@
|
||||||
<subsystem>mp</subsystem>
|
<subsystem>mp</subsystem>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button>
|
<button>
|
||||||
<legend>Disconnect</legend>
|
<legend>Disconnect</legend>
|
||||||
<equal>true</equal>
|
<equal>true</equal>
|
||||||
|
@ -180,6 +216,7 @@
|
||||||
<subsystem>mp</subsystem>
|
<subsystem>mp</subsystem>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button>
|
<button>
|
||||||
<row>1</row><col>2</col>
|
<row>1</row><col>2</col>
|
||||||
<legend>Server Status</legend>
|
<legend>Server Status</legend>
|
||||||
|
@ -188,6 +225,7 @@
|
||||||
<path>http://mpmap01.flightgear.org/mpstatus/</path>
|
<path>http://mpmap01.flightgear.org/mpstatus/</path>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button>
|
<button>
|
||||||
<legend>Close</legend>
|
<legend>Close</legend>
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<empty><stretch>true</stretch></empty>
|
<empty><stretch>true</stretch></empty>
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
<label>AI Scenario Select</label>
|
<label>AI Traffic and Scenario Settings</label>
|
||||||
</text>
|
</text>
|
||||||
|
|
||||||
<empty><stretch>true</stretch></empty>
|
<empty><stretch>true</stretch></empty>
|
||||||
|
@ -49,13 +49,39 @@
|
||||||
|
|
||||||
<hrule/>
|
<hrule/>
|
||||||
|
|
||||||
|
<checkbox>
|
||||||
|
<halign>left</halign>
|
||||||
|
<label>Enable AI traffic</label>
|
||||||
|
<name>enable-ai-traffic</name>
|
||||||
|
<property>/sim/traffic-manager/enabled</property>
|
||||||
|
<binding>
|
||||||
|
<command>dialog-apply</command>
|
||||||
|
<object-name>enable-ai-traffic</object-name>
|
||||||
|
</binding>
|
||||||
|
</checkbox>
|
||||||
|
|
||||||
|
<checkbox>
|
||||||
|
<halign>left</halign>
|
||||||
|
<label>Enable AI scenarios (requires restart)</label>
|
||||||
|
<name>enable-ai-scenarios</name>
|
||||||
|
<property>/sim/ai/scenarios-enabled</property>
|
||||||
|
<binding>
|
||||||
|
<command>dialog-apply</command>
|
||||||
|
<object-name>enable-ai-scenarios</object-name>
|
||||||
|
</binding>
|
||||||
|
</checkbox>
|
||||||
|
|
||||||
|
<text><label/></text>
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
<label>Choose active scenario(s) for the next program start</label>
|
<label>Choose active scenario(s) for the next program start</label>
|
||||||
|
<enable>
|
||||||
|
<property>/sim/ai/scenarios-enabled</property>
|
||||||
|
</enable>
|
||||||
</text>
|
</text>
|
||||||
|
|
||||||
<hrule/>
|
<hrule/>
|
||||||
|
|
||||||
|
|
||||||
<group>
|
<group>
|
||||||
<layout>hbox</layout>
|
<layout>hbox</layout>
|
||||||
|
|
||||||
|
@ -120,8 +146,12 @@
|
||||||
var scenarioN = rootN.getNode("scenario");
|
var scenarioN = rootN.getNode("scenario");
|
||||||
if( scenarioN == nil ) return;
|
if( scenarioN == nil ) return;
|
||||||
var descriptionN = rootN.getNode("description");
|
var descriptionN = rootN.getNode("description");
|
||||||
if( descriptionN == nil )
|
var nameN = rootN.getNode("name");
|
||||||
var descriptionN = scenarioN.getNode("description");
|
if( (descriptionN == nil)and(nameN == nil) )
|
||||||
|
{
|
||||||
|
descriptionN = scenarioN.getNode("description");
|
||||||
|
nameN = scenarioN.getNode("name");
|
||||||
|
}
|
||||||
var description = descriptionN != nil ? descriptionN.getValue() : "";
|
var description = descriptionN != nil ? descriptionN.getValue() : "";
|
||||||
var propertyRoot = props.globals.getNode("sim/gui/dialogs/scenario",1).getChild( "scenario", nr, 1 );
|
var propertyRoot = props.globals.getNode("sim/gui/dialogs/scenario",1).getChild( "scenario", nr, 1 );
|
||||||
propertyRoot.getNode("selected",1).setBoolValue(isEnabledScenario(file));
|
propertyRoot.getNode("selected",1).setBoolValue(isEnabledScenario(file));
|
||||||
|
@ -131,8 +161,12 @@
|
||||||
group.getNode("layout",1).setValue("hbox");
|
group.getNode("layout",1).setValue("hbox");
|
||||||
var cb = group.getNode("checkbox",1);
|
var cb = group.getNode("checkbox",1);
|
||||||
cb.getNode("property",1).setValue(propertyRoot.getNode("selected").getPath());
|
cb.getNode("property",1).setValue(propertyRoot.getNode("selected").getPath());
|
||||||
cb.getNode("label",1).setValue(file);
|
var label = string.replace(file, "_", " ");
|
||||||
|
if (nameN != nil)
|
||||||
|
label = nameN.getValue();
|
||||||
|
cb.getNode("label",1).setValue(label);
|
||||||
cb.getNode("name",1).setValue(file);
|
cb.getNode("name",1).setValue(file);
|
||||||
|
cb.getNode("enable/property",1).setValue("/sim/ai/scenarios-enabled");
|
||||||
group.getNode("empty",1).getNode("stretch",1).setValue("true");
|
group.getNode("empty",1).getNode("stretch",1).setValue("true");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,14 +22,6 @@
|
||||||
<script>gui.save_flight()</script>
|
<script>gui.save_flight()</script>
|
||||||
</binding>
|
</binding>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
|
||||||
<label>Scenario</label>
|
|
||||||
<binding>
|
|
||||||
<command>dialog-show</command>
|
|
||||||
<dialog-name>scenario</dialog-name>
|
|
||||||
</binding>
|
|
||||||
</item>
|
|
||||||
-->
|
-->
|
||||||
<item>
|
<item>
|
||||||
<name>reset</name>
|
<name>reset</name>
|
||||||
|
@ -39,8 +31,8 @@
|
||||||
<command>reset</command>
|
<command>reset</command>
|
||||||
</binding>
|
</binding>
|
||||||
</item>
|
</item>
|
||||||
|
<!--
|
||||||
<!-- <item>
|
<item>
|
||||||
<label>High-Res Snapshot</label>
|
<label>High-Res Snapshot</label>
|
||||||
<enabled>false</enabled>
|
<enabled>false</enabled>
|
||||||
<binding>
|
<binding>
|
||||||
|
@ -60,6 +52,7 @@
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<name>snap-shot-dir</name>
|
<name>snap-shot-dir</name>
|
||||||
<label>Screenshot Directory</label>
|
<label>Screenshot Directory</label>
|
||||||
|
@ -452,14 +445,23 @@
|
||||||
<menu>
|
<menu>
|
||||||
<name>ai</name>
|
<name>ai</name>
|
||||||
<label>AI</label>
|
<label>AI</label>
|
||||||
<!-- Not working at present
|
|
||||||
<item>
|
<item>
|
||||||
<label>ATC Services in range</label>
|
<label>Traffic and Scenario Settings</label>
|
||||||
|
<name>scenario</name>
|
||||||
|
<binding>
|
||||||
|
<command>dialog-show</command>
|
||||||
|
<dialog-name>scenario</dialog-name>
|
||||||
|
</binding>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<label>ATC Services in Range</label>
|
||||||
|
<name>atc-in-range</name>
|
||||||
<binding>
|
<binding>
|
||||||
<command>ATC-freq-search</command>
|
<command>ATC-freq-search</command>
|
||||||
</binding>
|
</binding>
|
||||||
</item>
|
</item>
|
||||||
-->
|
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<label>Wingman Controls</label>
|
<label>Wingman Controls</label>
|
||||||
|
@ -489,15 +491,6 @@
|
||||||
</binding>
|
</binding>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
|
||||||
<label>Scenario Select (requires restart)</label>
|
|
||||||
<name>scenario</name>
|
|
||||||
<binding>
|
|
||||||
<command>dialog-show</command>
|
|
||||||
<dialog-name>scenario</dialog-name>
|
|
||||||
</binding>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<label>Jetway Settings</label>
|
<label>Jetway Settings</label>
|
||||||
<name>jetway</name>
|
<name>jetway</name>
|
||||||
|
@ -521,7 +514,7 @@
|
||||||
<dialog-name>multiplayer</dialog-name>
|
<dialog-name>multiplayer</dialog-name>
|
||||||
</binding>
|
</binding>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<label>Chat Dialog</label>
|
<label>Chat Dialog</label>
|
||||||
<name>mp-chat</name>
|
<name>mp-chat</name>
|
||||||
|
@ -598,7 +591,6 @@
|
||||||
</binding>
|
</binding>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<name>reload-panel</name>
|
<name>reload-panel</name>
|
||||||
<label>Reload Panel</label>
|
<label>Reload Panel</label>
|
||||||
|
|
|
@ -63,11 +63,12 @@ Started September 2000 by David Megginson, david@megginson.com
|
||||||
<season type="string" preserve="y">summer</season>
|
<season type="string" preserve="y">summer</season>
|
||||||
</startup>
|
</startup>
|
||||||
<rendering>
|
<rendering>
|
||||||
<materials-file>Materials/default/materials.xml</materials-file>
|
<materials-file>Materials/default/materials.xml</materials-file>
|
||||||
<rembrandt type="bool">false</rembrandt>
|
<rembrandt type="bool">false</rembrandt>
|
||||||
<show-buffers type="bool" userarchive="y">true</show-buffers>
|
<show-buffers type="bool" userarchive="y">true</show-buffers>
|
||||||
<ambient-occlusion type="bool" userarchive="y">false</ambient-occlusion>
|
<ambient-occlusion type="bool" userarchive="y">false</ambient-occlusion>
|
||||||
<exposure type="float" userarchive="y">1.0</exposure>
|
<exposure type="float" userarchive="y">1.0</exposure>
|
||||||
|
<use-color-for-depth type="bool">false</use-color-for-depth>
|
||||||
<debug type="bool">false</debug>
|
<debug type="bool">false</debug>
|
||||||
<realism type="int">5</realism>
|
<realism type="int">5</realism>
|
||||||
<filtering type="int">8</filtering>
|
<filtering type="int">8</filtering>
|
||||||
|
@ -748,13 +749,9 @@ Started September 2000 by David Megginson, david@megginson.com
|
||||||
|
|
||||||
<ai>
|
<ai>
|
||||||
<enabled type="bool">true</enabled>
|
<enabled type="bool">true</enabled>
|
||||||
|
<scenarios-enabled type="bool" userarchive="y">true</scenarios-enabled>
|
||||||
<scenario>nimitz_demo</scenario>
|
<scenario>nimitz_demo</scenario>
|
||||||
<groundnet-cache type="bool">true</groundnet-cache>
|
<groundnet-cache type="bool">true</groundnet-cache>
|
||||||
<!-- <scenario>balloon_demo</scenario> -->
|
|
||||||
<!-- <scenario>aircraft_demo</scenario> -->
|
|
||||||
<!-- <scenario>refueling_demo</scenario> -->
|
|
||||||
<!-- <scenario>lead_aircraft</scenario> -->
|
|
||||||
<!-- <scenario>vinson_demo</scenario> -->
|
|
||||||
</ai>
|
</ai>
|
||||||
|
|
||||||
<multiplay preserve="y">
|
<multiplay preserve="y">
|
||||||
|
|