Quality slider overwrites custom shader settings. All effects now listen to the new sim/rendering/shaders/<foo> properties.
This commit is contained in:
parent
ab07a5c333
commit
6c971211b8
22 changed files with 104 additions and 59 deletions
|
@ -109,7 +109,7 @@
|
|||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<fogtype>
|
||||
<use>/sim/rendering/scattering-shader</use>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
|
@ -117,10 +117,9 @@
|
|||
<predicate>
|
||||
<and>
|
||||
<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/quality-level</float-property>
|
||||
<float-property>/sim/rendering/shaders/water</float-property>
|
||||
</less-equal>
|
||||
<or>
|
||||
<less-equal>
|
||||
|
@ -492,7 +491,6 @@
|
|||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/water</property>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<or>
|
||||
<less-equal>
|
||||
<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">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shader-effects</property>
|
||||
<property>/sim/rendering/shaders/model</property>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<fogtype>
|
||||
<use>/sim/rendering/scattering-shader</use>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- END fog include -->
|
||||
|
||||
|
@ -49,11 +49,7 @@
|
|||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<!--<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>
|
||||
<property>/sim/rendering/shaders/generic</property>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<depth-factor type="float">0.01</depth-factor>
|
||||
<canopy-height type="float">15.0</canopy-height>
|
||||
<quality-level>
|
||||
<use>/sim/rendering/shaders/quality-level</use>
|
||||
<use>/sim/rendering/shaders/landmass</use>
|
||||
</quality-level>
|
||||
</parameters>
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<fogtype>
|
||||
<use>/sim/rendering/scattering-shader</use>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- END fog include -->
|
||||
|
||||
|
@ -50,8 +50,8 @@
|
|||
<and>
|
||||
<property>/sim/rendering/shaders/landmass</property>
|
||||
<less-equal>
|
||||
<value type="float">4.5</value>
|
||||
<float-property>/sim/rendering/shaders/quality-level</float-property>
|
||||
<value type="float">4.0</value>
|
||||
<float-property>/sim/rendering/shaders/landmass</float-property>
|
||||
</less-equal>
|
||||
<or>
|
||||
<less-equal>
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
<material>
|
||||
<color-mode-uniform>1</color-mode-uniform> <!-- DIFFUSE -->
|
||||
</material>
|
||||
<condition><use>/sim/rendering/shader-effects</use></condition>
|
||||
<condition><use>/sim/rendering/shader/generic</use></condition>
|
||||
<factor>1</factor>
|
||||
</parameters>
|
||||
<technique n="10">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shader-effects</property>
|
||||
<property>/sim/rendering/shaders/generic</property>
|
||||
<or>
|
||||
<less-equal>
|
||||
<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>
|
||||
</terminator>
|
||||
<fogtype>
|
||||
<use>/sim/rendering/scattering-shader</use>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
|
@ -147,7 +147,6 @@ please see Docs/README.model-combined.eff for documentation
|
|||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/model</property>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
|
|
|
@ -28,14 +28,14 @@
|
|||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<fogtype>
|
||||
<use>/sim/rendering/scattering-shader</use>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
<technique n="10">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shader-effects</property>
|
||||
<property>/sim/rendering/shaders/generic</property>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<technique n="10">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shader-effects</property>
|
||||
<property>/sim/rendering/clouds3d-enable</property>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<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>
|
||||
</terminator>
|
||||
<fogtype>
|
||||
<use>/sim/rendering/scattering-shader</use>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
</parameters>
|
||||
|
||||
|
@ -135,7 +135,7 @@ EXAMPLES: You can find examples of both usages in the Hunter and Lightning model
|
|||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shader-effects</property>
|
||||
<property>/sim/rendering/shaders/model</property>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shader-effects</property>
|
||||
<property>/sim/rendering/shaders/model</property>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<fogtype>
|
||||
<use>/sim/rendering/scattering-shader</use>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
|
@ -89,7 +89,7 @@
|
|||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shader-effects</property>
|
||||
<property>/sim/rendering/shaders/generic</property>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
<technique n="8">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<property>/sim/rendering/shaders/skydome</property>
|
||||
<or>
|
||||
<less-equal>
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<fogtype>
|
||||
<use>/sim/rendering/scattering-shader</use>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
</parameters>
|
||||
<!-- put techniques at a "high" index to allow derived effects to
|
||||
|
@ -59,7 +59,7 @@
|
|||
<technique n="10">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shader-effects</property>
|
||||
<property>/sim/rendering/shaders/generic</property>
|
||||
|
||||
<or>
|
||||
<less-equal>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<technique n="10">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shader-effects</property>
|
||||
<property>/sim/rendering/shaders/generic</property>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<shader-language/>
|
||||
|
|
|
@ -80,7 +80,7 @@ parameters :
|
|||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<fogtype>
|
||||
<use>/sim/rendering/scattering-shader</use>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
|
@ -94,7 +94,6 @@ parameters :
|
|||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/transition</property>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
|
|
|
@ -33,14 +33,13 @@
|
|||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<fogtype>
|
||||
<use>/sim/rendering/scattering-shader</use>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
<technique n="10">
|
||||
<predicate>
|
||||
<and>
|
||||
<!--<property>/sim/rendering/shader-effects</property>-->
|
||||
<property>/sim/rendering/random-vegetation</property>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<fogtype>
|
||||
<use>/sim/rendering/scattering-shader</use>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- END fog include -->
|
||||
|
||||
|
@ -43,7 +43,6 @@
|
|||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/urban</property>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<less-equal>
|
||||
<value type="float">4.0</value>
|
||||
<float-property>/sim/rendering/shaders/urban</float-property>
|
||||
|
@ -288,10 +287,9 @@
|
|||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/urban</property>
|
||||
<!--<property>/sim/rendering/shader-effects</property>-->
|
||||
<less-equal>
|
||||
<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>
|
||||
<or>
|
||||
<less-equal>
|
||||
|
|
|
@ -66,18 +66,17 @@
|
|||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<fogtype>
|
||||
<use>/sim/rendering/scattering-shader</use>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
<technique n="8">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/water-shader</property>
|
||||
<property>/sim/rendering/shader-effects</property>
|
||||
<property>/sim/rendering/shaders/water</property>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
<float-property>/sim/rendering/quality-level</float-property>
|
||||
<float-property>/sim/rendering/shaders/water</float-property>
|
||||
</less-equal>
|
||||
<or>
|
||||
<less-equal>
|
||||
|
@ -310,8 +309,7 @@
|
|||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/water-shader</property>
|
||||
<property>/sim/rendering/shader-effects</property>
|
||||
<property>/sim/rendering/shaders/water</property>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<fogtype>
|
||||
<use>/sim/rendering/scattering-shader</use>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
|
|
|
@ -171,7 +171,7 @@
|
|||
|
||||
<checkbox>
|
||||
<halign>left</halign>
|
||||
<label>Random objects (triggers scenery reload)</label>
|
||||
<label>Random objects</label>
|
||||
<name>random-objects</name>
|
||||
<property>/sim/rendering/random-objects</property>
|
||||
<binding>
|
||||
|
@ -342,6 +342,21 @@
|
|||
</hrule>
|
||||
</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>
|
||||
<layout>hbox</layout>
|
||||
|
||||
|
@ -375,9 +390,6 @@
|
|||
<layout>hbox</layout>
|
||||
<button>
|
||||
<legend>Shader Options</legend>
|
||||
<enable>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
</enable>
|
||||
<binding>
|
||||
<command>dialog-show</command>
|
||||
<dialog-name>shaders</dialog-name>
|
||||
|
@ -399,7 +411,6 @@
|
|||
<green>0.6</green>
|
||||
<blue>0.6</blue>
|
||||
</color>
|
||||
|
||||
</text>
|
||||
<text>
|
||||
<visible>
|
||||
|
@ -604,6 +615,25 @@
|
|||
<nasal>
|
||||
<open>
|
||||
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>
|
||||
</nasal>
|
||||
</PropertyList>
|
||||
|
|
|
@ -52,6 +52,14 @@
|
|||
<layout>vbox</layout>
|
||||
<halign>left</halign>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>Generic</label>
|
||||
<enable>
|
||||
<property>/sim/rendering/shaders/generic</property>
|
||||
</enable>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>Crop</label>
|
||||
|
@ -108,18 +116,32 @@
|
|||
</enable>
|
||||
</text>
|
||||
|
||||
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<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>
|
||||
<name>crop</name>
|
||||
<min>0.0</min>
|
||||
<max>1.0</max>
|
||||
<step>1.0</step>
|
||||
<fraction>0.5</fraction>
|
||||
<live>true</live>
|
||||
<property>/sim/rendering/shaders/crop</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
|
@ -130,9 +152,10 @@
|
|||
<slider>
|
||||
<name>landmass</name>
|
||||
<min>0.0</min>
|
||||
<max>1.0</max>
|
||||
<max>5.0</max>
|
||||
<step>1.0</step>
|
||||
<fraction>0.5</fraction>
|
||||
<fraction>0.17</fraction>
|
||||
<live>true</live>
|
||||
<property>/sim/rendering/shaders/landmass</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
|
@ -146,6 +169,7 @@
|
|||
<max>1.0</max>
|
||||
<step>1.0</step>
|
||||
<fraction>0.5</fraction>
|
||||
<live>true</live>
|
||||
<property>/sim/rendering/shaders/contrails</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
|
@ -159,6 +183,7 @@
|
|||
<max>1.0</max>
|
||||
<step>1.0</step>
|
||||
<fraction>0.5</fraction>
|
||||
<live>true</live>
|
||||
<property>/sim/rendering/shaders/transition</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
|
@ -169,9 +194,10 @@
|
|||
<slider>
|
||||
<name>model</name>
|
||||
<min>0.0</min>
|
||||
<max>1.0</max>
|
||||
<max>3.0</max>
|
||||
<step>1.0</step>
|
||||
<fraction>0.5</fraction>
|
||||
<fraction>0.25</fraction>
|
||||
<live>true</live>
|
||||
<property>/sim/rendering/shaders/model</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
|
@ -185,6 +211,7 @@
|
|||
<max>5.0</max>
|
||||
<step>1.0</step>
|
||||
<fraction>0.17</fraction>
|
||||
<live>true</live>
|
||||
<property>/sim/rendering/shaders/urban</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
|
@ -198,6 +225,7 @@
|
|||
<max>5.0</max>
|
||||
<step>1.0</step>
|
||||
<fraction>0.17</fraction>
|
||||
<live>true</live>
|
||||
<property>/sim/rendering/shaders/water</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
|
|
|
@ -68,10 +68,11 @@ Started September 2000 by David Megginson, david@megginson.com
|
|||
<realism type="int">5</realism>
|
||||
<filtering type="int">8</filtering>
|
||||
<shaders>
|
||||
<model type="float" userarchive="y">1.0</model>
|
||||
<crop type="float" userarchive="y">1.0</crop>
|
||||
<generic type="float" userarchive="y">1.0</generic>
|
||||
<landmass type="float" userarchive="y">1.0</landmass>
|
||||
<model type="float" userarchive="y">1.0</model>
|
||||
<contrails type="float" userarchive="y">1.0</contrails>
|
||||
<crop type="float" userarchive="y">1.0</crop>
|
||||
<skydome type="bool" userarchive="y">false</skydome>
|
||||
<transition type="float" userarchive="y">1.0</transition>
|
||||
<urban type="float" userarchive="y">1.0</urban>
|
||||
|
|
Loading…
Reference in a new issue