diff --git a/Effects/landmass.eff b/Effects/landmass.eff index 895c02095..3486081e8 100644 --- a/Effects/landmass.eff +++ b/Effects/landmass.eff @@ -2,6 +2,9 @@ Effects/landmass Effects/terrain-default + + /sim/rendering/snow-level-m + @@ -56,14 +59,22 @@ Shaders/landmass.frag - NoiseTex - sampler-3d - 0 + NoiseTex + sampler-3d + 0 + BaseTex sampler-2d 1 + + snowlevel + float + + snow-level + + diff --git a/Shaders/landmass.frag b/Shaders/landmass.frag index 869009bd2..1e088d4b6 100644 --- a/Shaders/landmass.frag +++ b/Shaders/landmass.frag @@ -8,12 +8,13 @@ varying vec4 constantColor; uniform sampler3D NoiseTex; uniform sampler2D BaseTex; +uniform float snowlevel; +// From /sim/rendering/snow-level-m const float scale = 1.0; void main (void) { - const float snowlevel=2000.0; vec4 noisevec = texture3D(NoiseTex, (rawpos.xyz)*0.01*scale); vec4 nvL = texture3D(NoiseTex, (rawpos.xyz)*0.00066*scale); diff --git a/gui/dialogs/rendering.xml b/gui/dialogs/rendering.xml index 90a4b9bad..2fffcde2d 100644 --- a/gui/dialogs/rendering.xml +++ b/gui/dialogs/rendering.xml @@ -271,6 +271,27 @@ + + + hbox + right + + + 0.0 + 5000.0 + /sim/rendering/snow-level-m + + dialog-apply + + + + + %.fm + true + /sim/rendering/snow-level-m + + + diff --git a/preferences.xml b/preferences.xml index 4d4cc0c27..23af271a2 100644 --- a/preferences.xml +++ b/preferences.xml @@ -137,6 +137,7 @@ Started September 2000 by David Megginson, david@megginson.com 0 0 0 + 2000.0 120