1
0
Fork 0

Adapt to new rendering gui

Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
This commit is contained in:
Vivian Meazza 2011-12-01 21:44:10 +00:00
parent 17c1f39137
commit 746b38ca9c
7 changed files with 1711 additions and 728 deletions

View file

@ -15,11 +15,45 @@
</wind-speed> </wind-speed>
<offset>0.0</offset> <offset>0.0</offset>
<amplitude-factor>0.08</amplitude-factor> <amplitude-factor>0.08</amplitude-factor>
<windE>
<use>/environment/sea/surface/wind-from-east-fps</use>
</windE>
<windN>
<use>/environment/sea/surface/wind-from-north-fps</use>
</windN>
<speed-kt>0.0</speed-kt>
<heading-deg>0.0</heading-deg>
<!-- 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/scattering-shader</use>
</fogtype>
<!-- END fog include -->
</parameters> </parameters>
<technique n="9"> <technique n="9">
<predicate> <predicate>
<and> <and>
<property>/sim/rendering/shader-effects</property> <!--<property>/sim/rendering/shader-effects</property>-->
<less-equal>
<value type="float">3.0</value>
<float-property>/sim/rendering/shaders/quality-level</float-property>
</less-equal>
<or> <or>
<less-equal> <less-equal>
<value type="float">2.0</value> <value type="float">2.0</value>
@ -114,7 +148,9 @@
<use>vertex-program-two-side</use> <use>vertex-program-two-side</use>
</vertex-program-two-side> </vertex-program-two-side>
<program> <program>
<vertex-shader>Shaders/include_fog.vert</vertex-shader>
<vertex-shader>Shaders/flutter.vert</vertex-shader> <vertex-shader>Shaders/flutter.vert</vertex-shader>
<fragment-shader>Shaders/include_fog.frag</fragment-shader>
<fragment-shader>Shaders/default.frag</fragment-shader> <fragment-shader>Shaders/default.frag</fragment-shader>
</program> </program>
<!--<uniform> <!--<uniform>
@ -155,6 +191,79 @@
<type>sampler-3d</type> <type>sampler-3d</type>
<value type="int">9</value> <value type="int">9</value>
</uniform> </uniform>
<uniform>
<name>WindE</name>
<type>float</type>
<value>
<use>windE</use>
</value>
</uniform>
<uniform>
<name>WindN</name>
<type>float</type>
<value>
<use>windN</use>
</value>
</uniform>
<uniform>
<name>spd</name>
<type>float</type>
<value>
<use>speed-kt</use>
</value>
</uniform>
<uniform>
<name>hdg</name>
<type>float</type>
<value>
<use>heading-deg</use>
</value>
</uniform>
<!-- BEGIN fog include -->
<uniform>
<name>visibility</name>
<type>float</type>
<value>
<use>visibility</use>
</value>
</uniform>
<uniform>
<name>avisibility</name>
<type>float</type>
<value>
<use>avisibility</use>
</value>
</uniform>
<uniform>
<name>hazeLayerAltitude</name>
<type>float</type>
<value>
<use>lthickness</use>
</value>
</uniform>
<uniform>
<name>scattering</name>
<type>float</type>
<value>
<use>scattering</use>
</value>
</uniform>
<uniform>
<name>terminator</name>
<type>float</type>
<value>
<use>terminator</use>
</value>
</uniform>
<uniform>
<name>fogType</name>
<type>int</type>
<value>
<use>fogtype</use>
</value>
</uniform>
<!-- END fog include -->
</pass> </pass>
</technique> </technique>

View file

