Merge branch 'master' of git://gitorious.org/fg/fgdata
This commit is contained in:
commit
8218cf2580
26 changed files with 119 additions and 72 deletions
|
@ -109,7 +109,7 @@
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
<use>/environment/terminator-relative-position-m</use>
|
||||||
</terminator>
|
</terminator>
|
||||||
<fogtype>
|
<fogtype>
|
||||||
<use>/sim/rendering/scattering-shader</use>
|
<use>/sim/rendering/shaders/skydome</use>
|
||||||
</fogtype>
|
</fogtype>
|
||||||
<!-- END fog include -->
|
<!-- END fog include -->
|
||||||
</parameters>
|
</parameters>
|
||||||
|
@ -117,10 +117,9 @@
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shaders/water</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">2.0</value>
|
||||||
<float-property>/sim/rendering/shaders/quality-level</float-property>
|
<float-property>/sim/rendering/shaders/water</float-property>
|
||||||
</less-equal>
|
</less-equal>
|
||||||
<or>
|
<or>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
|
@ -492,7 +491,6 @@
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shaders/water</property>
|
<property>/sim/rendering/shaders/water</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>
|
||||||
|
|
|
@ -37,7 +37,7 @@ in Aircraft/A320/Models/Effects/a320_bumpspec.eff ( or whatever, private to the
|
||||||
<technique n="10">
|
<technique n="10">
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shader-effects</property>
|
<property>/sim/rendering/shaders/model</property>
|
||||||
<or>
|
<or>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
<value type="float">2.0</value>
|
<value type="float">2.0</value>
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
<use>/environment/terminator-relative-position-m</use>
|
||||||
</terminator>
|
</terminator>
|
||||||
<fogtype>
|
<fogtype>
|
||||||
<use>/sim/rendering/scattering-shader</use>
|
<use>/sim/rendering/shaders/skydome</use>
|
||||||
</fogtype>
|
</fogtype>
|
||||||
<!-- END fog include -->
|
<!-- END fog include -->
|
||||||
|
|
||||||
|
@ -49,11 +49,7 @@
|
||||||
<technique n="9">
|
<technique n="9">
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<!--<property>/sim/rendering/shader-effects</property>-->
|
<property>/sim/rendering/shaders/generic</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>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<depth-factor type="float">0.01</depth-factor>
|
<depth-factor type="float">0.01</depth-factor>
|
||||||
<canopy-height type="float">15.0</canopy-height>
|
<canopy-height type="float">15.0</canopy-height>
|
||||||
<quality-level>
|
<quality-level>
|
||||||
<use>/sim/rendering/shaders/quality-level</use>
|
<use>/sim/rendering/shaders/landmass</use>
|
||||||
</quality-level>
|
</quality-level>
|
||||||
</parameters>
|
</parameters>
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
<use>/environment/terminator-relative-position-m</use>
|
||||||
</terminator>
|
</terminator>
|
||||||
<fogtype>
|
<fogtype>
|
||||||
<use>/sim/rendering/scattering-shader</use>
|
<use>/sim/rendering/shaders/skydome</use>
|
||||||
</fogtype>
|
</fogtype>
|
||||||
<!-- END fog include -->
|
<!-- END fog include -->
|
||||||
|
|
||||||
|
@ -50,8 +50,8 @@
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shaders/landmass</property>
|
<property>/sim/rendering/shaders/landmass</property>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
<value type="float">4.5</value>
|
<value type="float">4.0</value>
|
||||||
<float-property>/sim/rendering/shaders/quality-level</float-property>
|
<float-property>/sim/rendering/shaders/landmass</float-property>
|
||||||
</less-equal>
|
</less-equal>
|
||||||
<or>
|
<or>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
|
|
|
@ -9,13 +9,13 @@
|
||||||
<material>
|
<material>
|
||||||
<color-mode-uniform>1</color-mode-uniform> <!-- DIFFUSE -->
|
<color-mode-uniform>1</color-mode-uniform> <!-- DIFFUSE -->
|
||||||
</material>
|
</material>
|
||||||
<condition><use>/sim/rendering/shader-effects</use></condition>
|
<condition><use>/sim/rendering/shader/generic</use></condition>
|
||||||
<factor>1</factor>
|
<factor>1</factor>
|
||||||
</parameters>
|
</parameters>
|
||||||
<technique n="10">
|
<technique n="10">
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shader-effects</property>
|
<property>/sim/rendering/shaders/generic</property>
|
||||||
<or>
|
<or>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
<value type="float">2.0</value>
|
<value type="float">2.0</value>
|
||||||
|
|
|
@ -133,7 +133,7 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
<use>/environment/terminator-relative-position-m</use>
|
||||||
</terminator>
|
</terminator>
|
||||||
<fogtype>
|
<fogtype>
|
||||||
<use>/sim/rendering/scattering-shader</use>
|
<use>/sim/rendering/shaders/skydome</use>
|
||||||
</fogtype>
|
</fogtype>
|
||||||
<!-- END fog include -->
|
<!-- END fog include -->
|
||||||
</parameters>
|
</parameters>
|
||||||
|
@ -147,7 +147,6 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shaders/model</property>
|
<property>/sim/rendering/shaders/model</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>
|
||||||
|
|
|
@ -28,14 +28,14 @@
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
<use>/environment/terminator-relative-position-m</use>
|
||||||
</terminator>
|
</terminator>
|
||||||
<fogtype>
|
<fogtype>
|
||||||
<use>/sim/rendering/scattering-shader</use>
|
<use>/sim/rendering/shaders/skydome</use>
|
||||||
</fogtype>
|
</fogtype>
|
||||||
<!-- END fog include -->
|
<!-- END fog include -->
|
||||||
</parameters>
|
</parameters>
|
||||||
<technique n="10">
|
<technique n="10">
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shader-effects</property>
|
<property>/sim/rendering/shaders/generic</property>
|
||||||
<or>
|
<or>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
<value type="float">2.0</value>
|
<value type="float">2.0</value>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<technique n="10">
|
<technique n="10">
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shader-effects</property>
|
<property>/sim/rendering/clouds3d-enable</property>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
<value type="float">1.0</value>
|
<value type="float">1.0</value>
|
||||||
<shader-language/>
|
<shader-language/>
|
||||||
|
|
|
@ -123,7 +123,7 @@ EXAMPLES: You can find examples of both usages in the Hunter and Lightning model
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
<use>/environment/terminator-relative-position-m</use>
|
||||||
</terminator>
|
</terminator>
|
||||||
<fogtype>
|
<fogtype>
|
||||||
<use>/sim/rendering/scattering-shader</use>
|
<use>/sim/rendering/shaders/skydome</use>
|
||||||
</fogtype>
|
</fogtype>
|
||||||
</parameters>
|
</parameters>
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ EXAMPLES: You can find examples of both usages in the Hunter and Lightning model
|
||||||
<technique n="9">
|
<technique n="9">
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shader-effects</property>
|
<property>/sim/rendering/shaders/model</property>
|
||||||
<or>
|
<or>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
<value type="float">2.0</value>
|
<value type="float">2.0</value>
|
||||||
|
|
|
@ -114,7 +114,7 @@
|
||||||
|
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shader-effects</property>
|
<property>/sim/rendering/shaders/model</property>
|
||||||
<or>
|
<or>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
<value type="float">2.0</value>
|
<value type="float">2.0</value>
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
<use>/environment/terminator-relative-position-m</use>
|
||||||
</terminator>
|
</terminator>
|
||||||
<fogtype>
|
<fogtype>
|
||||||
<use>/sim/rendering/scattering-shader</use>
|
<use>/sim/rendering/shaders/skydome</use>
|
||||||
</fogtype>
|
</fogtype>
|
||||||
<!-- END fog include -->
|
<!-- END fog include -->
|
||||||
</parameters>
|
</parameters>
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
<technique n="9">
|
<technique n="9">
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shader-effects</property>
|
<property>/sim/rendering/shaders/generic</property>
|
||||||
<or>
|
<or>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
<value type="float">2.0</value>
|
<value type="float">2.0</value>
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
<technique n="8">
|
<technique n="8">
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/skydome</property>
|
<property>/sim/rendering/shaders/skydome</property>
|
||||||
<or>
|
<or>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
<use>/environment/terminator-relative-position-m</use>
|
||||||
</terminator>
|
</terminator>
|
||||||
<fogtype>
|
<fogtype>
|
||||||
<use>/sim/rendering/scattering-shader</use>
|
<use>/sim/rendering/shaders/skydome</use>
|
||||||
</fogtype>
|
</fogtype>
|
||||||
</parameters>
|
</parameters>
|
||||||
<!-- put techniques at a "high" index to allow derived effects to
|
<!-- put techniques at a "high" index to allow derived effects to
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
<technique n="10">
|
<technique n="10">
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shader-effects</property>
|
<property>/sim/rendering/shaders/generic</property>
|
||||||
|
|
||||||
<or>
|
<or>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<technique n="10">
|
<technique n="10">
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shader-effects</property>
|
<property>/sim/rendering/shaders/generic</property>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
<value type="float">1.0</value>
|
<value type="float">1.0</value>
|
||||||
<shader-language/>
|
<shader-language/>
|
||||||
|
|
|
@ -80,7 +80,7 @@ parameters :
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
<use>/environment/terminator-relative-position-m</use>
|
||||||
</terminator>
|
</terminator>
|
||||||
<fogtype>
|
<fogtype>
|
||||||
<use>/sim/rendering/scattering-shader</use>
|
<use>/sim/rendering/shaders/skydome</use>
|
||||||
</fogtype>
|
</fogtype>
|
||||||
<!-- END fog include -->
|
<!-- END fog include -->
|
||||||
</parameters>
|
</parameters>
|
||||||
|
@ -94,7 +94,6 @@ parameters :
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shaders/transition</property>
|
<property>/sim/rendering/shaders/transition</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>
|
||||||
|
|
|
@ -33,14 +33,13 @@
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
<use>/environment/terminator-relative-position-m</use>
|
||||||
</terminator>
|
</terminator>
|
||||||
<fogtype>
|
<fogtype>
|
||||||
<use>/sim/rendering/scattering-shader</use>
|
<use>/sim/rendering/shaders/skydome</use>
|
||||||
</fogtype>
|
</fogtype>
|
||||||
<!-- END fog include -->
|
<!-- 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>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
<use>/environment/terminator-relative-position-m</use>
|
||||||
</terminator>
|
</terminator>
|
||||||
<fogtype>
|
<fogtype>
|
||||||
<use>/sim/rendering/scattering-shader</use>
|
<use>/sim/rendering/shaders/skydome</use>
|
||||||
</fogtype>
|
</fogtype>
|
||||||
<!-- END fog include -->
|
<!-- END fog include -->
|
||||||
|
|
||||||
|
@ -43,7 +43,6 @@
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shaders/urban</property>
|
<property>/sim/rendering/shaders/urban</property>
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<less-equal>
|
<less-equal>
|
||||||
<value type="float">4.0</value>
|
<value type="float">4.0</value>
|
||||||
<float-property>/sim/rendering/shaders/urban</float-property>
|
<float-property>/sim/rendering/shaders/urban</float-property>
|
||||||
|
@ -288,10 +287,9 @@
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shaders/urban</property>
|
<property>/sim/rendering/shaders/urban</property>
|
||||||
<!--<property>/sim/rendering/shader-effects</property>-->
|
|
||||||
<less-equal>
|
<less-equal>
|
||||||
<value type="float">2.0</value>
|
<value type="float">2.0</value>
|
||||||
<float-property>/sim/rendering/shaders/quality-level</float-property>
|
<float-property>/sim/rendering/shaders/urban</float-property>
|
||||||
</less-equal>
|
</less-equal>
|
||||||
<or>
|
<or>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
|
|
|
@ -66,18 +66,17 @@
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
<use>/environment/terminator-relative-position-m</use>
|
||||||
</terminator>
|
</terminator>
|
||||||
<fogtype>
|
<fogtype>
|
||||||
<use>/sim/rendering/scattering-shader</use>
|
<use>/sim/rendering/shaders/skydome</use>
|
||||||
</fogtype>
|
</fogtype>
|
||||||
<!-- END fog include -->
|
<!-- 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">2.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>
|
||||||
|
@ -310,8 +309,7 @@
|
||||||
<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>
|
|
||||||
<or>
|
<or>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
<value type="float">2.0</value>
|
<value type="float">2.0</value>
|
||||||
|
|
|
@ -125,7 +125,7 @@
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
<use>/environment/terminator-relative-position-m</use>
|
||||||
</terminator>
|
</terminator>
|
||||||
<fogtype>
|
<fogtype>
|
||||||
<use>/sim/rendering/scattering-shader</use>
|
<use>/sim/rendering/shaders/skydome</use>
|
||||||
</fogtype>
|
</fogtype>
|
||||||
<!-- END fog include -->
|
<!-- END fog include -->
|
||||||
</parameters>
|
</parameters>
|
||||||
|
|
|
@ -12,6 +12,7 @@ $Id$
|
||||||
|
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
|
|
||||||
|
<name>applesmc</name>
|
||||||
<name>ST LIS3LV02DL Accelerometer</name>
|
<name>ST LIS3LV02DL Accelerometer</name>
|
||||||
<name>ST LIS3L V02DL Accelerometer</name>
|
<name>ST LIS3L V02DL Accelerometer</name>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// -*-C++-*-
|
// -*-C++-*-
|
||||||
// Texture switching based on face slope and snow level
|
// Texture switching based on face slope and snow level
|
||||||
// based on earlier work by Frederic Bouvier, Tim Moore, and Yves Sablonier.
|
// based on earlier work by Frederic Bouvier, Tim Moore, and Yves Sablonier.
|
||||||
// Š Emilian Huminiuc 2011
|
// <EFBFBD> Emilian Huminiuc 2011
|
||||||
|
|
||||||
// Ambient term comes in gl_Color.rgb.
|
// Ambient term comes in gl_Color.rgb.
|
||||||
varying vec4 diffuse_term, RawPos;
|
varying vec4 diffuse_term, RawPos;
|
||||||
|
@ -35,7 +35,7 @@ void main()
|
||||||
|
|
||||||
Noise = texture3D(NoiseTex, RawPos.xyz*0.0011);
|
Noise = texture3D(NoiseTex, RawPos.xyz*0.0011);
|
||||||
MixFactor = Noise.r * Noise.g * Noise.b; //Mixing Factor to create a more organic looking boundary
|
MixFactor = Noise.r * Noise.g * Noise.b; //Mixing Factor to create a more organic looking boundary
|
||||||
MixFactor *= 300;
|
MixFactor *= 300.0;
|
||||||
MixFactor = clamp(MixFactor, 0.0, 1.0);
|
MixFactor = clamp(MixFactor, 0.0, 1.0);
|
||||||
L1 = 0.90 - 0.02 * MixFactor; //first transition slope
|
L1 = 0.90 - 0.02 * MixFactor; //first transition slope
|
||||||
L2 = 0.78 + 0.04 * MixFactor; //Second transition slope
|
L2 = 0.78 + 0.04 * MixFactor; //Second transition slope
|
||||||
|
@ -69,7 +69,7 @@ void main()
|
||||||
vec4 baseTexel = texture2D(BaseTex, gl_TexCoord[0].st);
|
vec4 baseTexel = texture2D(BaseTex, gl_TexCoord[0].st);
|
||||||
vec4 secondTexel = texture2D(SecondTex, gl_TexCoord[0].st);
|
vec4 secondTexel = texture2D(SecondTex, gl_TexCoord[0].st);
|
||||||
vec4 thirdTexel = texture2D(ThirdTex, gl_TexCoord[0].st);
|
vec4 thirdTexel = texture2D(ThirdTex, gl_TexCoord[0].st);
|
||||||
vec4 snowTexel = texture2D(SnowTex, gl_TexCoord[0].st * 2);
|
vec4 snowTexel = texture2D(SnowTex, gl_TexCoord[0].st);
|
||||||
//Normal transition. For more abrupt faces apply another texture (or 2).
|
//Normal transition. For more abrupt faces apply another texture (or 2).
|
||||||
if (InverseSlope == 0.0) {
|
if (InverseSlope == 0.0) {
|
||||||
//Do we do an intermediate transition
|
//Do we do an intermediate transition
|
||||||
|
@ -123,10 +123,10 @@ void main()
|
||||||
texel.rgb = texel.rgb * wetness;
|
texel.rgb = texel.rgb * wetness;
|
||||||
|
|
||||||
|
|
||||||
|
float altitude = RawPos.z;
|
||||||
//Snow texture for areas higher than SnowLevel
|
//Snow texture for areas higher than SnowLevel
|
||||||
if (RawPos.z >= SnowLevel - (1000.0 * slope + 300 * MixFactor) && slope > L2 - 0.12) {
|
if (altitude >= SnowLevel - (1000.0 * slope + 300.0 * MixFactor) && slope > L2 - 0.12) {
|
||||||
texel = mix(texel, mix(texel, snowTexel, smoothstep(L2 - 0.09 * MixFactor, L2, slope)), smoothstep(SnowLevel - (1000.0 * slope + 300 * MixFactor), SnowLevel - (1000 * slope - 150 * MixFactor), RawPos.z));
|
texel = mix(texel, mix(texel, snowTexel, smoothstep(L2 - 0.09 * MixFactor, L2, slope)), smoothstep(SnowLevel - (1000.0 * slope + 300.0 * MixFactor), SnowLevel - (1000.0 * slope - 150.0 * MixFactor), altitude));
|
||||||
}
|
}
|
||||||
|
|
||||||
fragColor = color * texel + specular;
|
fragColor = color * texel + specular;
|
||||||
|
@ -139,6 +139,7 @@ void main()
|
||||||
}
|
}
|
||||||
|
|
||||||
//fogFactor = exp(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord);
|
//fogFactor = exp(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord);
|
||||||
|
fragColor.rgb *= 1.2 - 0.4 * MixFactor;
|
||||||
fragColor.rgb = fog_Func(fragColor.rgb, fogType);
|
fragColor.rgb = fog_Func(fragColor.rgb, fogType);
|
||||||
//gl_FragColor = mix(gl_Fog.color, fragColor, fogFactor);
|
//gl_FragColor = mix(gl_Fog.color, fragColor, fogFactor);
|
||||||
gl_FragColor = fragColor;
|
gl_FragColor = fragColor;
|
||||||
|
|
|
@ -69,7 +69,7 @@ void main (void)
|
||||||
float pf;
|
float pf;
|
||||||
|
|
||||||
///BEGIN bump
|
///BEGIN bump
|
||||||
if (nmap_enabled > 0 && shader_qual > 1){
|
if (nmap_enabled > 0 && shader_qual > 2){
|
||||||
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)
|
||||||
|
@ -107,7 +107,7 @@ void main (void)
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
//BEGIN reflect
|
//BEGIN reflect
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
if (refl_enabled > 0 && shader_qual > 0){
|
if (refl_enabled > 0 && shader_qual > 1){
|
||||||
float reflFactor;
|
float reflFactor;
|
||||||
float transparency_offset = clamp(refl_correction, -1.0, 1.0);// set the user shininess offset
|
float transparency_offset = clamp(refl_correction, -1.0, 1.0);// set the user shininess offset
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ void main (void)
|
||||||
// map the shininess of the object with user input
|
// map the shininess of the object with user input
|
||||||
//float pam = (map.a * -2) + 1; //reverse map
|
//float pam = (map.a * -2) + 1; //reverse map
|
||||||
reflFactor = reflmap.a + transparency_offset;
|
reflFactor = reflmap.a + transparency_offset;
|
||||||
} else if (nmap_enabled > 0 && shader_qual > 1) {
|
} 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 / 128.0) * nmap.a + transparency_offset;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -50,7 +50,7 @@ void main(void)
|
||||||
fog_Func(fogType);
|
fog_Func(fogType);
|
||||||
|
|
||||||
VNormal = normalize(gl_NormalMatrix * gl_Normal);
|
VNormal = normalize(gl_NormalMatrix * gl_Normal);
|
||||||
if (nmap_enabled > 0 && shader_qual > 1){
|
if (nmap_enabled > 0 && shader_qual > 2){
|
||||||
VTangent = normalize(gl_NormalMatrix * tangent);
|
VTangent = normalize(gl_NormalMatrix * tangent);
|
||||||
VBinormal = normalize(gl_NormalMatrix * binormal);
|
VBinormal = normalize(gl_NormalMatrix * binormal);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -171,7 +171,7 @@
|
||||||
|
|
||||||
<checkbox>
|
<checkbox>
|
||||||
<halign>left</halign>
|
<halign>left</halign>
|
||||||
<label>Random objects (triggers scenery reload)</label>
|
<label>Random objects</label>
|
||||||
<name>random-objects</name>
|
<name>random-objects</name>
|
||||||
<property>/sim/rendering/random-objects</property>
|
<property>/sim/rendering/random-objects</property>
|
||||||
<binding>
|
<binding>
|
||||||
|
@ -342,6 +342,21 @@
|
||||||
</hrule>
|
</hrule>
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
|
<group>
|
||||||
|
<layout>vbox</layout>
|
||||||
|
<padding>4</padding>
|
||||||
|
<text>
|
||||||
|
<padding>0</padding>
|
||||||
|
<label>This slider overrides custom settings as set in</label>
|
||||||
|
<halign>left</halign>
|
||||||
|
</text>
|
||||||
|
<text>
|
||||||
|
<padding>0</padding>
|
||||||
|
<label>the (advanced) Shader Options dialog.</label>
|
||||||
|
<halign>left</halign>
|
||||||
|
</text>
|
||||||
|
</group>
|
||||||
|
|
||||||
<group>
|
<group>
|
||||||
<layout>hbox</layout>
|
<layout>hbox</layout>
|
||||||
|
|
||||||
|
@ -375,9 +390,6 @@
|
||||||
<layout>hbox</layout>
|
<layout>hbox</layout>
|
||||||
<button>
|
<button>
|
||||||
<legend>Shader Options</legend>
|
<legend>Shader Options</legend>
|
||||||
<enable>
|
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
</enable>
|
|
||||||
<binding>
|
<binding>
|
||||||
<command>dialog-show</command>
|
<command>dialog-show</command>
|
||||||
<dialog-name>shaders</dialog-name>
|
<dialog-name>shaders</dialog-name>
|
||||||
|
@ -399,7 +411,6 @@
|
||||||
<green>0.6</green>
|
<green>0.6</green>
|
||||||
<blue>0.6</blue>
|
<blue>0.6</blue>
|
||||||
</color>
|
</color>
|
||||||
|
|
||||||
</text>
|
</text>
|
||||||
<text>
|
<text>
|
||||||
<visible>
|
<visible>
|
||||||
|
@ -604,6 +615,25 @@
|
||||||
<nasal>
|
<nasal>
|
||||||
<open>
|
<open>
|
||||||
gui.enable_widgets(cmdarg(), "shadows-debug", getprop("/sim/gui/devel-widgets"));
|
gui.enable_widgets(cmdarg(), "shadows-debug", getprop("/sim/gui/devel-widgets"));
|
||||||
|
|
||||||
|
# overwrite custom shader settings on quality-slider input
|
||||||
|
_setlistener("/sim/rendering/shaders/quality-level", func {
|
||||||
|
var qualityLevel = getprop("/sim/rendering/shaders/quality-level");
|
||||||
|
setprop("/sim/rendering/shaders/landmass",qualityLevel);
|
||||||
|
setprop("/sim/rendering/shaders/urban",qualityLevel);
|
||||||
|
setprop("/sim/rendering/shaders/water",qualityLevel);
|
||||||
|
if (qualityLevel >= 1.0){
|
||||||
|
qualityLevel = 1.0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
qualityLevel = 0.0;
|
||||||
|
}
|
||||||
|
setprop("/sim/rendering/shaders/contrails",qualityLevel);
|
||||||
|
setprop("/sim/rendering/shaders/crop",qualityLevel);
|
||||||
|
setprop("/sim/rendering/shaders/generic",qualityLevel);
|
||||||
|
setprop("/sim/rendering/shaders/model",qualityLevel);
|
||||||
|
setprop("/sim/rendering/shaders/transition",qualityLevel);
|
||||||
|
});
|
||||||
</open>
|
</open>
|
||||||
</nasal>
|
</nasal>
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -52,6 +52,14 @@
|
||||||
<layout>vbox</layout>
|
<layout>vbox</layout>
|
||||||
<halign>left</halign>
|
<halign>left</halign>
|
||||||
|
|
||||||
|
<text>
|
||||||
|
<halign>left</halign>
|
||||||
|
<label>Generic</label>
|
||||||
|
<enable>
|
||||||
|
<property>/sim/rendering/shaders/generic</property>
|
||||||
|
</enable>
|
||||||
|
</text>
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
<halign>left</halign>
|
<halign>left</halign>
|
||||||
<label>Crop</label>
|
<label>Crop</label>
|
||||||
|
@ -108,18 +116,32 @@
|
||||||
</enable>
|
</enable>
|
||||||
</text>
|
</text>
|
||||||
|
|
||||||
|
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
<group>
|
<group>
|
||||||
<layout>vbox</layout>
|
<layout>vbox</layout>
|
||||||
|
|
||||||
|
<slider>
|
||||||
|
<name>generic</name>
|
||||||
|
<min>0.0</min>
|
||||||
|
<max>1.0</max>
|
||||||
|
<step>1.0</step>
|
||||||
|
<fraction>0.5</fraction>
|
||||||
|
<live>true</live>
|
||||||
|
<property>/sim/rendering/shaders/generic</property>
|
||||||
|
<binding>
|
||||||
|
<command>dialog-apply</command>
|
||||||
|
<object-name>generic</object-name>
|
||||||
|
</binding>
|
||||||
|
</slider>
|
||||||
|
|
||||||
<slider>
|
<slider>
|
||||||
<name>crop</name>
|
<name>crop</name>
|
||||||
<min>0.0</min>
|
<min>0.0</min>
|
||||||
<max>1.0</max>
|
<max>1.0</max>
|
||||||
<step>1.0</step>
|
<step>1.0</step>
|
||||||
<fraction>0.5</fraction>
|
<fraction>0.5</fraction>
|
||||||
|
<live>true</live>
|
||||||
<property>/sim/rendering/shaders/crop</property>
|
<property>/sim/rendering/shaders/crop</property>
|
||||||
<binding>
|
<binding>
|
||||||
<command>dialog-apply</command>
|
<command>dialog-apply</command>
|
||||||
|
@ -130,9 +152,10 @@
|
||||||
<slider>
|
<slider>
|
||||||
<name>landmass</name>
|
<name>landmass</name>
|
||||||
<min>0.0</min>
|
<min>0.0</min>
|
||||||
<max>1.0</max>
|
<max>5.0</max>
|
||||||
<step>1.0</step>
|
<step>1.0</step>
|
||||||
<fraction>0.5</fraction>
|
<fraction>0.17</fraction>
|
||||||
|
<live>true</live>
|
||||||
<property>/sim/rendering/shaders/landmass</property>
|
<property>/sim/rendering/shaders/landmass</property>
|
||||||
<binding>
|
<binding>
|
||||||
<command>dialog-apply</command>
|
<command>dialog-apply</command>
|
||||||
|
@ -146,6 +169,7 @@
|
||||||
<max>1.0</max>
|
<max>1.0</max>
|
||||||
<step>1.0</step>
|
<step>1.0</step>
|
||||||
<fraction>0.5</fraction>
|
<fraction>0.5</fraction>
|
||||||
|
<live>true</live>
|
||||||
<property>/sim/rendering/shaders/contrails</property>
|
<property>/sim/rendering/shaders/contrails</property>
|
||||||
<binding>
|
<binding>
|
||||||
<command>dialog-apply</command>
|
<command>dialog-apply</command>
|
||||||
|
@ -159,6 +183,7 @@
|
||||||
<max>1.0</max>
|
<max>1.0</max>
|
||||||
<step>1.0</step>
|
<step>1.0</step>
|
||||||
<fraction>0.5</fraction>
|
<fraction>0.5</fraction>
|
||||||
|
<live>true</live>
|
||||||
<property>/sim/rendering/shaders/transition</property>
|
<property>/sim/rendering/shaders/transition</property>
|
||||||
<binding>
|
<binding>
|
||||||
<command>dialog-apply</command>
|
<command>dialog-apply</command>
|
||||||
|
@ -169,9 +194,10 @@
|
||||||
<slider>
|
<slider>
|
||||||
<name>model</name>
|
<name>model</name>
|
||||||
<min>0.0</min>
|
<min>0.0</min>
|
||||||
<max>1.0</max>
|
<max>3.0</max>
|
||||||
<step>1.0</step>
|
<step>1.0</step>
|
||||||
<fraction>0.5</fraction>
|
<fraction>0.25</fraction>
|
||||||
|
<live>true</live>
|
||||||
<property>/sim/rendering/shaders/model</property>
|
<property>/sim/rendering/shaders/model</property>
|
||||||
<binding>
|
<binding>
|
||||||
<command>dialog-apply</command>
|
<command>dialog-apply</command>
|
||||||
|
@ -185,6 +211,7 @@
|
||||||
<max>5.0</max>
|
<max>5.0</max>
|
||||||
<step>1.0</step>
|
<step>1.0</step>
|
||||||
<fraction>0.17</fraction>
|
<fraction>0.17</fraction>
|
||||||
|
<live>true</live>
|
||||||
<property>/sim/rendering/shaders/urban</property>
|
<property>/sim/rendering/shaders/urban</property>
|
||||||
<binding>
|
<binding>
|
||||||
<command>dialog-apply</command>
|
<command>dialog-apply</command>
|
||||||
|
@ -198,6 +225,7 @@
|
||||||
<max>5.0</max>
|
<max>5.0</max>
|
||||||
<step>1.0</step>
|
<step>1.0</step>
|
||||||
<fraction>0.17</fraction>
|
<fraction>0.17</fraction>
|
||||||
|
<live>true</live>
|
||||||
<property>/sim/rendering/shaders/water</property>
|
<property>/sim/rendering/shaders/water</property>
|
||||||
<binding>
|
<binding>
|
||||||
<command>dialog-apply</command>
|
<command>dialog-apply</command>
|
||||||
|
|
|
@ -68,10 +68,11 @@ Started September 2000 by David Megginson, david@megginson.com
|
||||||
<realism type="int">5</realism>
|
<realism type="int">5</realism>
|
||||||
<filtering type="int">8</filtering>
|
<filtering type="int">8</filtering>
|
||||||
<shaders>
|
<shaders>
|
||||||
<model type="float" userarchive="y">1.0</model>
|
<generic type="float" userarchive="y">1.0</generic>
|
||||||
<crop type="float" userarchive="y">1.0</crop>
|
|
||||||
<landmass type="float" userarchive="y">1.0</landmass>
|
<landmass type="float" userarchive="y">1.0</landmass>
|
||||||
|
<model type="float" userarchive="y">1.0</model>
|
||||||
<contrails type="float" userarchive="y">1.0</contrails>
|
<contrails type="float" userarchive="y">1.0</contrails>
|
||||||
|
<crop type="float" userarchive="y">1.0</crop>
|
||||||
<skydome type="bool" userarchive="y">false</skydome>
|
<skydome type="bool" userarchive="y">false</skydome>
|
||||||
<transition type="float" userarchive="y">1.0</transition>
|
<transition type="float" userarchive="y">1.0</transition>
|
||||||
<urban type="float" userarchive="y">1.0</urban>
|
<urban type="float" userarchive="y">1.0</urban>
|
||||||
|
|
Loading…
Reference in a new issue