@ -1,14 +1,36 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<PropertyList> <PropertyList>
<name>Effects/model-default</name> <name>Effects/model-default</name>
<!-- <inherits-from>Effects/shadow</inherits-from> -->
<parameters> <parameters>
<texture n ="0"> <texture n ="0">
<type>white</type> <type>white</type>
</texture> </texture>
<vertex-program-two-side type="bool">false</vertex-program-two-side> <vertex-program-two-side type="bool">false</vertex-program-two-side>
<material> <material>
<color-mode-uniform>1</color-mode-uniform> <!-- DIFFUSE --> <color-mode-uniform>1</color-mode-uniform>
<!-- DIFFUSE -->
</material> </material>
<!-- BEGIN 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/scattering-shader</use>
</fogtype>
<!-- END fog include -->
</parameters> </parameters>
<technique n="10"> <technique n="10">
<predicate> <predicate>
@ -31,33 +53,69 @@
<pass> <pass>
<lighting>true</lighting> <lighting>true</lighting>
<material> <material>
<active><use>material/active</use></active> <active>
<ambient><use>material/ambient</use></ambient> <use>material/active</use>
<diffuse><use>material/diffuse</use></diffuse> </active>
<specular><use>material/specular</use></specular> <ambient>
<emissive><use>material/emissive</use></emissive> <use>material/ambient</use>
<shininess><use>material/shininess</use></shininess> </ambient>
<color-mode><use>material/color-mode</use></color-mode> <diffuse>
<use>material/diffuse</use>
</diffuse>
<specular>
<use>material/specular</use>
</specular>
<emissive>
<use>material/emissive</use>
</emissive>
<shininess>
<use>material/shininess</use>
</shininess>
<color-mode>
<use>material/color-mode</use>
</color-mode>
</material> </material>
<blend> <blend>
<active><use>blend/active</use></active> <active>
<source><use>blend/source</use></source> <use>blend/active</use>
<destination><use>blend/destination</use></destination> </active>
<source>
<use>blend/source</use>
</source>
<destination>
<use>blend/destination</use>
</destination>
</blend> </blend>
<shade-model><use>shade-model</use></shade-model> <shade-model>
<cull-face><use>cull-face</use></cull-face> <use>shade-model</use>
<rendering-hint><use>rendering-hint</use></rendering-hint> </shade-model>
<cull-face>
<use>cull-face</use>
</cull-face>
<rendering-hint>
<use>rendering-hint</use>
</rendering-hint>
<texture-unit> <texture-unit>
<!-- The texture unit is always active because the shaders expect <!-- The texture unit is always active because the shaders expect
that. --> that. -->
<unit>0</unit> <unit>0</unit>
<!-- If there is a texture, the type in the derived effect <!-- If there is a texture, the type in the derived effect
will be "2d". --> will be "2d". -->
<type><use>texture[0]/type</use></type> <type>
<image><use>texture[0]/image</use></image> <use>texture[0]/type</use>
<filter><use>texture[0]/filter</use></filter> </type>
<wrap-s><use>texture[0]/wrap-s</use></wrap-s> <image>
<wrap-t><use>texture[0]/wrap-t</use></wrap-t> <use>texture[0]/image</use>
</image>
<filter>
<use>texture[0]/filter</use>
</filter>
<wrap-s>
<use>texture[0]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[0]/wrap-t</use>
</wrap-t>
<!-- <!--
<internal-format> <internal-format>
<use>texture[0]/internal-format</use> <use>texture[0]/internal-format</use>
@ -68,9 +126,57 @@
<use>vertex-program-two-side</use> <use>vertex-program-two-side</use>
</vertex-program-two-side> </vertex-program-two-side>
<program> <program>
<vertex-shader>Shaders/default.vert</vertex-shader> <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader>
<fragment-shader>Shaders/default.frag</fragment-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/default.frag</fragment-shader>
</program> </program>
<!-- BEGIN fog include -->
<uniform>
<name>visibility</name>
<type>float</type>
<value>
<use>visibility</use>
</value>
</uniform>
<uniform>
<name>avisibility</name>
<type>float</type>
<value>
<use>avisibility</use>
</value>
</uniform>
<uniform>
<name>hazeLayerAltitude</name>
<type>float</type>
<value>
<use>lthickness</use>
</value>
</uniform>
<uniform>
<name>scattering</name>
<type>float</type>
<value>
<use>scattering</use>
</value>
</uniform>
<uniform>
<name>terminator</name>
<type>float</type>
<value>
<use>terminator</use>
</value>
</uniform>
<uniform>
<name>fogType</name>
<type>int</type>
<value>
<use>fogtype</use>
</value>
</uniform>
<!-- END fog include -->
<uniform> <uniform>
<name>texture</name> <name>texture</name>
<type>sampler-2d</type> <type>sampler-2d</type>
@ -79,7 +185,9 @@
<uniform> <uniform>
<name>colorMode</name> <name>colorMode</name>
<type>int</type> <type>int</type>
<value><use>material/color-mode-uniform</use></value> <value>
<use>material/color-mode-uniform</use>
</value>
</uniform> </uniform>
</pass> </pass>
</technique> </technique>
@ -87,29 +195,65 @@
<pass> <pass>
<lighting>true</lighting> <lighting>true</lighting>
<material> <material>
<active><use>material/active</use></active> <active>
<ambient><use>material/ambient</use></ambient> <use>material/active</use>
<diffuse><use>material/diffuse</use></diffuse> </active>
<specular><use>material/specular</use></specular> <ambient>
<emissive><use>material/emissive</use></emissive> <use>material/ambient</use>
<shininess><use>material/shininess</use></shininess> </ambient>
<color-mode><use>material/color-mode</use></color-mode> <diffuse>
<use>material/diffuse</use>
</diffuse>
<specular>
<use>material/specular</use>
</specular>
<emissive>
<use>material/emissive</use>
</emissive>
<shininess>
<use>material/shininess</use>
</shininess>
<color-mode>
<use>material/color-mode</use>
</color-mode>
</material> </material>
<blend> <blend>
<active><use>blend/active</use></active> <active>
<source><use>blend/source</use></source> <use>blend/active</use>
<destination><use>blend/destination</use></destination> </active>
<source>
<use>blend/source</use>
</source>
<destination>
<use>blend/destination</use>
</destination>
</blend> </blend>
<shade-model><use>shade-model</use></shade-model> <shade-model>
<cull-face><use>cull-face</use></cull-face> <use>shade-model</use>
<rendering-hint><use>rendering-hint</use></rendering-hint> </shade-model>
<cull-face>
<use>cull-face</use>
</cull-face>
<rendering-hint>
<use>rendering-hint</use>
</rendering-hint>
<texture-unit> <texture-unit>
<active><use>texture[0]/active</use></active> <active>
<use>texture[0]/active</use>
</active>
<unit>0</unit> <unit>0</unit>
<image><use>texture[0]/image</use></image> <image>
<filter><use>texture[0]/filter</use></filter> <use>texture[0]/image</use>
<wrap-s><use>texture[0]/wrap-s</use></wrap-s> </image>
<wrap-t><use>texture[0]/wrap-t</use></wrap-t> <filter>
<use>texture[0]/filter</use>
</filter>
<wrap-s>
<use>texture[0]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[0]/wrap-t</use>
</wrap-t>
<!-- <!--
<internal-format> <internal-format>
<use>texture[0]/internal-format</use> <use>texture[0]/internal-format</use>

View file

@ -57,9 +57,11 @@
<reflect_map>1</reflect_map> <reflect_map>1</reflect_map>
<normalmap_dds>1</normalmap_dds> <normalmap_dds>1</normalmap_dds>
<vertex-program-two-side type="bool">false</vertex-program-two-side> <vertex-program-two-side type="bool">false</vertex-program-two-side>
<cull-face>back</cull-face>
<wetness> <wetness>
<use>/environment/rain-norm</use> <use>/environment/rain-norm</use>
</wetness> </wetness>
<!-- BEGIN fog include --> <!-- BEGIN fog include -->
<visibility> <visibility>
<use>/environment/ground-visibility-m</use> <use>/environment/ground-visibility-m</use>
@ -106,11 +108,21 @@
<pass> <pass>
<texture-unit> <texture-unit>
<unit>0</unit> <unit>0</unit>
<image><use>texture[0]/image</use></image> <image>
<filter><use>texture[0]/filter</use></filter> <use>texture[0]/image</use>
<wrap-s><use>texture[0]/wrap-s</use></wrap-s> </image>
<wrap-t><use>texture[0]/wrap-t</use></wrap-t> <filter>
<internal-format><use>texture[1]/internal-format</use></internal-format> <use>texture[0]/filter</use>
</filter>
<wrap-s>
<use>texture[0]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[0]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[1]/internal-format</use>
</internal-format>
</texture-unit> </texture-unit>
<texture-unit> <texture-unit>
<unit>4</unit> <unit>4</unit>
@ -212,6 +224,10 @@
<vertex-program-two-side> <vertex-program-two-side>
<use>vertex-program-two-side</use> <use>vertex-program-two-side</use>
</vertex-program-two-side> </vertex-program-two-side>
<cull-face>
<use>cull-face</use>
</cull-face>
<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/reflect-bump-spec.vert</vertex-shader> <vertex-shader n="1">Shaders/reflect-bump-spec.vert</vertex-shader>

View file

@ -2,15 +2,42 @@
<PropertyList> <PropertyList>
<name>Effects/skydome</name> <name>Effects/skydome</name>
<parameters> <parameters>
<mie><use>/sim/rendering/mie</use></mie> <mie>
<rayleigh><use>/sim/rendering/rayleigh</use></rayleigh> <use>/sim/rendering/mie</use>
<density><use>/sim/rendering/dome-density</use></density> </mie>
<rayleigh>
<use>/sim/rendering/rayleigh</use>
</rayleigh>
<density>
<use>/sim/rendering/dome-density</use>
</density>
<overcast>
<use>/rendering/scene/overcast</use>
</overcast>
<saturation>
<use>/rendering/scene/saturation</use>
</saturation>
<scattering>
<use>/rendering/scene/scattering</use>
</scattering>
<visibility>
<use>/environment/ground-visibility-m</use>
</visibility>
<avisibility>
<use>/environment/visibility-m</use>
</avisibility>
<lthickness>
<use>/environment/ground-haze-thickness-m</use>
</lthickness>
<terminator>
<use>/environment/terminator-relative-position-m</use>
</terminator>
</parameters> </parameters>
<technique n="8"> <technique n="8">
<predicate> <predicate>
<and> <and>
<property>/sim/rendering/shader-effects</property> <property>/sim/rendering/shaders/quality-level</property>
<property>/sim/rendering/scattering-shader</property> <property>/sim/rendering/shaders/skydome</property>
<or> <or>
<less-equal> <less-equal>
<value type="float">2.0</value> <value type="float">2.0</value>
@ -37,17 +64,72 @@
<uniform> <uniform>
<name>mK</name> <name>mK</name>
<type>float</type> <type>float</type>
<value><use>mie</use></value> <value>
<use>mie</use>
</value>
</uniform> </uniform>
<uniform> <uniform>
<name>rK</name> <name>rK</name>
<type>float</type> <type>float</type>
<value><use>rayleigh</use></value> <value>
<use>rayleigh</use>
</value>
</uniform> </uniform>
<uniform> <uniform>
<name>density</name> <name>density</name>
<type>float</type> <type>float</type>
<value><use>density</use></value> <value>
<use>density</use>
</value>
</uniform>
<uniform>
<name>overcast</name>
<type>float</type>
<value>
<use>overcast</use>
</value>
</uniform>
<uniform>
<name>saturation</name>
<type>float</type>
<value>
<use>saturation</use>
</value>
</uniform>
<uniform>
<name>scattering</name>
<type>float</type>
<value>
<use>scattering</use>
</value>
</uniform>
<uniform>
<name>visibility</name>
<type>float</type>
<value>
<use>visibility</use>
</value>
</uniform>
<uniform>
<name>hazeLayerAltitude</name>
<type>float</type>
<value>
<use>lthickness</use>
</value>
</uniform>
<uniform>
<name>terminator</name>
<type>float</type>
<value>
<use>terminator</use>
</value>
</uniform>
<uniform>
<name>avisibility</name>
<type>float</type>
<value>
<use>avisibility</use>
</value>
</uniform> </uniform>
</pass> </pass>
</technique> </technique>

View file

@ -8,7 +8,7 @@ parameters :
texture[4] -> snow texture you want applied above snow-limit (I recommend using the corespondent winter texture for the base texture that you can find in terrain.winter) texture[4] -> snow texture you want applied above snow-limit (I recommend using the corespondent winter texture for the base texture that you can find in terrain.winter)
transitions -> transitions number can be set to 1 or 2 (if set to 2 will allow for an intermediate step) transitions -> transitions number can be set to 1 or 2 (if set to 2 will allow for an intermediate step)
inverse -> if this is se to 1 will keep the base texture on steep slopes and transition to the texture you want (useful to add some grass patches in rocky areas) inverse -> if this is set to 1 will keep the base texture on steep slopes and transition to the texture you want (useful to add some grass patches in rocky areas)
--> -->
<PropertyList> <PropertyList>
@ -62,6 +62,27 @@ parameters :
<transitions type="float">2.0</transitions> <transitions type="float">2.0</transitions>
<inverse type="float">0.0</inverse> <inverse type="float">0.0</inverse>
<!-- 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/scattering-shader</use>
</fogtype>
<!-- END fog include -->
</parameters> </parameters>
<!--<generate> <!--<generate>
@ -72,8 +93,8 @@ parameters :
<technique n="9"> <technique n="9">
<predicate> <predicate>
<and> <and>
<property>/sim/rendering/transition-shader</property> <property>/sim/rendering/shaders/transition</property>
<property>/sim/rendering/shader-effects</property> <property>/sim/rendering/shaders/quality-level</property>
<or> <or>
<less-equal> <less-equal>
<value type="float">2.0</value> <value type="float">2.0</value>
@ -209,7 +230,9 @@ parameters :
</texture-unit> </texture-unit>
<program> <program>
<vertex-shader>Shaders/include_fog.vert</vertex-shader>
<vertex-shader>Shaders/transition.vert</vertex-shader> <vertex-shader>Shaders/transition.vert</vertex-shader>
<fragment-shader>Shaders/include_fog.frag</fragment-shader>
<fragment-shader>Shaders/transition.frag</fragment-shader> <fragment-shader>Shaders/transition.frag</fragment-shader>
</program> </program>
@ -314,6 +337,51 @@ parameters :
<use>cloud-cover4</use> <use>cloud-cover4</use>
</value> </value>
</uniform> </uniform>
<!-- BEGIN fog include -->
<uniform>
<name>visibility</name>
<type>float</type>
<value>
<use>visibility</use>
</value>
</uniform>
<uniform>
<name>avisibility</name>
<type>float</type>
<value>
<use>avisibility</use>
</value>
</uniform>
<uniform>
<name>hazeLayerAltitude</name>
<type>float</type>
<value>
<use>lthickness</use>
</value>
</uniform>
<uniform>
<name>scattering</name>
<type>float</type>
<value>
<use>scattering</use>
</value>
</uniform>
<uniform>
<name>terminator</name>
<type>float</type>
<value>
<use>terminator</use>
</value>
</uniform>
<uniform>
<name>fogType</name>
<type>int</type>
<value>
<use>fogtype</use>
</value>
</uniform>
<!-- END fog include -->
</pass> </pass>
</technique> </technique>
</PropertyList> </PropertyList>

View file

@ -16,10 +16,31 @@
<parameters> <parameters>
<texture n ="0"> <texture n ="0">
</texture> </texture>
<!-- 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/scattering-shader</use>
</fogtype>
<!-- END fog include -->
</parameters> </parameters>
<technique n="10"> <technique n="10">
<predicate> <predicate>
<and> <and>
<!--<property>/sim/rendering/shader-effects</property>-->
<property>/sim/rendering/random-vegetation</property> <property>/sim/rendering/random-vegetation</property>
<less-equal> <less-equal>
<value type="float">1.0</value> <value type="float">1.0</value>
@ -41,19 +62,67 @@
<texture-unit> <texture-unit>
<unit>0</unit> <unit>0</unit>
<type>2d</type> <type>2d</type>
<image><use>texture[0]/image</use></image> <image>
<use>texture[0]/image</use>
</image>
<wrap-s>clamp</wrap-s> <wrap-s>clamp</wrap-s>
<wrap-t>clamp</wrap-t> <wrap-t>clamp</wrap-t>
</texture-unit> </texture-unit>
<program> <program>
<!-- <vertex-shader>Shaders/include_fog.vert</vertex-shader> -->
<vertex-shader>Shaders/tree.vert</vertex-shader> <vertex-shader>Shaders/tree.vert</vertex-shader>
<fragment-shader>Shaders/tree.frag</fragment-shader> <fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
<fragment-shader n="1">Shaders/tree.frag</fragment-shader>
</program> </program>
<uniform> <uniform>
<name>baseTexture</name> <name>baseTexture</name>
<type>sampler-2d</type> <type>sampler-2d</type>
<value type="int">0</value> <value type="int">0</value>
</uniform> </uniform>
<!-- BEGIN fog include -->
<uniform>
<name>visibility</name>
<type>float</type>
<value>
<use>visibility</use>
</value>
</uniform>
<uniform>
<name>avisibility</name>
<type>float</type>
<value>
<use>avisibility</use>
</value>
</uniform>
<uniform>
<name>hazeLayerAltitude</name>
<type>float</type>
<value>
<use>lthickness</use>
</value>
</uniform>
<uniform>
<name>scattering</name>
<type>float</type>
<value>
<use>scattering</use>
</value>
</uniform>
<uniform>
<name>terminator</name>
<type>float</type>
<value>
<use>terminator</use>
</value>
</uniform>
<uniform>
<name>fogType</name>
<type>int</type>
<value>
<use>fogtype</use>
</value>
</uniform>
<!-- END fog include -->
</pass> </pass>
<pass n="1"> <pass n="1">
<lighting>true</lighting> <lighting>true</lighting>
@ -63,7 +132,8 @@
<color-mode>off</color-mode> <color-mode>off</color-mode>
</material> </material>
<render-bin> <render-bin>
<bin-number>2</bin-number> <!-- RANDOM_OBJECTS_BIN --> <bin-number>2</bin-number>
<!-- RANDOM_OBJECTS_BIN -->
<bin-name>RenderBin</bin-name> <bin-name>RenderBin</bin-name>
</render-bin> </render-bin>
<alpha-test> <alpha-test>
@ -80,19 +150,67 @@
<texture-unit> <texture-unit>
<unit>0</unit> <unit>0</unit>
<type>2d</type> <type>2d</type>
<image><use>texture[0]/image</use></image> <image>
<use>texture[0]/image</use>
</image>
<wrap-s>clamp</wrap-s> <wrap-s>clamp</wrap-s>
<wrap-t>clamp</wrap-t> <wrap-t>clamp</wrap-t>
</texture-unit> </texture-unit>
<program> <program>
<vertex-shader>Shaders/tree.vert</vertex-shader> <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader>
<fragment-shader>Shaders/tree.frag</fragment-shader> <vertex-shader n="1">Shaders/tree.vert</vertex-shader>
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
<fragment-shader n="1">Shaders/tree.frag</fragment-shader>
</program> </program>
<uniform> <uniform>
<name>baseTexture</name> <name>baseTexture</name>
<type>sampler-2d</type> <type>sampler-2d</type>
<value type="int">0</value> <value type="int">0</value>
</uniform> </uniform>
<!-- BEGIN fog include -->
<uniform>
<name>visibility</name>
<type>float</type>
<value>
<use>visibility</use>
</value>
</uniform>
<uniform>
<name>avisibility</name>
<type>float</type>
<value>
<use>avisibility</use>
</value>
</uniform>
<uniform>
<name>hazeLayerAltitude</name>
<type>float</type>
<value>
<use>lthickness</use>
</value>
</uniform>
<uniform>
<name>scattering</name>
<type>float</type>
<value>
<use>scattering</use>
</value>
</uniform>
<uniform>
<name>terminator</name>
<type>float</type>
<value>
<use>terminator</use>
</value>
</uniform>
<uniform>
<name>fogType</name>
<type>int</type>
<value>
<use>fogtype</use>
</value>
</uniform>
<!-- END fog include -->
</pass> </pass>
</technique> </technique>
</PropertyList> </PropertyList>

View file

@ -13,8 +13,8 @@
<texture n="2"> <texture n="2">
<!--<image>Textures/Water/water-normalmap.png</image>--> <!--<image>Textures/Water/water-normalmap.png</image>-->
<!--<image>Textures/Water/water-normalmap2.dds</image>--> <!--<image>Textures/Water/water-normalmap2.dds</image>-->
<!--<image>Textures/Water/water_sine_nmap.dds</image>-->
<image>Textures/Water/waves-ver10-nm.dds</image> <image>Textures/Water/waves-ver10-nm.dds</image>
<!--<image>Textures/Water/caustic-nm.png</image>-->
<filter>linear-mipmap-linear</filter> <filter>linear-mipmap-linear</filter>
<wrap-s>repeat</wrap-s> <wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t> <wrap-t>repeat</wrap-t>
@ -23,8 +23,9 @@
<texture n="3"> <texture n="3">
<!--<image>Textures/Water/water-dudv.png</image>--> <!--<image>Textures/Water/water-dudv.png</image>-->
<!--<image>Textures/Water/dudvmap2.png</image>--> <!--<image>Textures/Water/dudvmap2.png</image>-->
<image>Textures/Water/waves-ver10-dudv.dds</image> <!--<image>Textures/Water/waves-ver10-dudv.dds</image>-->
<!--<image>Textures/Water/water-reflection-grey.png</image>--> <!--<image>Textures/Water/water-reflection-grey.png</image>-->
<image>Textures/Water/water_sine_nmap.dds</image>
<filter>linear-mipmap-linear</filter> <filter>linear-mipmap-linear</filter>
<wrap-s>repeat</wrap-s> <wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t> <wrap-t>repeat</wrap-t>
@ -46,6 +47,7 @@
</texture> </texture>
<texture n="6"> <texture n="6">
<image>Textures/Water/perlin-noise-nm.dds</image> <image>Textures/Water/perlin-noise-nm.dds</image>
<!-- <image>Textures/Water/water_sine_nmap.dds</image> -->
<filter>linear-mipmap-linear</filter> <filter>linear-mipmap-linear</filter>
<wrap-s>repeat</wrap-s> <wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t> <wrap-t>repeat</wrap-t>
@ -60,44 +62,80 @@
<overcast> <overcast>
<use>/rendering/scene/overcast</use> <use>/rendering/scene/overcast</use>
</overcast> </overcast>
<cloud-cover0> <cloud-cover n="0">
<use>/environment/clouds/layer[0]/coverage-type</use> <use>/environment/clouds/layer[0]/coverage-type</use>
</cloud-cover0> </cloud-cover>
<cloud-cover1> <cloud-cover n="1">
<use>/environment/clouds/layer[1]/coverage-type</use> <use>/environment/clouds/layer[1]/coverage-type</use>
</cloud-cover1> </cloud-cover>
<cloud-cover2> <cloud-cover n="2" >
<use>/environment/clouds/layer[2]/coverage-type</use> <use>/environment/clouds/layer[2]/coverage-type</use>
</cloud-cover2> </cloud-cover>
<cloud-cover3> <cloud-cover n="3">
<use>/environment/clouds/layer[3]/coverage-type</use> <use>/environment/clouds/layer[3]/coverage-type</use>
</cloud-cover3> </cloud-cover>
<cloud-cover4> <cloud-cover n="4">
<use>/environment/clouds/layer[4]/coverage-type</use> <use>/environment/clouds/layer[4]/coverage-type</use>
</cloud-cover4> </cloud-cover>
<!--<wind> <!--<wind>
<use>/environment/wind-speed-kt</use> <use>/environment/wind-speed-kt</use>
</wind>--> </wind>-->
<windE> <windE>
<use>/environment/config/boundary/entry[0]/wind-from-east-fps</use> <use>/environment/sea/surface/wind-from-east-fps</use>
</windE> </windE>
<windN> <windN>
<use>/environment/config/boundary/entry[0]/wind-from-north-fps</use> <use>/environment/sea/surface/wind-from-north-fps</use>
</windN> </windN>
<wind-from> <wind-from>
<use>/environment/config/boundary/entry[0]/wind-from-heading-deg</use> <use>/environment/config/boundary/entry[0]/wind-from-heading-deg</use>
</wind-from> </wind-from>
<WaveFreq>
<use>/environment/wave/freq</use>
</WaveFreq>
<WaveAmp>
<use>/environment/wave/amp</use>
</WaveAmp>
<WaveSharp>
<use>/environment/wave/sharp</use>
</WaveSharp>
<WaveAngle>
<use>/environment/wave/angle</use>
</WaveAngle>
<WaveFactor>
<use>/environment/wave/factor</use>
</WaveFactor>
<WaveDAngle>
<use>/environment/wave/dangle</use>
</WaveDAngle>
<!-- 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/scattering-shader</use>
</fogtype>
<!-- END fog include -->
</parameters> </parameters>
<technique n="8"> <technique n="8">
<predicate> <predicate>
<and> <and>
<property>/sim/rendering/water-shader</property> <property>/sim/rendering/shaders/water</property>
<property>/sim/rendering/shader-effects</property>
<less-equal> <less-equal>
<value type="float">2.0</value> <value type="float">4.0</value>
<float-property>/sim/rendering/quality-level</float-property> <float-property>/sim/rendering/shaders/water</float-property>
</less-equal> </less-equal>
<or> <or>
<less-equal> <less-equal>
@ -251,9 +289,15 @@
<use>texture[6]/internal-format</use> <use>texture[6]/internal-format</use>
</internal-format> </internal-format>
</texture-unit> </texture-unit>
<texture-unit>
<unit>9</unit>
<type>noise</type>
</texture-unit>
<program> <program>
<vertex-shader>Shaders/include_fog.vert</vertex-shader>
<vertex-shader>Shaders/water.vert</vertex-shader> <vertex-shader>Shaders/water.vert</vertex-shader>
<fragment-shader>Shaders/water.frag</fragment-shader> <fragment-shader>Shaders/include_fog.frag</fragment-shader>
<fragment-shader>Shaders/water_sine.frag</fragment-shader>
</program> </program>
<uniform> <uniform>
<name>water_reflection</name> <name>water_reflection</name>
@ -295,35 +339,35 @@
<name>CloudCover0</name> <name>CloudCover0</name>
<type>float</type> <type>float</type>
<value> <value>
<use>cloud-cover0</use> <use>cloud-cover[0]</use>
</value> </value>
</uniform> </uniform>
<uniform> <uniform>
<name>CloudCover1</name> <name>CloudCover1</name>
<type>float</type> <type>float</type>
<value> <value>
<use>cloud-cover1</use> <use>cloud-cover[1]</use>
</value> </value>
</uniform> </uniform>
<uniform> <uniform>
<name>CloudCover2</name> <name>CloudCover2</name>
<type>float</type> <type>float</type>
<value> <value>
<use>cloud-cover2</use> <use>cloud-cover[2]</use>
</value> </value>
</uniform> </uniform>
<uniform> <uniform>
<name>CloudCover3</name> <name>CloudCover3</name>
<type>float</type> <type>float</type>
<value> <value>
<use>cloud-cover3</use> <use>cloud-cover[3]</use>
</value> </value>
</uniform> </uniform>
<uniform> <uniform>
<name>CloudCover4</name> <name>CloudCover4</name>
<type>float</type> <type>float</type>
<value> <value>
<use>cloud-cover4</use> <use>cloud-cover[4]</use>
</value> </value>
</uniform> </uniform>
<uniform> <uniform>
@ -362,13 +406,109 @@
<use>wind-from</use> <use>wind-from</use>
</value> </value>
</uniform> </uniform>
<uniform>
<name>WaveFreq</name>
<type>float</type>
<value>
<use>WaveFreq</use>
</value>
</uniform>
<uniform>
<name>WaveAmp</name>
<type>float</type>
<value>
<use>WaveAmp</use>
</value>
</uniform>
<uniform>
<name>WaveSharp</name>
<type>float</type>
<value>
<use>WaveSharp</use>
</value>
</uniform>
<uniform>
<name>WaveAngle</name>
<type>float</type>
<value>
<use>WaveAngle</use>
</value>
</uniform>
<uniform>
<name>WaveFactor</name>
<type>float</type>
<value>
<use>WaveFactor</use>
</value>
</uniform>
<uniform>
<name>WaveDAngle</name>
<type>float</type>
<value>
<use>WaveDAngle</use>
</value>
</uniform>
<uniform>
<name>Noise</name>
<type>sampler-3d</type>
<value type="int">9</value>
</uniform>
<!-- BEGIN fog include -->
<uniform>
<name>visibility</name>
<type>float</type>
<value>
<use>visibility</use>
</value>
</uniform>
<uniform>
<name>avisibility</name>
<type>float</type>
<value>
<use>avisibility</use>
</value>
</uniform>
<uniform>
<name>hazeLayerAltitude</name>
<type>float</type>
<value>
<use>lthickness</use>
</value>
</uniform>
<uniform>
<name>scattering</name>
<type>float</type>
<value>
<use>scattering</use>
</value>
</uniform>
<uniform>
<name>terminator</name>
<type>float</type>
<value>
<use>terminator</use>
</value>
</uniform>
<uniform>
<name>fogType</name>
<type>int</type>
<value>
<use>fogtype</use>
</value>
</uniform>
<!-- END fog include -->
</pass> </pass>
</technique> </technique>
<technique n="9"> <technique n="9">
<predicate> <predicate>
<and> <and>
<property>/sim/rendering/water-shader</property> <property>/sim/rendering/shaders/water</property>
<property>/sim/rendering/shader-effects</property> <less-equal>
<value type="float">2.0</value>
<float-property>/sim/rendering/shaders/water</float-property>
</less-equal>
<or> <or>
<less-equal> <less-equal>
<value type="float">2.0</value> <value type="float">2.0</value>
@ -415,17 +555,323 @@
</render-bin> </render-bin>
<texture-unit> <texture-unit>
<unit>0</unit> <unit>0</unit>
<image>
<use>texture[0]/image</use>
</image>
<filter>
<use>texture[0]/filter</use>
</filter>
<wrap-s>
<use>texture[0]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[0]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[0]/internal-format</use>
</internal-format>
</texture-unit>
<texture-unit>
<unit>2</unit>
<image>
<use>texture[2]/image</use>
</image>
<filter>
<use>texture[2]/filter</use>
</filter>
<wrap-s>
<use>texture[2]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[2]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[2]/internal-format</use>
</internal-format>
</texture-unit>
<texture-unit>
<unit>3</unit>
<image>
<use>texture[3]/image</use>
</image>
<filter>
<use>texture[3]/filter</use>
</filter>
<wrap-s>
<use>texture[3]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[3]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[3]/internal-format</use>
</internal-format>
</texture-unit>
<texture-unit>
<unit>4</unit>
<image>
<use>texture[4]/image</use>
</image>
<filter>
<use>texture[4]/filter</use>
</filter>
<wrap-s>
<use>texture[4]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[4]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[4]/internal-format</use>
</internal-format>
</texture-unit>
<texture-unit>
<unit>5</unit>
<image>
<use>texture[5]/image</use>
</image>
<filter>
<use>texture[5]/filter</use>
</filter>
<wrap-s>
<use>texture[5]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[5]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[5]/internal-format</use>
</internal-format>
</texture-unit>
<texture-unit>
<unit>6</unit>
<image>
<use>texture[6]/image</use>
</image>
<filter>
<use>texture[6]/filter</use>
</filter>
<wrap-s>
<use>texture[6]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[6]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[6]/internal-format</use>
</internal-format>
</texture-unit>
<texture-unit>
<unit>9</unit>
<type>noise</type> <type>noise</type>
</texture-unit> </texture-unit>
<program> <program>
<vertex-shader>Shaders/water-orig.vert</vertex-shader> <vertex-shader>Shaders/include_fog.vert</vertex-shader>
<fragment-shader>Shaders/water-orig.frag</fragment-shader> <vertex-shader>Shaders/water.vert</vertex-shader>
<fragment-shader>Shaders/include_fog.frag</fragment-shader>
<fragment-shader>Shaders/water.frag</fragment-shader>
</program> </program>
<uniform> <uniform>
<name>texture</name> <name>water_reflection</name>
<type>sampler-3d</type> <type>sampler-2d</type>
<value type="int">0</value> <value type="int">0</value>
</uniform> </uniform>
<uniform>
<name>water_normalmap</name>
<type>sampler-2d</type>
<value type="int">2</value>
</uniform>
<uniform>
<name>water_dudvmap</name>
<type>sampler-2d</type>
<value type="int">3</value>
</uniform>
<uniform>
<name>water_reflection_grey</name>
<type>sampler-2d</type>
<value type="int">4</value>
</uniform>
<uniform>
<name>sea_foam</name>
<type>sampler-2d</type>
<value type="int">5</value>
</uniform>
<uniform>
<name>perlin_normalmap</name>
<type>sampler-2d</type>
<value type="int">6</value>
</uniform>
<uniform>
<name>saturation</name>
<type>float</type>
<!--<value>0.4</value>-->
<value>
<use>saturation</use>
</value>
</uniform>
<uniform>
<name>CloudCover0</name>
<type>float</type>
<value>
<use>cloud-cover[0]</use>
</value>
</uniform>
<uniform>
<name>CloudCover1</name>
<type>float</type>
<value>
<use>cloud-cover[1]</use>
</value>
</uniform>
<uniform>
<name>CloudCover2</name>
<type>float</type>
<value>
<use>cloud-cover[2]</use>
</value>
</uniform>
<uniform>
<name>CloudCover3</name>
<type>float</type>
<value>
<use>cloud-cover[3]</use>
</value>
</uniform>
<uniform>
<name>CloudCover4</name>
<type>float</type>
<value>
<use>cloud-cover[4]</use>
</value>
</uniform>
<uniform>
<name>Status</name>
<type>int</type>
<value>
<use>status</use>
</value>
<!--<value type="int">0</value> -->
</uniform>
<uniform>
<name>Overcast</name>
<type>float</type>
<value>
<use>overcast</use>
</value>
</uniform>
<uniform>
<name>WindE</name>
<type>float</type>
<value>
<use>windE</use>
</value>
</uniform>
<uniform>
<name>WindN</name>
<type>float</type>
<value>
<use>windN</use>
</value>
</uniform>
<uniform>
<name>WindFrom</name>
<type>float</type>
<value>
<use>wind-from</use>
</value>
</uniform>
<uniform>
<name>WaveFreq</name>
<type>float</type>
<value>
<use>WaveFreq</use>
</value>
</uniform>
<uniform>
<name>WaveAmp</name>
<type>float</type>
<value>
<use>WaveAmp</use>
</value>
</uniform>
<uniform>
<name>WaveSharp</name>
<type>float</type>
<value>
<use>WaveSharp</use>
</value>
</uniform>
<uniform>
<name>WaveAngle</name>
<type>float</type>
<value>
<use>WaveAngle</use>
</value>
</uniform>
<uniform>
<name>WaveFactor</name>
<type>float</type>
<value>
<use>WaveFactor</use>
</value>
</uniform>
<uniform>
<name>WaveDAngle</name>
<type>float</type>
<value>
<use>WaveDAngle</use>
</value>
</uniform>
<uniform>
<name>Noise</name>
<type>sampler-3d</type>
<value type="int">9</value>
</uniform>
<!-- BEGIN fog include -->
<uniform>
<name>visibility</name>
<type>float</type>
<value>
<use>visibility</use>
</value>
</uniform>
<uniform>
<name>avisibility</name>
<type>float</type>
<value>
<use>avisibility</use>
</value>
</uniform>
<uniform>
<name>hazeLayerAltitude</name>
<type>float</type>
<value>
<use>lthickness</use>
</value>
</uniform>
<uniform>
<name>scattering</name>
<type>float</type>
<value>
<use>scattering</use>
</value>
</uniform>
<uniform>
<name>terminator</name>
<type>float</type>
<value>
<use>terminator</use>
</value>
</uniform>
<uniform>
<name>fogType</name>
<type>int</type>
<value>
<use>fogtype</use>
</value>
</uniform>
<!-- END fog include -->
</pass> </pass>
</technique> </technique>
</PropertyList> </PropertyList>