diff --git a/Effects/agriculture.eff b/Effects/agriculture.eff
index a81041cde..40285d0f9 100644
--- a/Effects/agriculture.eff
+++ b/Effects/agriculture.eff
@@ -166,10 +166,6 @@
6.0
/sim/rendering/shaders/transition
-
- 1.0
- /sim/rendering/shaders/crop
-
diff --git a/Effects/bowwave.eff b/Effects/bowwave.eff
index 04d03270c..b8eba158d 100644
--- a/Effects/bowwave.eff
+++ b/Effects/bowwave.eff
@@ -154,8 +154,6 @@
/sim/rendering/shaders/skydome
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/water
2.0
/sim/rendering/shaders/water
@@ -607,466 +605,4 @@
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/water
-
- 2.0
- /sim/rendering/shaders/water
-
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
- true
-
-
- material/active
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
-
- material/emissive
-
-
- material/shininess
-
-
- material/color-mode
-
-
-
-
- blend/active
-
-
- blend/source
-
-
- blend/destination
-
-
-
- shade-model
-
-
- cull-face
-
-
- rendering-hint
-
-
- 0
-
- texture[0]/image
-
-
- texture[0]/type
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
- texture[0]/internal-format
-
-
-
- 1
- noise
-
-
- 2
-
- texture[2]/image
-
-
- texture[2]/type
-
-
- texture[2]/filter
-
-
- texture[2]/wrap-s
-
-
- texture[2]/wrap-t
-
-
- texture[2]/internal-format
-
-
-
- 3
-
- texture[3]/image
-
-
- texture[3]/type
-
-
- texture[3]/filter
-
-
- texture[3]/wrap-s
-
-
- texture[3]/wrap-t
-
-
- texture[3]/internal-format
-
-
-
- 4
-
- texture[4]/image
-
-
- texture[4]/type
-
-
- texture[4]/filter
-
-
- texture[4]/wrap-s
-
-
- texture[4]/wrap-t
-
-
- texture[4]/internal-format
-
-
-
- 5
-
- texture[5]/image
-
-
- texture[5]/type
-
-
- texture[5]/filter
-
-
- texture[5]/wrap-s
-
-
- texture[5]/wrap-t
-
-
- texture[5]/internal-format
-
-
-
- 6
-
- texture[6]/image
-
-
- texture[6]/type
-
-
- texture[6]/filter
-
-
- texture[6]/wrap-s
-
-
- texture[6]/wrap-t
-
-
- texture[6]/internal-format
-
-
-
- 7
-
- texture[7]/image
-
-
- texture[7]/type
-
-
- texture[7]/filter
-
-
- texture[7]/wrap-s
-
-
- texture[7]/wrap-t
-
-
- texture[7]/internal-format
-
-
-
-
-
- Shaders/wake.vert
- Shaders/include_fog.frag
- Shaders/bowwave.frag
-
-
- water_reflection
- sampler-2d
- 0
-
-
- water_normalmap
- sampler-2d
- 2
-
-
- water_dudvmap
- sampler-2d
- 3
-
-
- water_reflection_grey
- sampler-2d
- 4
-
-
- sea_foam
- sampler-2d
- 5
-
-
- alpha_tex
- sampler-2d
- 6
-
-
- bowwave_nmap
- sampler-2d
- 7
-
-
- saturation
- float
-
-
- saturation
-
-
-
- CloudCover0
- float
-
- cloud-cover0
-
-
-
- CloudCover1
- float
-
- cloud-cover1
-
-
-
- CloudCover2
- float
-
- cloud-cover2
-
-
-
- CloudCover3
- float
-
- cloud-cover3
-
-
-
- CloudCover4
- float
-
- cloud-cover4
-
-
-
- Status
- int
-
- status
-
-
-
-
- Overcast
- float
-
- overcast
-
-
-
- WindE
- float
-
- windE
-
-
-
- WindN
- float
-
- windN
-
-
-
- spd
- float
- speed-kt
-
-
- hdg
- float
-
- heading-deg
-
-
-
- Noise
- sampler-3d
- 1
-
-
-
-
- visibility
- float
-
- visibility
-
-
-
- avisibility
- float
-
- avisibility
-
-
-
- hazeLayerAltitude
- float
-
- lthickness
-
-
-
- scattering
- float
-
- scattering
-
-
-
- terminator
- float
-
- terminator
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/water
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
- true
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
- ambient-and-diffuse
-
-
- transparent
-
-
- transparent
-
- smooth
- back
-
-
- render-bin/bin-number
-
-
- render-bin/bin-name
-
-
-
- 0
- noise
-
-
- Shaders/water-orig.vert
- Shaders/water-orig.frag
-
-
- texture
- sampler-3d
- 0
-
-
-
diff --git a/Effects/building.eff b/Effects/building.eff
index 5da7e5c7d..3c56a7c90 100644
--- a/Effects/building.eff
+++ b/Effects/building.eff
@@ -122,7 +122,6 @@
/sim/rendering/shaders/skydome
- /sim/rendering/shaders/quality-level
/sim/rendering/shaders/model
@@ -229,177 +228,6 @@
-
-
-
-
- true
- 1
- 0.6 0.6 0.6 1.0
- 1.0 1.0 1.0 1.0
- 0.0 0.0 0.0 1.0
- 0.02 0.02 0.02 1.0
- 0.1
- ambient-and-diffuse
- ambient-and-diffuse
-
-
- 4
-
- texture[3]/image
-
-
- texture[3]/type
-
-
- texture[3]/filter
-
-
- texture[3]/wrap-s
-
-
- texture[3]/wrap-t
-
-
- texture[3]/internal-format
-
-
-
- Shaders/building-ubershader.vert
-
- instancePosition
- 10
-
-
- instanceScale
- 11
-
-
- attrib1
- 12
-
-
- attrib2
- 13
-
-
-
-
-
-
-
-
-
- true
- 1
- 0.6 0.6 0.6 1.0
- 1.0 1.0 1.0 1.0
- 0.0 0.0 0.0 1.0
- 0.02 0.02 0.02 1.0
- 0.1
- ambient-and-diffuse
- ambient-and-diffuse
-
-
- 4
-
- texture[3]/image
-
-
- texture[3]/type
-
-
- texture[3]/filter
-
-
- texture[3]/wrap-s
-
-
- texture[3]/wrap-t
-
-
- texture[3]/internal-format
-
-
-
- Shaders/building-ubershader.vert
-
- instancePosition
- 10
-
-
- instanceScale
- 11
-
-
- attrib1
- 12
-
-
- attrib2
- 13
-
-
-
-
-
-
-
-
-
- true
- 1
- 0.6 0.6 0.6 1.0
- 1.0 1.0 1.0 1.0
- 0.0 0.0 0.0 1.0
- 0.02 0.02 0.02 1.0
- 0.1
- ambient-and-diffuse
- ambient-and-diffuse
-
-
- 4
-
- texture[3]/image
-
-
- texture[3]/type
-
-
- texture[3]/filter
-
-
- texture[3]/wrap-s
-
-
- texture[3]/wrap-t
-
-
- texture[3]/internal-format
-
-
-
- Shaders/building-ubershader.vert
-
- instancePosition
- 10
-
-
- instanceScale
- 11
-
-
- attrib1
- 12
-
-
- attrib2
- 13
-
-
-
-
-
diff --git a/Effects/bumpspec.eff b/Effects/bumpspec.eff
index 968300b37..576e59d9d 100644
--- a/Effects/bumpspec.eff
+++ b/Effects/bumpspec.eff
@@ -1,99 +1,9 @@
-
Effects/bumpspec
Effects/model-default
-
- 6
- 7
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/model
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
-
- 0
- texture[0]/image
- texture[0]/type
- texture[0]/filter
- texture[0]/wrap-s
- texture[0]/wrap-t
- texture[0]/internal-format
-
-
- 1
- texture[2]/image
- texture[2]/type
- texture[2]/filter
- texture[2]/wrap-s
- texture[2]/wrap-t
- texture[2]/internal-format
-
-
- Shaders/bumpspec.vert
- Shaders/bumpspec.frag
-
- tangent
- 6
-
-
- binormal
- 7
-
-
-
- tex_color
- sampler-2d
- 0
-
-
- tex_normal
- sampler-2d
- 1
-
-
-
diff --git a/Effects/crop.eff b/Effects/crop.eff
index e4feeba66..92292c265 100644
--- a/Effects/crop.eff
+++ b/Effects/crop.eff
@@ -2,140 +2,4 @@
Effects/crop
Effects/terrain-default
-
-
- Textures/Terrain/crop.png
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
-
- Textures/Terrain/crop-colors.png
- 1d
- linear-mipmap-linear
- mirror
- normalized
-
- /environment/snow-level-m
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/crop
-
- 0.0
- /sim/rendering/photoscenery/enabled
-
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
- true
-
-
- material/ambient
- material/diffuse
- material/specular
- ambient-and-diffuse
-
- transparent
- transparent
- smooth
- back
-
- render-bin/bin-number
- render-bin/bin-name
-
-
- 0
- noise
-
-
- 1
- texture[2]/image
- texture[2]/type
- texture[2]/filter
- texture[2]/wrap-s
- texture[2]/wrap-t
-
- texture[2]/internal-format
-
-
-
- 2
- texture[3]/type
- texture[3]/image
- texture[3]/filter
- texture[3]/wrap-s
-
- texture[3]/internal-format
-
-
-
- Shaders/crop.vert
- Shaders/shadows-include.vert
- Shaders/include_fog.frag
- Shaders/crop.frag
- Shaders/shadows-include.frag
- Shaders/clustered-include.frag
-
-
- NoiseTex
- sampler-3d
- 0
-
-
- SampleTex
- sampler-2d
- 1
-
-
- ColorsTex
- sampler-1d
- 2
-
-
- snowlevel
- float
- snow-level
-
-
-
- shadow_tex
- sampler-2d
- 10
-
-
- shadows_enabled
- bool
-
- shadows_enabled
-
-
-
- sun_atlas_size
- int
-
- sun_atlas_size
-
-
-
-
-
diff --git a/Effects/cropgrass.eff b/Effects/cropgrass.eff
index 04a904d76..1a2e15fde 100644
--- a/Effects/cropgrass.eff
+++ b/Effects/cropgrass.eff
@@ -2,22 +2,4 @@
Effects/cropgrass
Effects/crop
-
-
- Textures/Terrain/cropgrass.png
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
-
- Textures/Terrain/cropgrass-colors.png
- 1d
- linear-mipmap-linear
- mirror
- normalized
-
- /environment/snow-level-m
-
diff --git a/Effects/flutter.eff b/Effects/flutter.eff
index 75c90c070..544c1544f 100644
--- a/Effects/flutter.eff
+++ b/Effects/flutter.eff
@@ -327,248 +327,4 @@
-
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/generic
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
- true
-
-
- material/active
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
-
- material/emissive
-
-
- material/shininess
-
-
- material/color-mode
-
-
-
-
- blend/active
-
-
- blend/source
-
-
- blend/destination
-
-
-
- shade-model
-
-
- cull-face
-
-
- rendering-hint
-
-
-
- 0
-
-
- texture[0]/type
-
-
- texture[0]/image
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
-
-
- 1
- noise
-
-
- vertex-program-two-side
-
-
-
- Shaders/flutter.vert
- Shaders/shadows-include.vert
- Shaders/include_fog.frag
- Shaders/default.frag
- Shaders/shadows-include.frag
- Shaders/clustered-include.frag
-
-
-
- colorMode
- int
-
- material/color-mode-uniform
-
-
-
-
- Offset
- float
-
- offset
-
-
-
- AmpFactor
- float
-
- amplitude-factor
-
-
-
- Noise
- sampler-3d
- 1
-
-
- WindE
- float
-
- windE
-
-
-
- WindN
- float
-
- windN
-
-
-
- spd
- float
-
- speed-kt
-
-
-
- hdg
- float
-
- heading-deg
-
-
-
-
-
- visibility
- float
-
- visibility
-
-
-
- avisibility
- float
-
- avisibility
-
-
-
- hazeLayerAltitude
- float
-
- lthickness
-
-
-
- scattering
- float
-
- scattering
-
-
-
- terminator
- float
-
- terminator
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
-
- shadow_tex
- sampler-2d
- 10
-
-
- shadows_enabled
- bool
-
- shadows_enabled
-
-
-
- sun_atlas_size
- int
-
- sun_atlas_size
-
-
-
-
-
-
diff --git a/Effects/forest.eff b/Effects/forest.eff
index 631a3ea97..6492cbcb5 100644
--- a/Effects/forest.eff
+++ b/Effects/forest.eff
@@ -2,305 +2,4 @@
Effects/forest
Effects/terrain-default
-
-
- Textures/Terrain/rock.png
- linear-mipmap-linear
- repeat
- repeat
- normalized
- 2d
-
-
- Textures/Terrain/forest-colors.png
- linear-mipmap-linear
- mirror
- normalized
- 1d
-
-
- Textures/Terrain/forest.png
- linear-mipmap-linear
- repeat
- repeat
- normalized
- 2d
-
-
- Textures/Terrain/forest-relief.png
- linear-mipmap-linear
- repeat
- repeat
- normalized
- 2d
-
- /environment/snow-level-m
- 0.04
- 15.0
- /sim/rendering/shaders/transition
-
-
- 0.12
- 0.86
- 0.22
-
-
-
- /environment/ground-visibility-m
-
-
- /environment/visibility-m
-
-
- /environment/ground-haze-thickness-m
-
-
- /rendering/scene/scattering
-
-
- /environment/terminator-relative-position-m
-
-
- /sim/rendering/shaders/skydome
-
-
-
-
-
- 6
- 7
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/transition
-
- 0.0
- /sim/rendering/photoscenery/enabled
-
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
- true
-
-
- material/ambient
- material/diffuse
- material/specular
- ambient-and-diffuse
-
- transparent
- transparent
- smooth
- back
-
- render-bin/bin-number
- render-bin/bin-name
-
-
- 0
- noise
-
-
- 1
- texture[2]/type
- texture[2]/image
- texture[2]/filter
- texture[2]/wrap-s
- texture[2]/wrap-t
-
- texture[2]/internal-format
-
-
-
- 3
- texture[3]/type
- texture[3]/image
- texture[3]/filter
- texture[3]/wrap-s
-
- texture[3]/internal-format
-
-
-
- 2
- texture[4]/type
- texture[4]/image
- texture[4]/filter
- texture[4]/wrap-s
- texture[4]/wrap-t
-
- texture[4]/internal-format
-
-
-
- 5
- texture[5]/type
- texture[5]/image
- texture[5]/filter
- texture[5]/wrap-s
- texture[5]/wrap-t
-
- texture[5]/internal-format
-
-
-
-
- Shaders/forest.vert
- Shaders/shadows-include.vert
- Shaders/include_fog.frag
- Shaders/forest.frag
- Shaders/shadows-include.frag
- Shaders/clustered-include.frag
-
- tangent
- 6
-
-
- binormal
- 7
-
-
-
- NoiseTex
- sampler-3d
- 0
-
-
- SampleTex
- sampler-2d
- 1
-
-
- SampleTex2
- sampler-2d
- 2
-
-
- ColorsTex
- sampler-1d
- 3
-
-
- NormalTex
- sampler-2d
- 5
-
-
- depth_factor
- float
- depth-factor
-
-
- snowlevel
- float
- snow-level
-
-
- quality_level
- float
- quality-level
-
-
- red
- float
- season-red
-
-
- green
- float
- season-green
-
-
- blue
- float
- season-blue
-
-
- alpha
- float
- 0.0
-
-
-
- visibility
- float
-
- visibility
-
-
-
- avisibility
- float
-
- avisibility
-
-
-
- hazeLayerAltitude
- float
-
- lthickness
-
-
-
- scattering
- float
-
- scattering
-
-
-
- terminator
- float
-
- terminator
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
-
- shadow_tex
- sampler-2d
- 10
-
-
- shadows_enabled
- bool
-
- shadows_enabled
-
-
-
- sun_atlas_size
- int
-
- sun_atlas_size
-
-
-
-
-
diff --git a/Effects/glacier.eff b/Effects/glacier.eff
index f77274ef2..e9c028f86 100644
--- a/Effects/glacier.eff
+++ b/Effects/glacier.eff
@@ -2,301 +2,4 @@
Effects/glacier
Effects/terrain-default
-
-
- Textures/Terrain/rock.png
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
-
- Textures/Terrain/forest-colors.png
- 1d
- linear-mipmap-linear
- mirror
- normalized
-
-
- Textures/Terrain/forest.png
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
-
- Textures/Terrain/forest-relief.png
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
- /environment/snow-level-m
- 0.01
- 15.0
- /sim/rendering/shaders/transition
-
-
- 0.12
- 0.86
- 0.22
-
-
-
- /environment/ground-visibility-m
-
-
- /environment/visibility-m
-
-
- /environment/ground-haze-thickness-m
-
-
- /rendering/scene/scattering
-
-
- /environment/terminator-relative-position-m
-
-
- /sim/rendering/shaders/skydome
-
-
-
-
-
- 6
- 7
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/transition
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
- true
-
-
- material/ambient
- material/diffuse
- material/specular
- ambient-and-diffuse
-
- transparent
- transparent
- smooth
- back
-
- render-bin/bin-number
- render-bin/bin-name
-
-
- 0
- noise
-
-
- 1
- texture[2]/image
- texture[2]/type
- texture[2]/filter
- texture[2]/wrap-s
- texture[2]/wrap-t
-
- texture[2]/internal-format
-
-
-
- 3
- texture[3]/image
- texture[3]/type
- texture[3]/filter
- texture[3]/wrap-s
-
- texture[3]/internal-format
-
-
-
- 2
- texture[4]/image
- texture[4]/type
- texture[4]/filter
- texture[4]/wrap-s
- texture[4]/wrap-t
-
- texture[4]/internal-format
-
-
-
- 5
- texture[5]/image
- texture[5]/type
- texture[5]/filter
- texture[5]/wrap-s
- texture[5]/wrap-t
-
- texture[5]/internal-format
-
-
-
-
- Shaders/forest.vert
- Shaders/shadows-include.vert
- Shaders/include_fog.frag
- Shaders/forest.frag
- Shaders/shadows-include.frag
- Shaders/clustered-include.frag
-
- tangent
- 6
-
-
- binormal
- 7
-
-
-
- NoiseTex
- sampler-3d
- 0
-
-
- SampleTex
- sampler-2d
- 1
-
-
- SampleTex2
- sampler-2d
- 2
-
-
- ColorsTex
- sampler-1d
- 3
-
-
- NormalTex
- sampler-2d
- 5
-
-
- depth_factor
- float
- depth-factor
-
-
- snowlevel
- float
- snow-level
-
-
- quality_level
- float
- quality-level
-
-
- red
- float
- season-red
-
-
- green
- float
- season-green
-
-
- blue
- float
- season-blue
-
-
- alpha
- float
- 0.0
-
-
-
- visibility
- float
-
- visibility
-
-
-
- avisibility
- float
-
- avisibility
-
-
-
- hazeLayerAltitude
- float
-
- lthickness
-
-
-
- scattering
- float
-
- scattering
-
-
-
- terminator
- float
-
- terminator
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
-
- shadow_tex
- sampler-2d
- 10
-
-
- shadows_enabled
- bool
-
- shadows_enabled
-
-
-
- sun_atlas_size
- int
-
- sun_atlas_size
-
-
-
-
-
diff --git a/Effects/herbtundra.eff b/Effects/herbtundra.eff
index 15945fc26..61c32266f 100644
--- a/Effects/herbtundra.eff
+++ b/Effects/herbtundra.eff
@@ -2,301 +2,4 @@
Effects/herbtundra
Effects/terrain-default
-
-
- Textures/Terrain/rock.png
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
-
- Textures/Terrain/forest-colors.png
- 1d
- linear-mipmap-linear
- mirror
- normalized
-
-
- Textures/Terrain/forest.png
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
-
- Textures/Terrain/forest-relief.png
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
- /environment/snow-level-m
- 0.01
- 15.0
-
-
- 0.12
- 0.86
- 0.22
-
-
-
-
- /environment/ground-visibility-m
-
-
- /environment/visibility-m
-
-
- /environment/ground-haze-thickness-m
-
-
- /rendering/scene/scattering
-
-
- /environment/terminator-relative-position-m
-
-
- /sim/rendering/shaders/skydome
-
-
-
- /sim/rendering/shaders/transition
-
-
- 6
- 7
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/transition
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
- true
-
-
- material/ambient
- material/diffuse
- material/specular
- ambient-and-diffuse
-
- transparent
- transparent
- smooth
- back
-
- render-bin/bin-number
- render-bin/bin-name
-
-
- 0
- noise
-
-
- 1
- texture[2]/image
- texture[2]/type
- texture[2]/filter
- texture[2]/wrap-s
- texture[2]/wrap-t
-
- texture[2]/internal-format
-
-
-
- 3
- texture[3]/image
- texture[3]/type
- texture[3]/filter
- texture[3]/wrap-s
-
- texture[3]/internal-format
-
-
-
- 2
- texture[4]/image
- texture[4]/type
- texture[4]/filter
- texture[4]/wrap-s
- texture[4]/wrap-t
-
- texture[4]/internal-format
-
-
-
- 5
- texture[5]/image
- texture[5]/type
- texture[5]/filter
- texture[5]/wrap-s
- texture[5]/wrap-t
-
- texture[5]/internal-format
-
-
-
- Shaders/forest.vert
- Shaders/shadows-include.vert
- Shaders/include_fog.frag
- Shaders/forest.frag
- Shaders/shadows-include.frag
- Shaders/clustered-include.frag
-
- tangent
- 6
-
-
- binormal
- 7
-
-
-
- NoiseTex
- sampler-3d
- 0
-
-
- SampleTex
- sampler-2d
- 1
-
-
- SampleTex2
- sampler-2d
- 2
-
-
- ColorsTex
- sampler-1d
- 3
-
-
- NormalTex
- sampler-2d
- 5
-
-
- depth_factor
- float
- depth-factor
-
-
- snowlevel
- float
- snow-level
-
-
- quality_level
- float
- quality-level
-
-
- red
- float
- season-red
-
-
- green
- float
- season-green
-
-
- blue
- float
- season-blue
-
-
- alpha
- float
- 0.0
-
-
-
- visibility
- float
-
- visibility
-
-
-
- avisibility
- float
-
- avisibility
-
-
-
- hazeLayerAltitude
- float
-
- lthickness
-
-
-
- scattering
- float
-
- scattering
-
-
-
- terminator
- float
-
- terminator
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
-
- shadow_tex
- sampler-2d
- 10
-
-
- shadows_enabled
- bool
-
- shadows_enabled
-
-
-
- sun_atlas_size
- int
-
- sun_atlas_size
-
-
-
-
-
diff --git a/Effects/landmass-nowood.eff b/Effects/landmass-nowood.eff
index c31473da6..7615a5bbe 100644
--- a/Effects/landmass-nowood.eff
+++ b/Effects/landmass-nowood.eff
@@ -2,7 +2,4 @@
Effects/landmass-nowood
Effects/landmass
-
- 0.0
-
diff --git a/Effects/landmass-scrub.eff b/Effects/landmass-scrub.eff
index 60fb9b3ab..a5501e01d 100644
--- a/Effects/landmass-scrub.eff
+++ b/Effects/landmass-scrub.eff
@@ -2,15 +2,4 @@
Effects/landmass-scrub
Effects/landmass
-
-
- Textures/Terrain/shrubcover-relief.png
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
- 1.0
-
diff --git a/Effects/landmass.eff b/Effects/landmass.eff
index b82e03093..f8fb2b9a6 100644
--- a/Effects/landmass.eff
+++ b/Effects/landmass.eff
@@ -1,582 +1,5 @@
- Effects/landmass
- Effects/terrain-default
-
-
- Textures/Terrain/forest-relief.png
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
-
- /environment/snow-level-m
-
- 0.01
- 15.0
-
- /sim/rendering/shaders/landmass
-
-
-
- /environment/ground-visibility-m
-
-
- /environment/visibility-m
-
-
- /environment/ground-haze-thickness-m
-
-
- /rendering/scene/scattering
-
-
- /environment/terminator-relative-position-m
-
-
- /sim/rendering/shaders/skydome
-
-
-
-
-
- 6
- 7
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/landmass
-
- 0.0
- /sim/rendering/photoscenery/enabled
-
-
- 4.0
- /sim/rendering/shaders/landmass
-
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
- GL_EXT_geometry_shader4
-
-
-
-
-
-
- true
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
- ambient-and-diffuse
-
-
- transparent
-
-
- transparent
-
- smooth
- back
-
-
- render-bin/bin-number
-
-
- render-bin/bin-name
-
-
-
- 0
- noise
-
-
- 1
-
- texture[0]/image
-
-
- texture[0]/type
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
- texture[0]/internal-format
-
-
-
- 2
-
- texture[2]/image
-
-
- texture[2]/type
-
-
- texture[2]/filter
-
-
- texture[2]/wrap-s
-
-
- texture[2]/wrap-t
-
-
- texture[2]/internal-format
-
-
-
-
- Shaders/landmass-g.vert
- Shaders/landmass.geom
- Shaders/include_fog.frag
- Shaders/landmass.frag
- 18
- triangles
- triangle-strip
-
- tangent
- 6
-
-
- binormal
- 7
-
-
-
- NoiseTex
- sampler-3d
- 0
-
-
- BaseTex
- sampler-2d
- 1
-
-
- NormalTex
- sampler-2d
- 2
-
-
- depth_factor
- float
-
- depth-factor
-
-
-
- snowlevel
- float
-
- snow-level
-
-
-
- canopy_height
- float
-
- canopy-height
-
-
-
- quality_level
- float
-
- quality-level
-
-
-
- lequal
-
-
-
-
- visibility
- float
-
- visibility
-
-
-
- avisibility
- float
-
- avisibility
-
-
-
- hazeLayerAltitude
- float
-
- lthickness
-
-
-
- scattering
- float
-
- scattering
-
-
-
- terminator
- float
-
- terminator
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/landmass
-
- 0.0
- /sim/rendering/photoscenery/enabled
-
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
- true
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
- ambient-and-diffuse
-
-
- transparent
-
-
- transparent
-
- smooth
- back
-
-
- render-bin/bin-number
-
-
- render-bin/bin-name
-
-
-
- 0
- noise
-
-
- 1
-
- texture[0]/image
-
-
- texture[0]/type
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
- texture[0]/internal-format
-
-
-
- 2
-
- texture[2]/image
-
-
- texture[2]/type
-
-
- texture[2]/filter
-
-
- texture[2]/wrap-s
-
-
- texture[2]/wrap-t
-
-
- texture[2]/internal-format
-
-
-
-
- Shaders/landmass.vert
- Shaders/include_fog.frag
- Shaders/landmass.frag
-
- tangent
- 6
-
-
- binormal
- 7
-
-
-
- NoiseTex
- sampler-3d
- 0
-
-
- BaseTex
- sampler-2d
- 1
-
-
- NormalTex
- sampler-2d
- 2
-
-
- depth_factor
- float
-
- depth-factor
-
-
-
- snowlevel
- float
-
- snow-level
-
-
-
- quality_level
- float
-
- quality-level
-
-
-
-
-
- visibility
- float
-
- visibility
-
-
-
- avisibility
- float
-
- avisibility
-
-
-
- hazeLayerAltitude
- float
-
- lthickness
-
-
-
- scattering
- float
-
- scattering
-
-
-
- terminator
- float
-
- terminator
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
-
+ Effects/landmass
+ Effects/terrain-default
diff --git a/Effects/lfeat.eff b/Effects/lfeat.eff
index 6d64bceb0..375ef7daf 100644
--- a/Effects/lfeat.eff
+++ b/Effects/lfeat.eff
@@ -93,12 +93,4 @@
-
-
-
- -2.0
- -5.0
-
-
-
diff --git a/Effects/lightmap.eff b/Effects/lightmap.eff
index e3c8b5f5d..86177080d 100644
--- a/Effects/lightmap.eff
+++ b/Effects/lightmap.eff
@@ -1,223 +1,9 @@
+
Effects/lightmap
-
-
- white
-
- false
-
- 1
-
- /sim/rendering/shaders/generic
- 1
-
-
- /environment/ground-visibility-m
-
-
- /environment/visibility-m
-
-
- /environment/ground-haze-thickness-m
-
-
- /rendering/scene/scattering
-
-
- /environment/terminator-relative-position-m
-
-
- /sim/rendering/shaders/skydome
-
-
-
-
-
-
- /sim/rendering/shaders/generic
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
- true
-
- material/active
- material/ambient
- material/diffuse
- material/specular
- material/emissive
- material/shininess
- material/color-mode
-
-
- blend/active
- blend/source
- blend/destination
-
- shade-model
- cull-face
- rendering-hint
-
-
- 0
-
- texture[0]/type
- texture[0]/image
- texture[0]/filter
- texture[0]/wrap-s
- texture[0]/wrap-t
-
-
-
-
- 1
-
- texture[1]/type
- texture[1]/image
- linear-mipmap-linear
- repeat
- repeat
-
-
- vertex-program-two-side
-
-
- Shaders/lightmap.vert
- Shaders/include_fog.frag
- Shaders/lightmap.frag
-
-
- texture
- sampler-2d
- 0
-
-
- lightmap_texture
- sampler-2d
- 1
-
-
- colorMode
- int
- material/color-mode-uniform
-
-
- condition
- float
- condition
-
-
- lightmap_factor
- float
- factor
-
-
-
- visibility
- float
-
- visibility
-
-
-
- avisibility
- float
-
- avisibility
-
-
-
- hazeLayerAltitude
- float
-
- lthickness
-
-
-
- scattering
- float
-
- scattering
-
-
-
- terminator
- float
-
- terminator
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
-
-
-
- true
-
- material/active
- material/ambient
- material/diffuse
- material/specular
- material/emissive
- material/shininess
- material/color-mode
-
-
- blend/active
- blend/source
- blend/destination
-
- shade-model
- cull-face
- rendering-hint
-
- texture[0]/active
- 0
- texture[0]/image
- texture[0]/type
- texture[0]/filter
- texture[0]/wrap-s
- texture[0]/wrap-t
-
-
- modulate
-
-
-
-
-
+ model-default
diff --git a/Effects/model-combined-transparent.eff b/Effects/model-combined-transparent.eff
index 936fb32d5..3bcf700bd 100644
--- a/Effects/model-combined-transparent.eff
+++ b/Effects/model-combined-transparent.eff
@@ -6,110 +6,4 @@ and fallback to plain transparency when the model shader is disabled.
Effects/model-combined-transparent
Effects/model-combined
-
-
-
-
-
- /sim/rendering/shaders/model
- 0.0
-
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
- true
-
- false
-
-
-
- material/active
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
-
- material/emissive
-
-
- material/shininess
-
-
- material/color-mode
-
-
-
-
- blend/active
-
-
- blend/source
-
-
- blend/destination
-
-
-
- shade-model
-
-
- cull-face
-
-
- 111
- DepthSortedBin
-
-
- 0
-
- texture[0]/active
-
-
- texture[0]/type
-
-
- texture[0]/image
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
-
- modulate
-
-
-
-
-
diff --git a/Effects/model-combined.eff b/Effects/model-combined.eff
index 33b6f06ea..5ef932620 100644
--- a/Effects/model-combined.eff
+++ b/Effects/model-combined.eff
@@ -206,7 +206,6 @@ please see Docs/README.model-combined.eff for documentation
/sim/rendering/shaders/skydome
- /sim/rendering/shaders/quality-level
/sim/rendering/shaders/model
@@ -1294,1199 +1293,4 @@ please see Docs/README.model-combined.eff for documentation
-
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/model
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
- true
-
-
- material/active
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
-
- material/emissive
-
-
- material/shininess
-
-
- material/color-mode
-
-
-
-
- blend/active
-
-
- blend/source
-
-
- blend/destination
-
-
-
- shade-model
-
-
- cull-face
-
-
- rendering-hint
-
-
- transparent
-
-
- transparent
-
-
-
- render-bin/bin-number
-
-
- render-bin/bin-name
-
-
-
-
- 0
-
- texture[0]/image
-
-
- texture[0]/type
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
- texture[0]/internal-format
-
-
-
-
- 1
- noise
-
-
-
- 2
-
- texture[2]/image
-
-
- texture[2]/type
-
-
- texture[2]/filter
-
-
- texture[2]/wrap-s
-
-
- texture[2]/wrap-t
-
-
- texture[2]/internal-format
-
-
-
-
- 3
-
- texture[3]/image
-
-
- texture[3]/type
-
-
- texture[3]/filter
-
-
- texture[3]/wrap-s
-
-
- texture[3]/wrap-t
-
-
- texture[3]/internal-format
-
-
-
-
- 4
-
- texture[4]/image
-
-
- texture[4]/type
-
-
- texture[4]/filter
-
-
- texture[4]/wrap-s
-
-
- texture[4]/wrap-t
-
-
- texture[4]/internal-format
-
-
-
-
- 5
-
- texture[5]/type
-
-
-
-
-
-
- texture[5]/images
-
-
-
-
-
- 6
-
- texture[6]/image
-
-
- texture[6]/type
-
-
- texture[6]/filter
-
-
- texture[6]/wrap-s
-
-
- texture[6]/wrap-t
-
-
- texture[6]/internal-format
-
-
-
-
- vertex-program-two-side
-
-
-
- Shaders/ubershader.vert
- Shaders/shadows-include.vert
- Shaders/include_fog.frag
- Shaders/ubershader.frag
- Shaders/shadows-include.frag
- Shaders/clustered-include.frag
-
-
-
- BaseTex
- sampler-2d
- 0
-
-
-
- ReflNoiseTex
- sampler-3d
- 1
-
-
-
- NormalTex
- sampler-2d
- 2
-
-
-
- LightMapTex
- sampler-2d
- 3
-
-
-
- ReflMapTex
- sampler-2d
- 4
-
-
-
- Environment
- sampler-cube
- 5
-
-
-
- ReflGradientsTex
- sampler-2d
- 6
-
-
-
-
-
- nmap_enabled
- int
-
- normalmap-enabled
-
-
-
-
-
- nmap_dds
- int
-
- normalmap-dds
-
-
-
-
- nmap_tile
- float
-
- normalmap-tiling
-
-
-
-
-
-
- lightmap_enabled
- int
-
- lightmap-enabled
-
-
-
-
- lightmap_multi
- int
-
- lightmap-multi
-
-
-
-
- lightmap_r_factor
- float
-
- lightmap-factor[0]
-
-
-
-
- lightmap_r_color
- float-vec3
-
- lightmap-color[0]
-
-
-
-
- lightmap_g_factor
- float
-
- lightmap-factor[1]
-
-
-
-
- lightmap_g_color
- float-vec3
-
- lightmap-color[1]
-
-
-
-
- lightmap_b_factor
- float
-
- lightmap-factor[2]
-
-
-
-
- lightmap_b_color
- float-vec3
-
- lightmap-color[2]
-
-
-
-
- lightmap_a_factor
- float
-
- lightmap-factor[3]
-
-
-
-
- lightmap_a_color
- float-vec3
-
- lightmap-color[3]
-
-
-
-
-
- refl_enabled
- int
-
- reflection-enabled
-
-
-
-
- refl_correction
- float
-
- reflection-correction
-
-
-
-
-
- refl_map
- int
-
- reflect-map-enabled
-
-
-
-
- refl_dynamic
- int
-
- reflection-dynamic
-
-
-
-
-
- refl_rainbow
- float
-
- reflection-rainbow
-
-
-
-
-
- refl_fresnel
- float
-
- reflection-fresnel
-
-
-
-
-
- refl_noise
- float
-
- reflection-noise
-
-
-
-
-
- dirt_enabled
- int
-
- dirt-enabled
-
-
-
-
- dirt_multi
- int
-
- dirt-multi
-
-
-
-
- dirt_r_color
- float-vec3
-
- dirt-color[0]
-
-
-
-
- dirt_r_factor
- float
-
- dirt-factor[0]
-
-
-
-
- dirt_g_color
- float-vec3
-
- dirt-color[1]
-
-
-
-
- dirt_g_factor
- float
-
- dirt-factor[1]
-
-
-
-
- dirt_b_color
- float-vec3
-
- dirt-color[2]
-
-
-
-
- dirt_b_factor
- float
-
- dirt-factor[2]
-
-
-
-
-
- amb_correction
- float
-
- ambient-correction
-
-
-
-
-
- lonDeg
- float
-
- pos-lon
-
-
-
-
- latDeg
- float
-
- pos-lat
-
-
-
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
-
- shadow_tex
- sampler-2d
- 10
-
-
- shadows_enabled
- bool
-
- shadows_enabled
-
-
-
- sun_atlas_size
- int
-
- sun_atlas_size
-
-
-
-
-
-
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/model
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
- true
-
-
- material/active
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
-
- material/emissive
-
-
- material/shininess
-
-
- material/color-mode
-
-
-
-
- blend/active
-
-
- blend/source
-
-
- blend/destination
-
-
-
- shade-model
-
-
- cull-face
-
-
- rendering-hint
-
-
- transparent
-
-
- transparent
-
-
-
- render-bin/bin-number
-
-
- render-bin/bin-name
-
-
-
-
- 0
-
- texture[0]/image
-
-
- texture[0]/type
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
- texture[0]/internal-format
-
-
-
-
- 1
- noise
-
-
-
- 2
-
- texture[2]/image
-
-
- texture[2]/type
-
-
- texture[2]/filter
-
-
- texture[2]/wrap-s
-
-
- texture[2]/wrap-t
-
-
- texture[2]/internal-format
-
-
-
-
- 3
-
- texture[3]/image
-
-
- texture[3]/type
-
-
- texture[3]/filter
-
-
- texture[3]/wrap-s
-
-
- texture[3]/wrap-t
-
-
- texture[3]/internal-format
-
-
-
-
- 4
-
- texture[4]/image
-
-
- texture[4]/type
-
-
- texture[4]/filter
-
-
- texture[4]/wrap-s
-
-
- texture[4]/wrap-t
-
-
- texture[4]/internal-format
-
-
-
-
- 5
-
- texture[5]/type
-
-
-
-
-
-
- texture[5]/images
-
-
-
-
-
- 6
-
- texture[6]/image
-
-
- texture[6]/type
-
-
- texture[6]/filter
-
-
- texture[6]/wrap-s
-
-
- texture[6]/wrap-t
-
-
- texture[6]/internal-format
-
-
-
-
- vertex-program-two-side
-
-
-
- Shaders/ubershader.vert
- Shaders/shadows-include.vert
- Shaders/include_fog.frag
- Shaders/ubershader.frag
- Shaders/shadows-include.frag
- Shaders/clustered-include.frag
-
-
-
- BaseTex
- sampler-2d
- 0
-
-
-
- ReflNoiseTex
- sampler-3d
- 1
-
-
-
- NormalTex
- sampler-2d
- 2
-
-
-
- LightMapTex
- sampler-2d
- 3
-
-
-
- ReflMapTex
- sampler-2d
- 4
-
-
-
- Environment
- sampler-cube
- 5
-
-
-
- ReflGradientsTex
- sampler-2d
- 6
-
-
-
-
-
- nmap_enabled
- int
-
- normalmap-enabled
-
-
-
-
-
- nmap_dds
- int
-
- normalmap-dds
-
-
-
-
- nmap_tile
- float
-
- normalmap-tiling
-
-
-
-
-
-
- lightmap_enabled
- int
-
- lightmap-enabled
-
-
-
-
- lightmap_multi
- int
-
- lightmap-multi
-
-
-
-
- lightmap_r_factor
- float
-
- lightmap-factor[0]
-
-
-
-
- lightmap_r_color
- float-vec3
-
- lightmap-color[0]
-
-
-
-
- lightmap_g_factor
- float
-
- lightmap-factor[1]
-
-
-
-
- lightmap_g_color
- float-vec3
-
- lightmap-color[1]
-
-
-
-
- lightmap_b_factor
- float
-
- lightmap-factor[2]
-
-
-
-
- lightmap_b_color
- float-vec3
-
- lightmap-color[2]
-
-
-
-
- lightmap_a_factor
- float
-
- lightmap-factor[3]
-
-
-
-
- lightmap_a_color
- float-vec3
-
- lightmap-color[3]
-
-
-
-
-
- refl_enabled
- int
-
- reflection-enabled
-
-
-
-
- refl_correction
- float
-
- reflection-correction
-
-
-
-
-
- refl_map
- int
-
- reflect-map-enabled
-
-
-
-
- refl_dynamic
- int
-
- reflection-dynamic
-
-
-
-
-
- refl_rainbow
- float
-
- reflection-rainbow
-
-
-
-
-
- refl_fresnel
- float
-
- reflection-fresnel
-
-
-
-
-
- refl_noise
- float
-
- reflection-noise
-
-
-
-
-
- dirt_enabled
- int
-
- dirt-enabled
-
-
-
-
- dirt_multi
- int
-
- dirt-multi
-
-
-
-
- dirt_r_color
- float-vec3
-
- dirt-color[0]
-
-
-
-
- dirt_r_factor
- float
-
- dirt-factor[0]
-
-
-
-
- dirt_g_color
- float-vec3
-
- dirt-color[1]
-
-
-
-
- dirt_g_factor
- float
-
- dirt-factor[1]
-
-
-
-
- dirt_b_color
- float-vec3
-
- dirt-color[2]
-
-
-
-
- dirt_b_factor
- float
-
- dirt-factor[2]
-
-
-
-
-
- amb_correction
- float
-
- ambient-correction
-
-
-
-
-
- lonDeg
- float
-
- pos-lon
-
-
-
-
- latDeg
- float
-
- pos-lat
-
-
-
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
-
- shadow_tex
- sampler-2d
- 10
-
-
- shadows_enabled
- bool
-
- shadows_enabled
-
-
-
- sun_atlas_size
- int
-
- sun_atlas_size
-
-
-
-
-
diff --git a/Effects/model-default.eff b/Effects/model-default.eff
index d8e14b4ee..19b346d37 100644
--- a/Effects/model-default.eff
+++ b/Effects/model-default.eff
@@ -391,8 +391,7 @@
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/generic
+ /sim/rendering/shaders/use-shaders
2.0
diff --git a/Effects/model-interior-display.eff b/Effects/model-interior-display.eff
index a4b859f35..4770be556 100644
--- a/Effects/model-interior-display.eff
+++ b/Effects/model-interior-display.eff
@@ -472,277 +472,4 @@
-
-
-
-
-
-
-
diff --git a/Effects/model-wingflex.eff b/Effects/model-wingflex.eff
index a7a3ca220..3efa1a36c 100644
--- a/Effects/model-wingflex.eff
+++ b/Effects/model-wingflex.eff
@@ -213,7 +213,6 @@
/sim/rendering/shaders/skydome
- /sim/rendering/shaders/quality-level
/sim/rendering/shaders/model
@@ -1328,600 +1327,4 @@
-
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/model
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
- true
-
-
- material/active
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
-
- material/emissive
-
-
- material/shininess
-
-
- material/color-mode
-
-
-
-
- blend/active
-
-
- blend/source
-
-
- blend/destination
-
-
-
- shade-model
-
-
- cull-face
-
-
- rendering-hint
-
-
- transparent
-
-
- transparent
-
-
-
- render-bin/bin-number
-
-
- render-bin/bin-name
-
-
-
-
- 0
-
- texture[0]/image
-
-
- texture[0]/type
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
- texture[0]/internal-format
-
-
-
-
- 1
- noise
-
-
-
- 2
-
- texture[2]/image
-
-
- texture[2]/type
-
-
- texture[2]/filter
-
-
- texture[2]/wrap-s
-
-
- texture[2]/wrap-t
-
-
- texture[2]/internal-format
-
-
-
-
- 3
-
- texture[3]/image
-
-
- texture[3]/type
-
-
- texture[3]/filter
-
-
- texture[3]/wrap-s
-
-
- texture[3]/wrap-t
-
-
- texture[3]/internal-format
-
-
-
-
- 4
-
- texture[4]/image
-
-
- texture[4]/type
-
-
- texture[4]/filter
-
-
- texture[4]/wrap-s
-
-
- texture[4]/wrap-t
-
-
- texture[4]/internal-format
-
-
-
-
- 5
-
- texture[5]/type
-
-
-
-
-
-
- texture[5]/images
-
-
-
-
-
- 6
-
- texture[6]/image
-
-
- texture[6]/type
-
-
- texture[6]/filter
-
-
- texture[6]/wrap-s
-
-
- texture[6]/wrap-t
-
-
- texture[6]/internal-format
-
-
-
-
- vertex-program-two-side
-
-
-
- Shaders/ubershader.vert
- Shaders/shadows-include.vert
- Shaders/include_fog.frag
- Shaders/ubershader.frag
- Shaders/shadows-include.frag
- Shaders/clustered-include.frag
-
-
-
- BaseTex
- sampler-2d
- 0
-
-
-
- ReflNoiseTex
- sampler-3d
- 1
-
-
-
- NormalTex
- sampler-2d
- 2
-
-
-
- LightMapTex
- sampler-2d
- 3
-
-
-
- ReflMapTex
- sampler-2d
- 4
-
-
-
- Environment
- sampler-cube
- 5
-
-
-
- ReflGradientsTex
- sampler-2d
- 6
-
-
-
-
-
- nmap_enabled
- int
-
- normalmap-enabled
-
-
-
-
-
- nmap_dds
- int
-
- normalmap-dds
-
-
-
-
- nmap_tile
- float
-
- normalmap-tiling
-
-
-
-
-
-
- lightmap_enabled
- int
-
- lightmap-enabled
-
-
-
-
- lightmap_multi
- int
-
- lightmap-multi
-
-
-
-
- lightmap_r_factor
- float
-
- lightmap-factor[0]
-
-
-
-
- lightmap_r_color
- float-vec3
-
- lightmap-color[0]
-
-
-
-
- lightmap_g_factor
- float
-
- lightmap-factor[1]
-
-
-
-
- lightmap_g_color
- float-vec3
-
- lightmap-color[1]
-
-
-
-
- lightmap_b_factor
- float
-
- lightmap-factor[2]
-
-
-
-
- lightmap_b_color
- float-vec3
-
- lightmap-color[2]
-
-
-
-
- lightmap_a_factor
- float
-
- lightmap-factor[3]
-
-
-
-
- lightmap_a_color
- float-vec3
-
- lightmap-color[3]
-
-
-
-
-
- refl_enabled
- int
-
- reflection-enabled
-
-
-
-
- refl_correction
- float
-
- reflection-correction
-
-
-
-
-
- refl_map
- int
-
- reflect-map-enabled
-
-
-
-
- refl_dynamic
- int
-
- reflection-dynamic
-
-
-
-
-
- refl_rainbow
- float
-
- reflection-rainbow
-
-
-
-
-
- refl_fresnel
- float
-
- reflection-fresnel
-
-
-
-
-
- refl_noise
- float
-
- reflection-noise
-
-
-
-
-
- dirt_enabled
- int
-
- dirt-enabled
-
-
-
-
- dirt_multi
- int
-
- dirt-multi
-
-
-
-
- dirt_r_color
- float-vec3
-
- dirt-color[0]
-
-
-
-
- dirt_r_factor
- float
-
- dirt-factor[0]
-
-
-
-
- dirt_g_color
- float-vec3
-
- dirt-color[1]
-
-
-
-
- dirt_g_factor
- float
-
- dirt-factor[1]
-
-
-
-
- dirt_b_color
- float-vec3
-
- dirt-color[2]
-
-
-
-
- dirt_b_factor
- float
-
- dirt-factor[2]
-
-
-
-
-
- amb_correction
- float
-
- ambient-correction
-
-
-
-
-
- lonDeg
- float
-
- pos-lon
-
-
-
-
- latDeg
- float
-
- pos-lat
-
-
-
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
-
- shadow_tex
- sampler-2d
- 10
-
-
- shadows_enabled
- bool
-
- shadows_enabled
-
-
-
- sun_atlas_size
- int
-
- sun_atlas_size
-
-
-
-
-
diff --git a/Effects/reflect-bump-spec.eff b/Effects/reflect-bump-spec.eff
index 0ce976f50..7001e1f1c 100644
--- a/Effects/reflect-bump-spec.eff
+++ b/Effects/reflect-bump-spec.eff
@@ -1,492 +1,9 @@
-
-
-
- Effects/reflect-bump-spec
- Effects/model-default
-
-
-
- Aircraft/Generic/Effects/null_bumpspec.png
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
-
- cubemap
-
-
-
-
-
- Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_px.png
- Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nx.png
- Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_py.png
- Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_ny.png
- Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_pz.png
- Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nz.png
-
-
-
-
- Aircraft/Generic/Effects/Rainbow.png
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
-
- Aircraft/Generic/Effects/FresnelLookUp.png
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
-
- Aircraft/Generic/Effects/ReflectMaps/reflectmap.png
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
- transparent
- smooth
- 0.01
- 0.1
- 0.25
- 0.0
- 0.05
- 0
- 0
-
- /environment/ground-visibility-m
-
-
- /environment/visibility-m
-
-
- /environment/ground-haze-thickness-m
-
-
- /rendering/scene/scattering
-
-
- /environment/terminator-relative-position-m
-
-
- /sim/rendering/shaders/skydome
-
-
-
-
- 6
- 7
-
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/model
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
-
- true
-
-
- material/active
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
-
- material/emissive
-
-
- material/shininess
-
-
- material/color-mode
-
-
-
-
- blend/active
-
-
- blend/source
-
-
- blend/destination
-
-
-
- shade-model
-
-
- cull-face
-
-
- rendering-hint
-
-
-
- 0
-
- texture[0]/image
-
-
- texture[0]/type
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
- texture[0]/internal-format
-
-
-
-
- 1
-
- texture[8]/image
-
-
- texture[8]/type
-
-
- texture[8]/filter
-
-
- texture[8]/wrap-s
-
-
- texture[8]/wrap-t
-
-
- texture[8]/internal-format
-
-
-
-
- 2
- noise
-
-
-
- 4
-
- texture[4]/image
-
-
- texture[4]/type
-
-
- texture[4]/filter
-
-
- texture[4]/wrap-s
-
-
- texture[4]/wrap-t
-
-
- texture[4]/internal-format
-
-
-
-
- 5
-
- texture[5]/type
-
-
-
-
-
-
-
- texture[5]/images
-
-
-
-
- 6
-
- texture[6]/type
-
-
- texture[6]/image
-
-
- texture[6]/filter
-
-
- texture[6]/wrap-s
-
-
- texture[6]/wrap-t
-
-
-
-
- 7
-
- texture[7]/type
-
-
- texture[7]/image
-
-
- texture[7]/filter
-
-
- texture[7]/wrap-s
-
-
- texture[7]/wrap-t
-
-
-
-
-
-
- Shaders/reflect-bump-spec.vert
- Shaders/include_fog.frag
- Shaders/reflect-bump-spec.frag
-
- tangent
- 6
-
-
- binormal
- 7
-
-
-
-
- BaseTex
- sampler-2d
- 0
-
-
-
- Map
- sampler-2d
- 1
-
-
-
- Noise
- sampler-3d
- 2
-
-
-
- NormalTex
- sampler-2d
- 4
-
-
-
- Environment
- sampler-cube
- 5
-
-
-
- Rainbow
- sampler-2d
- 6
-
-
-
- Fresnel
- sampler-2d
- 7
-
-
-
-
- rainbowiness
- float
-
- rainbowiness
-
-
-
-
-
- fresneliness
- float
-
- fresneliness
-
-
-
-
-
- noisiness
- float
-
- noisiness
-
-
-
-
-
- refl_correction
- float
-
- refl_correction
-
-
-
-
-
- ambient_correction
- float
-
- ambient_correction
-
-
-
-
-
- reflect_map
- float
-
- reflect_map
-
-
-
-
-
- normalmap_dds
- float
-
- normalmap_dds
-
-
-
-
- visibility
- float
-
- visibility
-
-
-
- avisibility
- float
-
- avisibility
-
-
-
- hazeLayerAltitude
- float
-
- lthickness
-
-
-
- scattering
- float
-
- scattering
-
-
-
- terminator
- float
-
- terminator
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
-
\ No newline at end of file
+
+
+
+ Effects/reflect-bump-spec
+ Effects/model-default
+
diff --git a/Effects/reflect.eff b/Effects/reflect.eff
index 1f27b5a05..9a699c16f 100644
--- a/Effects/reflect.eff
+++ b/Effects/reflect.eff
@@ -1,427 +1,9 @@
-
-
- Effects/reflect
- Effects/model-default
-
-
-
-
- Aircraft/Generic/Effects/greymap.png
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
-
-
- cubemap
-
-
-
-
-
- Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_px.png
- Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nx.png
- Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_py.png
- Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_ny.png
- Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_pz.png
- Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nz.png
-
-
-
-
- Aircraft/Generic/Effects/Rainbow.png
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
-
- Aircraft/Generic/Effects/FresnelLookUp.png
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
-
- Aircraft/Generic/Effects/ReflectMaps/reflectmap.png
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
- transparent
- smooth
- 0.01
- 0.1
- 0.25
- 0.0
- 0.05
- 0
- 0
- 1
-
-
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/model
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
-
- true
-
-
- material/active
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
-
- material/emissive
-
-
- material/shininess
-
-
- material/color-mode
-
-
-
-
- blend/active
-
-
- blend/source
-
-
- blend/destination
-
-
-
- shade-model
-
-
- cull-face
-
-
- rendering-hint
-
-
-
- 0
-
- texture[0]/image
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
- texture[0]/internal-format
-
-
-
-
- 1
-
- texture[8]/image
-
-
- texture[8]/filter
-
-
- texture[8]/wrap-s
-
-
- texture[8]/wrap-t
-
-
- texture[8]/internal-format
-
-
-
-
- 2
-
- texture[2]/type
-
-
- texture[2]/image
-
- linear-mipmap-linear
- repeat
- repeat
-
-
-
- 3
- noise
-
-
-
- 5
-
- texture[5]/type
-
-
-
-
-
-
-
- texture[5]/images
-
-
-
-
- 6
-
- texture[6]/type
-
-
- texture[6]/image
-
-
- texture[6]/filter
-
-
- texture[6]/wrap-s
-
-
- texture[6]/wrap-t
-
-
-
-
- 7
-
- texture[7]/type
-
-
- texture[7]/image
-
-
- texture[7]/filter
-
-
- texture[7]/wrap-s
-
-
- texture[7]/wrap-t
-
-
-
-
-
- Shaders/reflect.vert
- Shaders/include_fog.frag
- Shaders/reflect.frag
-
- tangent
- 6
-
-
- binormal
- 7
-
-
- normal
- 15
-
-
-
-
- BaseTex
- sampler-2d
- 0
-
-
-
- Map
- sampler-2d
- 1
-
-
-
- Lightmap
- sampler-2d
- 2
-
-
-
- Noise
- sampler-3d
- 3
-
-
-
- Environment
- sampler-cube
- 5
-
-
-
- Rainbow
- sampler-2d
- 6
-
-
-
- Fresnel
- sampler-2d
- 7
-
-
-
- rainbowiness
- float
-
- rainbowiness
-
-
-
-
-
- fresneliness
- float
-
- fresneliness
-
-
-
-
-
- noisiness
- float
-
- noisiness
-
-
-
-
-
- refl_correction
- float
-
- refl_correction
-
-
-
-
-
- ambient_correction
- float
-
- ambient_correction
-
-
-
-
-
- reflect_map
- int
-
- reflect_map
-
-
-
-
-
- light_map
- int
-
- light_map
-
-
-
-
- lightmap_factor
- float
-
- factor
-
-
-
-
-
-
+ Effects/reflect
+ Effects/model-default
diff --git a/Effects/road.eff b/Effects/road.eff
index 7b10a7ca4..bab0e77a4 100644
--- a/Effects/road.eff
+++ b/Effects/road.eff
@@ -53,7 +53,6 @@
/sim/rendering/shaders/skydome
- /sim/rendering/shaders/quality-level
/sim/rendering/shaders/model
diff --git a/Effects/runway.eff b/Effects/runway.eff
index fb5807687..81a60659e 100644
--- a/Effects/runway.eff
+++ b/Effects/runway.eff
@@ -886,348 +886,4 @@
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/generic
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
-
- 0
-
- texture[0]/type
-
-
- texture[0]/image
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
- texture[0]/internal-format
-
-
-
-
- 1
-
- texture[8]/type
-
-
- texture[8]/image
-
-
- texture[8]/filter
-
-
- texture[8]/wrap-s
-
-
- texture[8]/wrap-t
-
-
- texture[8]/internal-format
-
-
-
-
- 2
- noise
-
-
-
- 4
-
- texture[4]/type
-
-
- texture[4]/image
-
-
- texture[4]/filter
-
-
- texture[4]/wrap-s
-
-
- texture[4]/wrap-t
-
-
- texture[4]/internal-format
-
-
-
-
- 5
-
- texture[5]/type
-
-
-
-
-
-
-
- texture[5]/images
-
-
-
-
- 6
-
- texture[6]/type
-
-
- texture[6]/image
-
-
- texture[6]/filter
-
-
- texture[6]/wrap-s
-
-
- texture[6]/wrap-t
-
-
-
-
- 7
-
- texture[7]/type
-
-
- texture[7]/image
-
-
- texture[7]/filter
-
-
- texture[7]/wrap-s
-
-
- texture[7]/wrap-t
-
-
-
-
- vertex-program-two-side
-
-
- cull-face
-
-
-
-
- Shaders/runway.vert
- Shaders/shadows-include.vert
- Shaders/include_fog.frag
- Shaders/runway.frag
- Shaders/shadows-include.frag
- Shaders/clustered-include.frag
-
- tangent
- 6
-
-
- binormal
- 7
-
-
-
-
- BaseTex
- sampler-2d
- 0
-
-
-
- Map
- sampler-2d
- 1
-
-
-
- Noise
- sampler-3d
- 2
-
-
-
- NormalTex
- sampler-2d
- 4
-
-
-
- Environment
- sampler-cube
- 5
-
-
-
- Rainbow
- sampler-2d
- 6
-
-
-
- Fresnel
- sampler-2d
- 7
-
-
-
-
- rainbowiness
- float
-
- rainbowiness
-
-
-
-
-
- fresneliness
- float
-
- fresneliness
-
-
-
-
-
- noisiness
- float
-
- noisiness
-
-
-
-
-
- spec_adjust
- float
-
- rnorm
-
-
-
-
-
- ambient_correction
- float
-
- ambient_correction
-
-
-
-
-
- reflect_map
- float
-
- reflect_map
-
-
-
-
-
- normalmap_dds
- float
-
- normalmap_dds
-
-
-
-
- visibility
- float
-
- visibility
-
-
-
- avisibility
- float
-
- avisibility
-
-
-
- hazeLayerAltitude
- float
-
- lthickness
-
-
-
- scattering
- float
-
- scattering
-
-
-
- terminator
- float
-
- terminator
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
- shadow_tex
- sampler-2d
- 10
-
-
- shadows_enabled
- bool
-
- shadows_enabled
-
-
-
- sun_atlas_size
- int
-
- sun_atlas_size
-
-
-
-
-
diff --git a/Effects/terrain-default.eff b/Effects/terrain-default.eff
index 80381e923..201bfe986 100644
--- a/Effects/terrain-default.eff
+++ b/Effects/terrain-default.eff
@@ -1468,10 +1468,7 @@
/sim/rendering/photoscenery/enabled
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/generic
-
+ /sim/rendering/shaders/use-shaders
diff --git a/Effects/transition-base-dirt.eff b/Effects/transition-base-dirt.eff
index ec1b3a8a1..3ffd8c336 100644
--- a/Effects/transition-base-dirt.eff
+++ b/Effects/transition-base-dirt.eff
@@ -1,17 +1,5 @@
- Effects/transition-base-dirt
- Effects/transition
-
-
- Textures/Terrain/dirt3.dds
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
- 1.0
- 0.0
-
+ Effects/transition-base-dirt
+ Effects/transition
diff --git a/Effects/transition-base-grass-inverse.eff b/Effects/transition-base-grass-inverse.eff
index 04b5f0b06..5ded6da38 100644
--- a/Effects/transition-base-grass-inverse.eff
+++ b/Effects/transition-base-grass-inverse.eff
@@ -1,17 +1,5 @@
- Effects/transition-base-rock
- Effects/transition
-
-
- Textures/Terrain/herbtundra.dds
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
- 1.0
- 1.0
-
+ Effects/transition-base-rock
+ Effects/transition
diff --git a/Effects/transition-base-grass-rock.eff b/Effects/transition-base-grass-rock.eff
index 621b61b8d..099b338b9 100644
--- a/Effects/transition-base-grass-rock.eff
+++ b/Effects/transition-base-grass-rock.eff
@@ -1,33 +1,5 @@
- Effects/transition-base-grass-rock
- Effects/transition
-
-
- Textures/Terrain/grass10c.dds
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
-
- Textures/Terrain/rock7.dds
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
-
- Textures/Terrain.winter/mixedforest1c.dds
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
- 2.0
- 0.0
-
+ Effects/transition-base-grass-rock
+ Effects/transition
diff --git a/Effects/transition-base-rock.eff b/Effects/transition-base-rock.eff
index 1eea01539..5ded6da38 100644
--- a/Effects/transition-base-rock.eff
+++ b/Effects/transition-base-rock.eff
@@ -1,17 +1,5 @@
- Effects/transition-base-rock
- Effects/transition
-
-
- Textures/Terrain/rock7.dds
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
- 1.0
- 0.0
-
+ Effects/transition-base-rock
+ Effects/transition
diff --git a/Effects/transition.eff b/Effects/transition.eff
index 7389056d1..56f10a999 100644
--- a/Effects/transition.eff
+++ b/Effects/transition.eff
@@ -1,426 +1,5 @@
-
-
- Effects/transition
- Effects/terrain-default
-
-
- Textures/Terrain/transition1.dds
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
-
- Textures/Terrain/transition2.dds
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
-
- Textures/Terrain/snow3.dds
- 2d
- linear-mipmap-linear
- repeat
- repeat
- normalized
-
-
-
- /environment/rain-norm
-
-
- /environment/snow-level-m
-
-
-
- /environment/clouds/layer[0]/coverage-type
-
-
- /environment/clouds/layer[1]/coverage-type
-
-
- /environment/clouds/layer[2]/coverage-type
-
-
- /environment/clouds/layer[3]/coverage-type
-
-
- /environment/clouds/layer[4]/coverage-type
-
-
- 2.0
- 0.0
-
-
-
- /environment/ground-visibility-m
-
-
- /environment/visibility-m
-
-
- /environment/ground-haze-thickness-m
-
-
- /rendering/scene/scattering
-
-
- /environment/terminator-relative-position-m
-
-
- /sim/rendering/shaders/skydome
-
-
-
-
-
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/transition
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
-
- true
-
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
- ambient-and-diffuse
-
-
-
- transparent
-
-
-
- transparent
-
-
- smooth
- back
-
-
-
- render-bin/bin-number
-
-
- render-bin/bin-name
-
-
-
-
- 0
-
- texture[0]/type
-
-
- texture[0]/image
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
- texture[0]/internal-format
-
-
-
-
- 1
-
- texture[2]/type
-
-
- texture[2]/image
-
-
- texture[2]/filter
-
-
- texture[2]/wrap-s
-
-
- texture[2]/wrap-t
-
-
- texture[2]/internal-format
-
-
-
-
- 2
-
- texture[3]/type
-
-
- texture[3]/image
-
-
- texture[3]/filter
-
-
- texture[3]/wrap-s
-
-
- texture[3]/wrap-t
-
-
- texture[3]/internal-format
-
-
-
-
- 3
-
- texture[4]/type
-
-
- texture[4]/image
-
-
- texture[4]/filter
-
-
- texture[4]/wrap-s
-
-
- texture[4]/wrap-t
-
-
- texture[4]/internal-format
-
-
-
-
- 4
- noise
-
-
-
-
- Shaders/transition.vert
- Shaders/shadows-include.vert
- Shaders/include_fog.frag
- Shaders/transition.frag
- Shaders/shadows-include.frag
- Shaders/clustered-include.frag
-
-
-
- BaseTex
- sampler-2d
- 0
-
-
-
- SecondTex
- sampler-2d
- 1
-
-
-
- ThirdTex
- sampler-2d
- 2
-
-
-
- SnowTex
- sampler-2d
- 3
-
-
-
- NoiseTex
- sampler-3d
- 4
-
-
-
- RainNorm
- float
-
- rain-norm
-
-
-
-
- SnowLevel
- float
-
- snow-level
-
-
-
-
- Transitions
- float
-
- transitions
-
-
-
-
- InverseSlope
- float
-
- inverse
-
-
-
-
- CloudCover0
- float
-
- cloud-cover0
-
-
-
-
- CloudCover1
- float
-
- cloud-cover1
-
-
-
-
- CloudCover2
- float
-
- cloud-cover2
-
-
-
-
- CloudCover3
- float
-
- cloud-cover3
-
-
-
-
- CloudCover4
- float
-
- cloud-cover4
-
-
-
-
-
- visibility
- float
-
- visibility
-
-
-
- avisibility
- float
-
- avisibility
-
-
-
- hazeLayerAltitude
- float
-
- lthickness
-
-
-
- scattering
- float
-
- scattering
-
-
-
- terminator
- float
-
- terminator
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
-
- shadow_tex
- sampler-2d
- 10
-
-
- shadows_enabled
- bool
-
- shadows_enabled
-
-
-
- sun_atlas_size
- int
-
- sun_atlas_size
-
-
-
-
-
+ Effects/transition
+ Effects/terrain-default
diff --git a/Effects/tree.eff b/Effects/tree.eff
index 9a8677db3..3e280ae3b 100644
--- a/Effects/tree.eff
+++ b/Effects/tree.eff
@@ -43,7 +43,7 @@
/sim/rendering/shaders/landmass
/sim/rendering/shaders/transition
/sim/rendering/shaders/wind-effects
- /sim/rendering/shaders/forest
+ true
/environment/sea/surface/wind-from-east-fps
/environment/sea/surface/wind-from-north-fps
/sim/startup/xsize
@@ -1693,7 +1693,6 @@
- /sim/rendering/shaders/quality-level
/sim/rendering/random-vegetation
1.0
diff --git a/Effects/urban.eff b/Effects/urban.eff
index fa97ede11..ffb1ae7ac 100644
--- a/Effects/urban.eff
+++ b/Effects/urban.eff
@@ -1,1995 +1,5 @@
- Effects/urban
- Effects/terrain-default
-
-
- /environment/snow-level-m
-
- 0.008
- 1 1 0.50
-
- /sim/rendering/random-buildings
-
-
- /sim/rendering/osm-buildings
-
-
- /sim/rendering/shaders/urban
-
-
-
- /environment/ground-visibility-m
-
-
- /environment/visibility-m
-
-
- /environment/ground-haze-thickness-m
-
-
- /rendering/scene/scattering
-
-
- /environment/terminator-relative-position-m
-
-
- /sim/rendering/shaders/skydome
-
- 0
- 0.4
- 0
- 1000.0
- 1.0
-
-
-
- 6
- 7
-
-
-
-
-
-
- /sim/rendering/shaders/skydome
- /sim/rendering/shaders/urban
-
- 0.0
- /sim/rendering/photoscenery/enabled
-
-
- 4.0
- /sim/rendering/shaders/urban
-
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
- GL_ATI_shader_texture_lod
- GL_ARB_shader_texture_lod
- GL_EXT_gpu_shader4
-
-
-
-
- true
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
- ambient-and-diffuse
-
-
- transparent
-
-
- transparent
-
- smooth
- back
-
-
- render-bin/bin-number
-
-
- render-bin/bin-name
-
-
-
- 0
-
- texture[0]/image
-
-
- texture[0]/type
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
- texture[0]/internal-format
-
-
-
- 1
-
- texture[2]/image
-
-
- texture[2]/type
-
-
- texture[2]/filter
-
-
- texture[2]/wrap-s
-
-
- texture[2]/wrap-t
-
-
- texture[2]/internal-format
-
-
-
- 2
-
- texture[2]/image
-
-
- texture[2]/type
-
- nearest-mipmap-nearest
-
- texture[2]/wrap-s
-
-
- texture[2]/wrap-t
-
-
- texture[2]/internal-format
-
-
- average
- average
- average
- min
-
-
-
- 3
-
- texture[11]/image
-
-
- texture[11]/type
-
-
- texture[11]/filter
-
-
- texture[11]/wrap-s
-
-
- texture[11]/wrap-t
-
-
- texture[11]/internal-format
-
-
-
- 4
-
- texture[13]/image
-
-
- texture[13]/type
-
-
- texture[13]/filter
-
-
- texture[13]/wrap-s
-
-
- texture[13]/wrap-t
-
-
- texture[13]/internal-format
-
-
-
- Shaders/urban-ALS.vert
- Shaders/shadows-include.vert
- Shaders/urban-ALS.frag
- Shaders/cloud-shadowfunc.frag
- Shaders/noise.frag
- Shaders/hazes.frag
- Shaders/secondary_lights.frag
- Shaders/filters-ALS.frag
- Shaders/shadows-include.frag
-
- tangent
- 6
-
-
-
- BaseTex
- sampler-2d
- 0
-
-
- NormalTex
- sampler-2d
- 1
-
-
- QDMTex
- sampler-2d
- 2
-
-
- BackgroundTex
- sampler-2d
- 3
-
-
- GradientTex
- sampler-2d
- 4
-
-
- depth_factor
- float
-
- depth-factor
-
-
-
- tile_size
- float
-
- xsize
-
-
-
- urban_domain_size
- float
-
- urban_domain_size
-
-
-
- urban_domain_fraction
- float
-
- urban_domain_fraction
-
-
-
- night_color
- float-vec3
-
- night-color
-
-
-
- blend_bias
- float
-
- blend_bias
-
-
-
- quality_level
- float
-
- quality-level
-
-
-
- gquality_level
- int
- quality_level
-
-
- tquality_level
- int
- tquality_level
-
-
- urban_blend
- int
- urban_blend
-
-
- urban_domains
- int
- urban_domains
-
-
- snowlevel
- float
-
- snow-level
-
-
-
- max_lod_level
- float
-
- max-lod-level
-
-
-
- random_buildings
- bool
-
- random-buildings
-
-
-
- osm_buildings
- bool
-
- osm-buildings
-
-
-
-
- visibility
- float
-
- visibility
-
-
-
- avisibility
- float
-
- avisibility
-
-
-
- hazeLayerAltitude
- float
-
- lthickness
-
-
-
- scattering
- float
-
- scattering
-
-
-
- ground_scattering
- float
- ground_scattering
-
-
- terminator
- float
-
- terminator
-
-
-
- terrain_alt
- float
- terrain_alt
-
-
- overcast
- float
- overcast
-
-
- eye_alt
- float
- eye_alt
-
-
- snowlevel
- float
- snow_level
-
-
- dust_cover_factor
- float
- dust_cover_factor
-
-
- wetness
- float
- wetness
-
-
- fogstructure
- float
- fogstructure
-
-
- cloud_self_shading
- float
- cloud_self_shading
-
-
- moonlight
- float
- moonlight
-
-
- air_pollution
- float
- air_pollution
-
-
- view_pitch_offset
- float
- view_pitch_offset
-
-
- view_heading_offset
- float
- view_heading_offset
-
-
- field_of_view
- float
- view_fov
-
-
- landing_light1_offset
- float
- landing_light1_offset
-
-
- landing_light2_offset
- float
- landing_light2_offset
-
-
- landing_light3_offset
- float
- landing_light3_offset
-
-
-
- gamma
- float
- gamma
-
-
- brightness
- float
- brightness
-
-
- use_night_vision
- bool
- use_night_vision
-
-
- use_IR_vision
- bool
- use_IR_vision
-
-
- use_filtering
- bool
- use_filtering
-
-
- delta_T
- float
- delta_T
-
-
- fact_grey
- float
- fact_grey
-
-
- fact_black
- float
- fact_black
-
-
-
- cloudpos1_x
- float
- cloudpos1_x
-
-
- cloudpos1_y
- float
- cloudpos1_y
-
-
- cloudpos2_x
- float
- cloudpos2_x
-
-
- cloudpos2_y
- float
- cloudpos2_y
-
-
- cloudpos3_x
- float
- cloudpos3_x
-
-
- cloudpos3_y
- float
- cloudpos3_y
-
-
- cloudpos4_x
- float
- cloudpos4_x
-
-
- cloudpos4_y
- float
- cloudpos4_y
-
-
- cloudpos5_x
- float
- cloudpos5_x
-
-
- cloudpos5_y
- float
- cloudpos5_y
-
-
- cloudpos6_x
- float
- cloudpos6_x
-
-
- cloudpos6_y
- float
- cloudpos6_y
-
-
- cloudpos7_x
- float
- cloudpos7_x
-
-
- cloudpos7_y
- float
- cloudpos7_y
-
-
- cloudpos8_x
- float
- cloudpos8_x
-
-
- cloudpos8_y
- float
- cloudpos8_y
-
-
- cloudpos9_x
- float
- cloudpos9_x
-
-
- cloudpos9_y
- float
- cloudpos9_y
-
-
- cloudpos10_x
- float
- cloudpos10_x
-
-
- cloudpos10_y
- float
- cloudpos10_y
-
-
- cloudpos11_x
- float
- cloudpos11_x
-
-
- cloudpos11_y
- float
- cloudpos11_y
-
-
- cloudpos12_x
- float
- cloudpos12_x
-
-
- cloudpos12_y
- float
- cloudpos12_y
-
-
- cloudpos13_x
- float
- cloudpos13_x
-
-
- cloudpos13_y
- float
- cloudpos13_y
-
-
- cloudpos14_x
- float
- cloudpos14_x
-
-
- cloudpos14_y
- float
- cloudpos14_y
-
-
- cloudpos15_x
- float
- cloudpos15_x
-
-
- cloudpos15_y
- float
- cloudpos15_y
-
-
- cloudpos16_x
- float
- cloudpos16_x
-
-
- cloudpos16_y
- float
- cloudpos16_y
-
-
- cloudpos17_x
- float
- cloudpos17_x
-
-
- cloudpos17_y
- float
- cloudpos17_y
-
-
- cloudpos18_x
- float
- cloudpos18_x
-
-
- cloudpos18_y
- float
- cloudpos18_y
-
-
- cloudpos19_x
- float
- cloudpos19_x
-
-
- cloudpos19_y
- float
- cloudpos19_y
-
-
- cloudpos20_x
- float
- cloudpos20_x
-
-
- cloudpos20_y
- float
- cloudpos20_y
-
-
- cloud_shadow_flag
- int
- cloud_shadow_flag
-
-
- use_searchlight
- int
- use_searchlight
-
-
- use_landing_light
- int
- use_landing_light
-
-
- use_alt_landing_light
- int
- use_alt_landing_light
-
-
- display_xsize
- int
- display_xsize
-
-
- display_ysize
- int
- display_ysize
-
-
-
-
-
-
-
- shadow_tex
- sampler-2d
- 10
-
-
- shadows_enabled
- bool
-
- shadows_enabled
-
-
-
- sun_atlas_size
- int
-
- sun_atlas_size
-
-
-
-
-
-
-
-
-
-
- /sim/rendering/shaders/skydome
- /sim/rendering/shaders/urban
-
- 0.0
- /sim/rendering/photoscenery/enabled
-
-
- 1.0
- /sim/rendering/shaders/urban
-
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
-
- true
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
- ambient-and-diffuse
-
-
- transparent
-
-
- transparent
-
- smooth
- back
-
-
- render-bin/bin-number
-
-
- render-bin/bin-name
-
-
-
- 0
-
- texture[0]/image
-
-
- texture[0]/type
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
- texture[0]/internal-format
-
-
-
- 1
-
- texture[2]/image
-
-
- texture[2]/type
-
-
- texture[2]/filter
-
-
- texture[2]/wrap-s
-
-
- texture[2]/wrap-t
-
-
- texture[2]/internal-format
-
-
-
- 2
-
- texture[11]/image
-
-
- texture[11]/type
-
-
- texture[11]/filter
-
-
- texture[11]/wrap-s
-
-
- texture[11]/wrap-t
-
-
- texture[11]/internal-format
-
-
-
- 3
-
- texture[13]/image
-
-
- texture[13]/type
-
-
- texture[13]/filter
-
-
- texture[13]/wrap-s
-
-
- texture[13]/wrap-t
-
-
- texture[13]/internal-format
-
-
-
-
- Shaders/urban-ALS.vert
- Shaders/shadows-include.vert
- Shaders/urban-ALS.frag
- Shaders/cloud-shadowfunc.frag
- Shaders/noise.frag
- Shaders/hazes.frag
- Shaders/secondary_lights.frag
- Shaders/filters-ALS.frag
- Shaders/shadows-include.frag
-
- tangent
- 6
-
-
-
-
-
- visibility
- float
-
- visibility
-
-
-
- avisibility
- float
-
- avisibility
-
-
-
- hazeLayerAltitude
- float
-
- lthickness
-
-
-
- scattering
- float
-
- scattering
-
-
-
- ground_scattering
- float
- ground_scattering
-
-
- terminator
- float
-
- terminator
-
-
-
-
- terrain_alt
- float
- terrain_alt
-
-
- overcast
- float
- overcast
-
-
- eye_alt
- float
- eye_alt
-
-
- snowlevel
- float
- snow_level
-
-
- dust_cover_factor
- float
- dust_cover_factor
-
-
- wetness
- float
- wetness
-
-
- fogstructure
- float
- fogstructure
-
-
- air_pollution
- float
- air_pollution
-
-
- view_pitch_offset
- float
- view_pitch_offset
-
-
- view_heading_offset
- float
- view_heading_offset
-
-
- field_of_view
- float
- view_fov
-
-
- landing_light1_offset
- float
- landing_light1_offset
-
-
- landing_light2_offset
- float
- landing_light2_offset
-
-
- landing_light3_offset
- float
- landing_light3_offset
-
-
- urban_domain_size
- float
-
- urban_domain_size
-
-
-
- urban_domain_fraction
- float
-
- urban_domain_fraction
-
-
-
-
- gamma
- float
- gamma
-
-
- brightness
- float
- brightness
-
-
- use_night_vision
- bool
- use_night_vision
-
-
- use_IR_vision
- bool
- use_IR_vision
-
-
- use_filtering
- bool
- use_filtering
-
-
- delta_T
- float
- delta_T
-
-
- fact_grey
- float
- fact_grey
-
-
- fact_black
- float
- fact_black
-
-
-
- cloudpos1_x
- float
- cloudpos1_x
-
-
- cloudpos1_y
- float
- cloudpos1_y
-
-
- cloudpos2_x
- float
- cloudpos2_x
-
-
- cloudpos2_y
- float
- cloudpos2_y
-
-
- cloudpos3_x
- float
- cloudpos3_x
-
-
- cloudpos3_y
- float
- cloudpos3_y
-
-
- cloudpos4_x
- float
- cloudpos4_x
-
-
- cloudpos4_y
- float
- cloudpos4_y
-
-
- cloudpos5_x
- float
- cloudpos5_x
-
-
- cloudpos5_y
- float
- cloudpos5_y
-
-
- cloudpos6_x
- float
- cloudpos6_x
-
-
- cloudpos6_y
- float
- cloudpos6_y
-
-
- cloudpos7_x
- float
- cloudpos7_x
-
-
- cloudpos7_y
- float
- cloudpos7_y
-
-
- cloudpos8_x
- float
- cloudpos8_x
-
-
- cloudpos8_y
- float
- cloudpos8_y
-
-
- cloudpos9_x
- float
- cloudpos9_x
-
-
- cloudpos9_y
- float
- cloudpos9_y
-
-
- cloudpos10_x
- float
- cloudpos10_x
-
-
- cloudpos10_y
- float
- cloudpos10_y
-
-
- cloudpos11_x
- float
- cloudpos11_x
-
-
- cloudpos11_y
- float
- cloudpos11_y
-
-
- cloudpos12_x
- float
- cloudpos12_x
-
-
- cloudpos12_y
- float
- cloudpos12_y
-
-
- cloudpos13_x
- float
- cloudpos13_x
-
-
- cloudpos13_y
- float
- cloudpos13_y
-
-
- cloudpos14_x
- float
- cloudpos14_x
-
-
- cloudpos14_y
- float
- cloudpos14_y
-
-
- cloudpos15_x
- float
- cloudpos15_x
-
-
- cloudpos15_y
- float
- cloudpos15_y
-
-
- cloudpos16_x
- float
- cloudpos16_x
-
-
- cloudpos16_y
- float
- cloudpos16_y
-
-
- cloudpos17_x
- float
- cloudpos17_x
-
-
- cloudpos17_y
- float
- cloudpos17_y
-
-
- cloudpos18_x
- float
- cloudpos18_x
-
-
- cloudpos18_y
- float
- cloudpos18_y
-
-
- cloudpos19_x
- float
- cloudpos19_x
-
-
- cloudpos19_y
- float
- cloudpos19_y
-
-
- cloudpos20_x
- float
- cloudpos20_x
-
-
- cloudpos20_y
- float
- cloudpos20_y
-
-
- cloud_shadow_flag
- int
- cloud_shadow_flag
-
-
- use_searchlight
- int
- use_searchlight
-
-
- use_landing_light
- int
- use_landing_light
-
-
- use_alt_landing_light
- int
- use_alt_landing_light
-
-
- display_xsize
- int
- display_xsize
-
-
- display_ysize
- int
- display_ysize
-
-
- urban_blend
- int
- urban_blend
-
-
- urban_domains
- int
- urban_domains
-
-
-
-
-
- BaseTex
- sampler-2d
- 0
-
-
- NormalTex
- sampler-2d
- 1
-
-
- BackgroundTex
- sampler-2d
- 2
-
-
- GradientTex
- sampler-2d
- 3
-
-
- depth_factor
- float
-
- depth-factor
-
-
-
- tile_size
- float
-
- xsize
-
-
-
- night_color
- float-vec3
-
- night-color
-
-
-
- blend_bias
- float
-
- blend_bias
-
-
-
- quality_level
- float
-
- quality-level
-
-
-
- snowlevel
- float
-
- snow-level
-
-
-
- cloud_self_shading
- float
- cloud_self_shading
-
-
- moonlight
- float
- moonlight
-
-
-
- random_buildings
- bool
-
- random-buildings
-
-
-
- osm_buildings
- bool
-
- osm-buildings
-
-
-
-
- shadow_tex
- sampler-2d
- 10
-
-
- shadows_enabled
- bool
-
- shadows_enabled
-
-
-
- sun_atlas_size
- int
-
- sun_atlas_size
-
-
-
-
-
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/urban
-
- 0.0
- /sim/rendering/photoscenery/enabled
-
-
- 4.0
- /sim/rendering/shaders/urban
-
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
- GL_ATI_shader_texture_lod
- GL_ARB_shader_texture_lod
- GL_EXT_gpu_shader4
-
-
-
-
- true
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
- ambient-and-diffuse
-
-
- transparent
-
-
- transparent
-
- smooth
- back
-
-
- render-bin/bin-number
-
-
- render-bin/bin-name
-
-
-
- 0
-
- texture[0]/image
-
-
- texture[0]/type
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
- texture[0]/internal-format
-
-
-
- 1
-
- texture[2]/image
-
-
- texture[2]/type
-
-
- texture[2]/filter
-
-
- texture[2]/wrap-s
-
-
- texture[2]/wrap-t
-
-
- texture[2]/internal-format
-
-
-
- 2
- noise
-
-
- 3
-
- texture[2]/image
-
-
- texture[2]/type
-
- nearest-mipmap-nearest
-
- texture[2]/wrap-s
-
-
- texture[2]/wrap-t
-
-
- texture[2]/internal-format
-
-
- average
- average
- average
- min
-
-
-
-
- Shaders/urban.vert
- Shaders/shadows-include.vert
- Shaders/include_fog.frag
- Shaders/urban.frag
- Shaders/shadows-include.frag
-
- tangent
- 6
-
-
- binormal
- 7
-
-
-
- BaseTex
- sampler-2d
- 0
-
-
- NormalTex
- sampler-2d
- 1
-
-
- NoiseTex
- sampler-3d
- 2
-
-
- QDMTex
- sampler-2d
- 3
-
-
- depth_factor
- float
-
- depth-factor
-
-
-
- tile_size
- float
-
- xsize
-
-
-
- night_color
- float-vec3
-
- night-color
-
-
-
- quality_level
- float
-
- quality-level
-
-
-
- snowlevel
- float
-
- snow-level
-
-
-
- max_lod_level
- float
-
- max-lod-level
-
-
-
- random_buildings
- bool
-
- random-buildings
-
-
-
- osm_buildings
- bool
-
- osm-buildings
-
-
-
-
- visibility
- float
-
- visibility
-
-
-
- avisibility
- float
-
- avisibility
-
-
-
- hazeLayerAltitude
- float
-
- lthickness
-
-
-
- scattering
- float
-
- scattering
-
-
-
- terminator
- float
-
- terminator
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
-
- shadow_tex
- sampler-2d
- 10
-
-
- shadows_enabled
- bool
-
- shadows_enabled
-
-
-
- sun_atlas_size
- int
-
- sun_atlas_size
-
-
-
-
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/urban
-
- 0.0
- /sim/rendering/photoscenery/enabled
-
-
- 1.0
- /sim/rendering/shaders/urban
-
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
-
- true
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
- ambient-and-diffuse
-
-
- transparent
-
-
- transparent
-
- smooth
- back
-
-
- render-bin/bin-number
-
-
- render-bin/bin-name
-
-
-
- 0
-
- texture[0]/image
-
-
- texture[0]/type
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
- texture[0]/internal-format
-
-
-
- 1
-
- texture[2]/image
-
-
- texture[2]/type
-
-
- texture[2]/filter
-
-
- texture[2]/wrap-s
-
-
- texture[2]/wrap-t
-
-
- texture[2]/internal-format
-
-
-
- 2
- noise
-
-
-
- Shaders/urban.vert
- Shaders/shadows-include.vert
- Shaders/include_fog.frag
- Shaders/urban.frag
- Shaders/shadows-include.frag
-
- tangent
- 6
-
-
- binormal
- 7
-
-
-
-
- visibility
- float
-
- visibility
-
-
-
- avisibility
- float
-
- avisibility
-
-
-
- hazeLayerAltitude
- float
-
- lthickness
-
-
-
- scattering
- float
-
- scattering
-
-
-
- terminator
- float
-
- terminator
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
- BaseTex
- sampler-2d
- 0
-
-
- NormalTex
- sampler-2d
- 1
-
-
- NoiseTex
- sampler-3d
- 2
-
-
- depth_factor
- float
-
- depth-factor
-
-
-
- tile_size
- float
-
- xsize
-
-
-
- night_color
- float-vec3
-
- night-color
-
-
-
- quality_level
- float
-
- quality-level
-
-
-
- snowlevel
- float
-
- snow-level
-
-
-
-
- shadow_tex
- sampler-2d
- 10
-
-
- shadows_enabled
- bool
-
- shadows_enabled
-
-
-
- sun_atlas_size
- int
-
- sun_atlas_size
-
-
-
-
-
+ Effects/urban
+ Effects/terrain-default
diff --git a/Effects/water-inland.eff b/Effects/water-inland.eff
index b7034eef9..8518294d8 100644
--- a/Effects/water-inland.eff
+++ b/Effects/water-inland.eff
@@ -1414,386 +1414,4 @@
-
-
-
- /sim/rendering/shaders/water
-
- 2.0
- /sim/rendering/shaders/water
-
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
- true
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
- ambient-and-diffuse
-
-
- transparent
-
-
- transparent
-
- smooth
- back
-
-
- render-bin/bin-number
-
-
- render-bin/bin-name
-
-
-
- 0
-
- texture[0]/image
-
-
- texture[0]/type
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
- texture[0]/internal-format
-
-
-
- 2
-
- texture[2]/image
-
-
- texture[2]/type
-
-
- texture[2]/filter
-
-
- texture[2]/wrap-s
-
-
- texture[2]/wrap-t
-
-
- texture[2]/internal-format
-
-
-
- 3
-
- texture[3]/image
-
-
- texture[3]/type
-
-
- texture[3]/filter
-
-
- texture[3]/wrap-s
-
-
- texture[3]/wrap-t
-
-
- texture[3]/internal-format
-
-
-
- 4
-
- texture[4]/image
-
-
- texture[4]/type
-
-
- texture[4]/filter
-
-
- texture[4]/wrap-s
-
-
- texture[4]/wrap-t
-
-
- texture[4]/internal-format
-
-
-
- 5
-
- texture[5]/image
-
-
- texture[5]/type
-
-
- texture[5]/filter
-
-
- texture[5]/wrap-s
-
-
- texture[5]/wrap-t
-
-
- texture[5]/internal-format
-
-
-
- 6
-
- texture[6]/image
-
-
- texture[6]/type
-
-
- texture[6]/filter
-
-
- texture[6]/wrap-s
-
-
- texture[6]/wrap-t
-
-
- texture[6]/internal-format
-
-
-
-
- Shaders/water.vert
- Shaders/include_fog.frag
- Shaders/water.frag
-
-
- water_reflection
- sampler-2d
- 0
-
-
- water_normalmap
- sampler-2d
- 2
-
-
- water_dudvmap
- sampler-2d
- 3
-
-
- water_reflection_grey
- sampler-2d
- 4
-
-
- sea_foam
- sampler-2d
- 5
-
-
- perlin_normalmap
- sampler-2d
- 6
-
-
-
- normalmap_dds
- float
-
- normalmap_dds
-
-
-
- saturation
- float
-
- saturation
-
-
-
- CloudCover0
- float
-
- cloud-cover[0]
-
-
-
- CloudCover1
- float
-
- cloud-cover[1]
-
-
-
- CloudCover2
- float
-
- cloud-cover[2]
-
-
-
- CloudCover3
- float
-
- cloud-cover[3]
-
-
-
- CloudCover4
- float
-
- cloud-cover[4]
-
-
-
- Status
- int
-
- status
-
-
-
- Overcast
- float
-
- overcast
-
-
-
- WindE
- float
-
- windE
-
-
-
- WindN
- float
-
- windN
-
-
-
- WaveFreq
- float
-
- WaveFreq
-
-
-
- WaveAmp
- float
-
- WaveAmp
-
-
-
- WaveSharp
- float
-
- WaveSharp
-
-
-
- WaveAngle
- float
-
- WaveAngle
-
-
-
- WaveFactor
- float
-
- WaveFactor
-
-
-
- WaveDAngle
- float
-
- WaveDAngle
-
-
-
-
-
- visibility
- float
-
- visibility
-
-
-
- avisibility
- float
-
- avisibility
-
-
-
- hazeLayerAltitude
- float
-
- lthickness
-
-
-
- scattering
- float
-
- scattering
-
-
-
- terminator
- float
-
- terminator
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
-
-
diff --git a/Effects/water.eff b/Effects/water.eff
index 8007c801a..029874edb 100644
--- a/Effects/water.eff
+++ b/Effects/water.eff
@@ -1390,830 +1390,4 @@
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/water
-
- 4.0
- /sim/rendering/shaders/water
-
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
- true
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
- ambient-and-diffuse
-
-
- transparent
-
-
- transparent
-
- smooth
- back
-
-
- render-bin/bin-number
-
-
- render-bin/bin-name
-
-
-
-
- 0
-
- texture[0]/image
-
-
- texture[0]/type
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
- texture[0]/internal-format
-
-
-
- 1
- noise
-
-
- 2
-
- texture[2]/image
-
-
- texture[2]/type
-
-
- texture[2]/filter
-
-
- texture[2]/wrap-s
-
-
- texture[2]/wrap-t
-
-
- texture[2]/internal-format
-
-
-
- 3
-
- texture[3]/image
-
-
- texture[3]/type
-
-
- texture[3]/filter
-
-
- texture[3]/wrap-s
-
-
- texture[3]/wrap-t
-
-
- texture[3]/internal-format
-
-
-
- 4
-
- texture[4]/image
-
-
- texture[4]/type
-
-
- texture[4]/filter
-
-
- texture[4]/wrap-s
-
-
- texture[4]/wrap-t
-
-
- texture[4]/internal-format
-
-
-
- 5
-
- texture[5]/image
-
-
- texture[5]/type
-
-
- texture[5]/filter
-
-
- texture[5]/wrap-s
-
-
- texture[5]/wrap-t
-
-
- texture[5]/internal-format
-
-
-
- 6
-
- texture[6]/image
-
-
- texture[6]/type
-
-
- texture[6]/filter
-
-
- texture[6]/wrap-s
-
-
- texture[6]/wrap-t
-
-
- texture[6]/internal-format
-
-
-
- 7
-
- texture[7]/image
-
-
- texture[7]/type
-
-
- texture[7]/filter
-
-
- texture[7]/wrap-s
-
-
- texture[7]/wrap-t
-
-
- texture[7]/internal-format
-
-
-
-
- Shaders/water.vert
- Shaders/include_fog.frag
- Shaders/water_sine.frag
-
-
- water_reflection
- sampler-2d
- 0
-
-
- Noise
- sampler-3d
- 1
-
-
- water_normalmap
- sampler-2d
- 2
-
-
- water_dudvmap
- sampler-2d
- 3
-
-
- water_reflection_grey
- sampler-2d
- 4
-
-
- sea_foam
- sampler-2d
- 5
-
-
- perlin_normalmap
- sampler-2d
- 6
-
-
- topo_map
- sampler-2d
- 7
-
-
-
- normalmap_dds
- float
-
- normalmap_dds
-
-
-
- saturation
- float
-
-
- saturation
-
-
-
- CloudCover0
- float
-
- cloud-cover[0]
-
-
-
- CloudCover1
- float
-
- cloud-cover[1]
-
-
-
- CloudCover2
- float
-
- cloud-cover[2]
-
-
-
- CloudCover3
- float
-
- cloud-cover[3]
-
-
-
- CloudCover4
- float
-
- cloud-cover[4]
-
-
-
-
- Status
- int
-
- status
-
-
-
-
- Overcast
- float
-
- overcast
-
-
-
- WindE
- float
-
- windE
-
-
-
- WindN
- float
-
- windN
-
-
-
- WaveFreq
- float
-
- WaveFreq
-
-
-
- WaveAmp
- float
-
- WaveAmp
-
-
-
- WaveSharp
- float
-
- WaveSharp
-
-
-
- WaveAngle
- float
-
- WaveAngle
-
-
-
- WaveFactor
- float
-
- WaveFactor
-
-
-
- WaveDAngle
- float
-
- WaveDAngle
-
-
-
-
-
- visibility
- float
-
- visibility
-
-
-
- avisibility
- float
-
- avisibility
-
-
-
- hazeLayerAltitude
- float
-
- lthickness
-
-
-
- scattering
- float
-
- scattering
-
-
-
- terminator
- float
-
- terminator
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
-
-
-
-
-
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/water
-
- 2.0
- /sim/rendering/shaders/water
-
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
- true
-
-
- material/ambient
-
-
- material/diffuse
-
-
- material/specular
-
- ambient-and-diffuse
-
-
- transparent
-
-
- transparent
-
- smooth
- back
-
-
- render-bin/bin-number
-
-
- render-bin/bin-name
-
-
-
- 0
-
- texture[0]/image
-
-
- texture[0]/type
-
-
- texture[0]/filter
-
-
- texture[0]/wrap-s
-
-
- texture[0]/wrap-t
-
-
- texture[0]/internal-format
-
-
-
- 2
-
- texture[2]/image
-
-
- texture[2]/type
-
-
- texture[2]/filter
-
-
- texture[2]/wrap-s
-
-
- texture[2]/wrap-t
-
-
- texture[2]/internal-format
-
-
-
- 3
-
- texture[3]/image
-
-
- texture[3]/type
-
-
- texture[3]/filter
-
-
- texture[3]/wrap-s
-
-
- texture[3]/wrap-t
-
-
- texture[3]/internal-format
-
-
-
- 4
-
- texture[4]/image
-
-
- texture[4]/type
-
-
- texture[4]/filter
-
-
- texture[4]/wrap-s
-
-
- texture[4]/wrap-t
-
-
- texture[4]/internal-format
-
-
-
- 5
-
- texture[5]/image
-
-
- texture[5]/type
-
-
- texture[5]/filter
-
-
- texture[5]/wrap-s
-
-
- texture[5]/wrap-t
-
-
- texture[5]/internal-format
-
-
-
- 6
-
- texture[6]/image
-
-
- texture[6]/type
-
-
- texture[6]/filter
-
-
- texture[6]/wrap-s
-
-
- texture[6]/wrap-t
-
-
- texture[6]/internal-format
-
-
-
-
- Shaders/water.vert
- Shaders/include_fog.frag
- Shaders/water.frag
-
-
- water_reflection
- sampler-2d
- 0
-
-
- water_normalmap
- sampler-2d
- 2
-
-
- water_dudvmap
- sampler-2d
- 3
-
-
- water_reflection_grey
- sampler-2d
- 4
-
-
- sea_foam
- sampler-2d
- 5
-
-
- perlin_normalmap
- sampler-2d
- 6
-
-
-
- normalmap_dds
- float
-
- normalmap_dds
-
-
-
- saturation
- float
-
-
- saturation
-
-
-
- CloudCover0
- float
-
- cloud-cover[0]
-
-
-
- CloudCover1
- float
-
- cloud-cover[1]
-
-
-
- CloudCover2
- float
-
- cloud-cover[2]
-
-
-
- CloudCover3
- float
-
- cloud-cover[3]
-
-
-
- CloudCover4
- float
-
- cloud-cover[4]
-
-
-
- Status
- int
-
- status
-
-
-
- Overcast
- float
-
- overcast
-
-
-
- WindE
- float
-
- windE
-
-
-
- WindN
- float
-
- windN
-
-
-
-
- WaveFreq
- float
-
- WaveFreq
-
-
-
- WaveAmp
- float
-
- WaveAmp
-
-
-
- WaveSharp
- float
-
- WaveSharp
-
-
-
- WaveAngle
- float
-
- WaveAngle
-
-
-
- WaveFactor
- float
-
- WaveFactor
-
-
-
- WaveDAngle
- float
-
- WaveDAngle
-
-
-
-
-
- visibility
- float
-
- visibility
-
-
-
- avisibility
- float
-
- avisibility
-
-
-
- hazeLayerAltitude
- float
-
- lthickness
-
-
-
- scattering
- float
-
- scattering
-
-
-
- terminator
- float
-
- terminator
-
-
-
- fogType
- int
-
- fogtype
-
-
-
-
-
diff --git a/Nasal/gui.nas b/Nasal/gui.nas
index 0989a9343..7ff1d3667 100644
--- a/Nasal/gui.nas
+++ b/Nasal/gui.nas
@@ -1366,90 +1366,6 @@ setlistener("/sim/signals/fdm-initialized", func {
do_welcome = 0;
});
-
-##
-# overwrite custom shader settings when quality-level is set on startup
-var qualityLevel = getprop("/sim/rendering/shaders/quality-level");
-var rembrandtOn = getprop("/sim/rendering/rembrandt/enabled");
-if (qualityLevel == -1) {
- setprop("/sim/rendering/shaders/custom-settings",1);
-}
-elsif (qualityLevel != nil) {
- setprop("/sim/rendering/shaders/custom-settings",0);
- setprop("/sim/rendering/shaders/quality-level-internal",qualityLevel);
- if (qualityLevel == 0) {
- setprop("/sim/rendering/shaders/skydome",0);
- }
-}
-
-# overwrite custom shader settings when quality-level is set through the slider
-# in the Rendering Options dialog
-var update_shader_settings = func() {
- var shaderPath = "/sim/rendering/shaders/";
- if (getprop(shaderPath ~ "custom-settings")) {
- setprop(shaderPath ~ "quality-level", -1);
- } else {
- var qualityLvl = getprop(shaderPath ~ "quality-level-internal") or 0;
- setprop(shaderPath ~ "quality-level", qualityLvl);
-
- if (qualityLvl < 2) {
- # Non-ALS fallback
- setprop(shaderPath ~ "skydome", 0.0);
- setprop(shaderPath ~ "quality-level", qualityLvl);
- setprop(shaderPath ~ "landmass", qualityLvl);
- setprop(shaderPath ~ "urban", qualityLvl);
- setprop(shaderPath ~ "water", qualityLvl);
-
- qualityLvl = math.min(qualityLvl, 4.0);
- setprop(shaderPath ~ "lights", qualityLvl);
-
- qualityLvl = math.min(qualityLvl, 1.0);
- setprop(shaderPath ~ "model", qualityLvl);
- setprop(shaderPath ~ "contrails", qualityLvl);
- setprop(shaderPath ~ "crop", qualityLvl);
- setprop(shaderPath ~ "generic", qualityLvl);
- setprop(shaderPath ~ "transition", qualityLvl);
- } else {
- # ALS from quality 2 upwards
- setprop(shaderPath ~ "skydome", 1.0);
-
- if (qualityLvl != 0.0) {
- setprop(shaderPath ~ "landmass", qualityLvl + 1); # these go to 6 rather than 5
- setprop(shaderPath ~ "transition", qualityLvl + 1);
- } else {
- setprop(shaderPath ~ "landmass", 0);
- setprop(shaderPath ~ "transition", 0);
- }
- setprop(shaderPath ~ "water", qualityLvl);
- setprop(shaderPath ~ "urban", qualityLvl);
-
- if (qualityLvl >= 5.0) {
- setprop(shaderPath ~ "vegetation-effects", qualityLvl);
- } else {
- setprop(shaderPath ~ "vegetation-effects", 0);
- }
-
- qualityLvl = math.min(qualityLvl, 4.0);
- setprop(shaderPath ~ "lights", qualityLvl);
-
- qualityLvl = math.min(qualityLvl, 3.0);
- setprop(shaderPath ~ "model", qualityLvl);
-
- qualityLvl = math.min(qualityLvl, 2.0);
- setprop(shaderPath ~ "wind-effects", qualityLvl);
-
- qualityLvl = math.min(qualityLvl, 1.0);
- setprop(shaderPath ~ "crop", qualityLvl);
- setprop(shaderPath ~ "clouds", qualityLvl);
- setprop(shaderPath ~ "forest", qualityLvl);
- }
- }
-};
-
-setlistener("/sim/rendering/shaders/custom-settings", func { update_shader_settings() } );
-setlistener("/sim/rendering/shaders/quality-level-internal", func { update_shader_settings() } );
-update_shader_settings();
-
screenHProp = props.globals.getNode("/sim/startup/ysize");
props.globals.getNode("/sim/help/debug", 1).setValues(debug_keys);
@@ -1554,4 +1470,4 @@ setlistener(
},
1, # init - trigger immediately.
0, # type - trigger only when value changed.
- );
\ No newline at end of file
+ );
diff --git a/Shaders/bowwave.frag b/Shaders/bowwave.frag
deleted file mode 100644
index f25e0b082..000000000
--- a/Shaders/bowwave.frag
+++ /dev/null
@@ -1,217 +0,0 @@
-// This shader is mostly an adaptation of the shader found at
-// http://www.bonzaisoftware.com/water_tut.html and its glsl conversion
-// available at http://forum.bonzaisoftware.com/viewthread.php?tid=10
-// © Michael Horsch - 2005
-// Major update and revisions - 2011-10-07
-// © Emilian Huminiuc and Vivian Meazza
-// Optimisation - 2012-5-05
-// © Emilian Huminiuc and Vivian Meazza
-
-#version 120
-#define fps2kts 0.5925
-
-uniform sampler2D water_normalmap;
-uniform sampler2D water_reflection;
-uniform sampler2D water_dudvmap;
-uniform sampler2D water_reflection_grey;
-uniform sampler2D sea_foam;
-uniform sampler2D alpha_tex;
-uniform sampler2D bowwave_nmap;
-
-uniform float saturation, Overcast, WindE, WindN, spd, hdg;
-uniform float CloudCover0, CloudCover1, CloudCover2, CloudCover3, CloudCover4;
-uniform int Status;
-
-varying vec4 waterTex1; //moving texcoords
-varying vec4 waterTex2; //moving texcoords
-varying vec3 viewerdir;
-varying vec3 lightdir;
-varying vec3 normal;
-
-////fog "include" /////
-uniform int fogType;
-
-vec3 fog_Func(vec3 color, int type);
-//////////////////////
-
-/////// functions /////////
-
-float normalize_range(float _val)
- {
- if (_val > 180.0)
- return _val - 360.0;
- else
- return _val;
- }
-
-
-void relWind(out float rel_wind_speed_kts, out float rel_wind_from_rad)
- {
- //calculate the carrier speed north and east in kts
- float speed_north_kts = cos(radians(hdg)) * spd ;
- float speed_east_kts = sin(radians(hdg)) * spd ;
-
- //calculate the relative wind speed north and east in kts
- float rel_wind_speed_from_east_kts = WindE*fps2kts + speed_east_kts;
- float rel_wind_speed_from_north_kts = WindN*fps2kts + speed_north_kts;
-
- //combine relative speeds north and east to get relative windspeed in kts
- rel_wind_speed_kts = sqrt(rel_wind_speed_from_east_kts*rel_wind_speed_from_east_kts
- + rel_wind_speed_from_north_kts*rel_wind_speed_from_north_kts);
-
- //calculate the relative wind direction
- float rel_wind_from_deg = degrees(atan(rel_wind_speed_from_east_kts, rel_wind_speed_from_north_kts));
- // rel_wind_from_rad = atan(rel_wind_speed_from_east_kts, rel_wind_speed_from_north_kts);
- float rel_wind = rel_wind_from_deg - hdg;
- rel_wind = normalize_range(rel_wind);
- rel_wind_from_rad = radians(rel_wind);
- }
-
-void rotationmatrix(in float angle, out mat4 rotmat)
- {
- rotmat = mat4( cos( angle ), -sin( angle ), 0.0, 0.0,
- sin( angle ), cos( angle ), 0.0, 0.0,
- 0.0 , 0.0 , 1.0, 0.0,
- 0.0 , 0.0 , 0.0, 1.0 );
- }
-
-//////////////////////
-
-void main(void)
- {
- const vec4 sca = vec4(0.005, 0.005, 0.005, 0.005);
- const vec4 sca2 = vec4(0.02, 0.02, 0.02, 0.02);
- const vec4 tscale = vec4(0.25, 0.25, 0.25, 0.25);
-
- mat4 RotationMatrix;
-
- float relWindspd=0;
- float relWinddir=0;
-
- // compute relative wind speed and direction
- relWind (relWindspd, relWinddir);
-
- rotationmatrix(relWinddir, RotationMatrix);
-
- // compute direction to viewer
- vec3 E = normalize(viewerdir);
-
- // compute direction to light source
- vec3 L = normalize(lightdir);
-
- // half vector
- vec3 H = normalize(L + E);
-
- const float water_shininess = 240.0;
- // approximate cloud cover
- float cover = 0.0;
- //bool Status = true;
-
- float windEffect = relWindspd; //wind speed in kt
- // float windEffect = sqrt(pow(abs(WindE),2)+pow(abs(WindN),2)) * 0.6; //wind speed in kt
- float windScale = 15.0/(5.0 + windEffect); //wave scale
- float waveRoughness = 0.05 + smoothstep(0.0, 50.0, windEffect); //wave roughness filter
-
-
- if (Status == 1){
- cover = min(min(min(min(CloudCover0, CloudCover1),CloudCover2),CloudCover3),CloudCover4);
- } else {
- // hack to allow for Overcast not to be set by Local Weather
-
- if (Overcast == 0){
- cover = 5;
- } else {
- cover = Overcast * 5;
- }
-
- }
-
- //vec4 viewt = normalize(waterTex4);
- vec4 viewt = vec4(-E, 0.0) * 0.6;
-
- vec4 disdis = texture2D(water_dudvmap, vec2(waterTex2 * tscale)* windScale * 2.0) * 2.0 - 1.0;
- vec4 dist = texture2D(water_dudvmap, vec2(waterTex1 + disdis*sca2)* windScale * 2.0) * 2.0 - 1.0;
- vec4 fdist = normalize(dist);
- fdist = -fdist;
- fdist *= sca;
-
- //normalmap
- rotationmatrix(-relWinddir, RotationMatrix);
-
- vec4 nmap0 = texture2D(water_normalmap, vec2((waterTex1 + disdis*sca2) * RotationMatrix ) * windScale * 2.0) * 2.0 - 1.0;
- vec4 nmap2 = texture2D(water_normalmap, vec2(waterTex2 * tscale * RotationMatrix ) * windScale * 2.0) * 2.0 - 1.0;
- vec4 nmap3 = texture2D(bowwave_nmap, gl_TexCoord[0].st) * 2.0 - 1.0;
- vec4 vNorm = normalize(mix(nmap3, nmap0 + nmap2, 0.3 )* waveRoughness);
- vNorm = -vNorm;
-
- //load reflection
- vec4 tmp = vec4(lightdir, 0.0);
- vec4 refTex = texture2D(water_reflection, vec2(tmp + waterTex1) * 32.0) ;
- vec4 refTexGrey = texture2D(water_reflection_grey, vec2(tmp + waterTex1) * 32.0) ;
- vec4 refl ;
- // cover = 0;
-
- if(cover >= 1.5){
- refl= normalize(refTex);
- }
- else
- {
- refl = normalize(refTexGrey);
- refl.r *= (0.75 + 0.15 * cover);
- refl.g *= (0.80 + 0.15 * cover);
- refl.b *= (0.875 + 0.125 * cover);
- refl.a *= 1.0;
- }
-
- vec3 N0 = vec3(texture2D(water_normalmap, vec2((waterTex1 + disdis*sca2)* RotationMatrix) * windScale * 2.0) * 2.0 - 1.0);
- vec3 N1 = vec3(texture2D(water_normalmap, vec2(waterTex2 * tscale * RotationMatrix ) * windScale * 2.0) * 2.0 - 1.0);
- vec3 N2 = vec3(texture2D(bowwave_nmap, gl_TexCoord[0].st)*2.0-1.0);
- //vec3 Nf = normalize((normal+N0+N1)*waveRoughness);
- vec3 N = normalize(mix(normal+N2, normal+N0+N1, 0.3)* waveRoughness);
- N = -N;
-
- // specular
- vec3 specular_color = vec3(gl_LightSource[0].diffuse)
- * pow(max(0.0, dot(N, H)), water_shininess) * 6.0;
- vec4 specular = vec4(specular_color, 0.5);
-
- specular = specular * saturation * 0.3;
-
- //calculate fresnel
- vec4 invfres = vec4( dot(vNorm, viewt) );
- vec4 fres = vec4(1.0) + invfres;
- refl *= fres;
-
- vec4 alpha0 = texture2D(alpha_tex, gl_TexCoord[0].st);
-
- //calculate final colour
- vec4 ambient_light = gl_LightSource[0].diffuse;
- vec4 finalColor;
-
- // cover = 0;
-
- if(cover >= 1.5){
- finalColor = refl + specular;
- } else {
- finalColor = refl;
- }
-
- //add foam
-
- float foamSlope = 0.05 + 0.01 * windScale;
- //float waveSlope = mix(N0.g, N1.g, 0.25);
-
- vec4 foam_texel = texture2D(sea_foam, vec2(waterTex2 * tscale) * 50.0);
- float waveSlope = N.g;
-
- if (windEffect >= 12.0)
- if (waveSlope >= foamSlope){
- finalColor = mix(finalColor, max(finalColor, finalColor + foam_texel), smoothstep(foamSlope, 0.5, N.g));
- }
-
- //generate final colour
- finalColor *= ambient_light+ alpha0 * 0.35;
- finalColor.rgb = fog_Func(finalColor.rgb, fogType);
- gl_FragColor = vec4(finalColor.rgb, alpha0.a * 1.35);
-
- }
diff --git a/Shaders/building-default.frag b/Shaders/building-default.frag
deleted file mode 100644
index c2306eed5..000000000
--- a/Shaders/building-default.frag
+++ /dev/null
@@ -1,63 +0,0 @@
-// -*-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;
-}
diff --git a/Shaders/building-ubershader.vert b/Shaders/building-ubershader.vert
deleted file mode 100644
index 758ae7850..000000000
--- a/Shaders/building-ubershader.vert
+++ /dev/null
@@ -1,122 +0,0 @@
-// -*- mode: C; -*-
-// RANDOM BUILDINGS for the UBERSHADER vertex shader
-// Licence: GPL v2
-// © Emilian Huminiuc and Vivian Meazza 2011
-#version 120
-#extension GL_EXT_draw_instanced : enable
-
-varying vec4 diffuseColor;
-varying vec3 VBinormal;
-varying vec3 VNormal;
-varying vec3 VTangent;
-varying vec3 eyeVec;
-varying vec3 normal;
-
-uniform int refl_dynamic;
-uniform int nmap_enabled;
-uniform int shader_qual;
-
-attribute vec3 instancePosition; // (x,y,z)
-attribute vec3 instanceScale; // (width, depth, height)
-attribute vec3 attrib1; // Generic packed attributes
-attribute vec3 attrib2;
-
-const float c_precision = 128.0;
-const float c_precisionp1 = c_precision + 1.0;
-
-vec3 float2vec(float value) {
- vec3 val;
- val.x = mod(value, c_precisionp1) / c_precision;
- val.y = mod(floor(value / c_precisionp1), c_precisionp1) / c_precision;
- val.z = floor(value / (c_precisionp1 * c_precisionp1)) / c_precision;
- return val;
-}
-
-void main(void)
-{
- // Unpack generic attributes
- vec3 attr1 = float2vec(attrib1.x);
- vec3 attr2 = float2vec(attrib1.z);
- vec3 attr3 = float2vec(attrib2.x);
-
- // Determine the rotation for the building.
- float sr = sin(6.28 * attr1.x);
- float cr = cos(6.28 * attr1.x);
-
- vec3 position = gl_Vertex.xyz;
- // Adjust the very top of the roof to match the rooftop scaling. This shapes
- // the rooftop - gambled, gabled etc. These vertices are identified by gl_Color.z
- position.x = (1.0 - gl_Color.z) * position.x + gl_Color.z * ((position.x + 0.5) * attr3.z - 0.5);
- position.y = (1.0 - gl_Color.z) * position.y + gl_Color.z * (position.y * attrib2.y );
-
- // Adjust pitch of roof to the correct height. These vertices are identified by gl_Color.z
- // Scale down by the building height (instanceScale.z) because
- // immediately afterwards we will scale UP the vertex to the correct scale.
- position.z = position.z + gl_Color.z * attrib1.y / instanceScale.z;
- position = position * instanceScale.xyz;
-
- // Rotation of the building and movement into position
- position.xy = vec2(dot(position.xy, vec2(cr, sr)), dot(position.xy, vec2(-sr, cr)));
- position = position + instancePosition.xyz;
-
- gl_Position = gl_ModelViewProjectionMatrix * vec4(position,1.0);
- vec4 ecPosition = gl_ModelViewMatrix * vec4(position, 1.0);
-
- eyeVec = ecPosition.xyz;
-
- // Rotate the normal.
- normal = gl_Normal;
-
- // Rotate the normal as per the building.
- normal.xy = vec2(dot(normal.xy, vec2(cr, sr)), dot(normal.xy, vec2(-sr, cr)));
- vec3 n = normalize(normal);
-
- vec3 c1 = cross(n, vec3(0.0,0.0,1.0));
- vec3 c2 = cross(n, vec3(0.0,1.0,0.0));
- VNormal = normalize(gl_NormalMatrix * normal);
-
- VTangent = c1;
- if(length(c2)>length(c1)){
- VTangent = c2;
- }
-
- VBinormal = cross(n, VTangent);
-
- VTangent = normalize(gl_NormalMatrix * -VTangent);
- VBinormal = normalize(gl_NormalMatrix * VBinormal);
-
-// Force no alpha on random buildings
- diffuseColor = vec4(gl_FrontMaterial.diffuse.rgb,1.0);
-
- gl_FrontColor = gl_FrontMaterial.emission + vec4(1.0)
- * (gl_LightModel.ambient + gl_LightSource[0].ambient);
-
- gl_ClipVertex = ecPosition;
-
- // Texture coordinates are stored as:
- // - a separate offset (x0, y0) for the wall (wtex0x, wtex0y), and roof (rtex0x, rtex0y)
- // - a semi-shared (x1, y1) so that the front and side of the building can have
- // different texture mappings
- //
- // The vertex color value selects between them:
- // gl_Color.x=1 indicates front/back walls
- // gl_Color.y=1 indicates roof
- // gl_Color.z=1 indicates top roof vertexs (used above)
- // gl_Color.a=1 indicates sides
- // Finally, the roof texture is on the right of the texture sheet
- float wtex0x = attr1.y; // Front/Side texture X0
- float wtex0y = attr1.z; // Front/Side texture Y0
- float rtex0x = attr2.z; // Roof texture X0
- float rtex0y = attr3.x; // Roof texture Y0
- float wtex1x = attr2.x; // Front/Roof texture X1
- float stex1x = attr3.y; // Side texture X1
- float wtex1y = attr2.y; // Front/Roof/Side texture Y1
- vec2 tex0 = vec2(sign(gl_MultiTexCoord0.x) * (gl_Color.x*wtex0x + gl_Color.y*rtex0x + gl_Color.a*wtex0x),
- gl_Color.x*wtex0y + gl_Color.y*rtex0y + gl_Color.a*wtex0y);
-
- vec2 tex1 = vec2(gl_Color.x*wtex1x + gl_Color.y*wtex1x + gl_Color.a*stex1x,
- wtex1y);
-
- gl_TexCoord[0].x = tex0.x + gl_MultiTexCoord0.x * tex1.x;
- gl_TexCoord[0].y = tex0.y + gl_MultiTexCoord0.y * tex1.y;
-}
diff --git a/Shaders/bumpspec.frag b/Shaders/bumpspec.frag
deleted file mode 100644
index 79b9cbba4..000000000
--- a/Shaders/bumpspec.frag
+++ /dev/null
@@ -1,53 +0,0 @@
-// -*- mode: C; -*-
-// Licence: GPL v2
-// Author: Frederic Bouvier
-#version 120
-//varying float fogCoord;
-
-varying vec3 VNormal;
-varying vec3 VTangent;
-varying vec3 VBinormal;
-
-uniform sampler2D tex_color;
-uniform sampler2D tex_normal;
-
-////fog "include" /////
-uniform int fogType;
-
-vec3 fog_Func(vec3 color, int type);
-//////////////////////
-
-void main (void)
-{
- vec4 ns = texture2D(tex_normal, gl_TexCoord[0].st);
- vec3 N = ns.rgb * 2.0 - 1.0;
- N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal);
-
- float nDotVP = max(0.0, dot(N, normalize(gl_LightSource[0].position.xyz)));
- float nDotHV = max(0.0, dot(N, gl_LightSource[0].halfVector.xyz));
-
- float pf;
- if (nDotHV == 0.0)
- pf = 0.0;
- else
- pf = pow(nDotHV, gl_FrontMaterial.shininess);
-
- vec4 Diffuse = gl_LightSource[0].diffuse * nDotVP;
- vec4 Specular = gl_LightSource[0].specular * pf;
-
- vec4 color = gl_Color + Diffuse * gl_FrontMaterial.diffuse;
- color *= texture2D(tex_color, gl_TexCoord[0].xy);
-
- color += Specular * gl_FrontMaterial.specular * ns.a;
- color = clamp( color, 0.0, 1.0 );
-
-
-// float fogFactor;
-// const float LOG2 = 1.442695;
-// fogFactor = exp2(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord * LOG2);
-// fogFactor = clamp(fogFactor, 0.0, 1.0);
-// gl_FragColor = mix(gl_Fog.color, color, fogFactor);
-
- color.rgb = fog_Func(color.rgb, fogType);
- gl_FragColor = color;
-}
diff --git a/Shaders/bumpspec.vert b/Shaders/bumpspec.vert
deleted file mode 100644
index e9dc8547e..000000000
--- a/Shaders/bumpspec.vert
+++ /dev/null
@@ -1,26 +0,0 @@
-// -*- mode: C; -*-
-// Licence: GPL v2
-// Author: Frederic Bouvier
-#version 120
-
-//varying float fogCoord;
-varying vec3 VNormal;
-varying vec3 VTangent;
-varying vec3 VBinormal;
-
-attribute vec3 tangent;
-attribute vec3 binormal;
-
-void main (void)
-{
-// vec4 pos = gl_ModelViewMatrix * gl_Vertex;
-// fogCoord = pos.z / pos.w;
-
- VNormal = normalize(gl_NormalMatrix * gl_Normal);
- VTangent = normalize(gl_NormalMatrix * tangent);
- VBinormal = normalize(gl_NormalMatrix * binormal);
-
- gl_FrontColor = gl_FrontLightModelProduct.sceneColor + gl_LightSource[0].ambient * gl_FrontMaterial.ambient;
- gl_TexCoord[0] = gl_MultiTexCoord0;
- gl_Position = ftransform();
-}
diff --git a/Shaders/contrail.frag b/Shaders/contrail.frag
deleted file mode 100644
index e2745a12d..000000000
--- a/Shaders/contrail.frag
+++ /dev/null
@@ -1,17 +0,0 @@
-#version 120
-
-uniform sampler2D baseTexture;
-
-varying float fogFactor;
-varying float distanceFactor;
-varying vec2 texCoord;
-
-
-void main(void)
-{
- vec4 base = texture2D( baseTexture, gl_TexCoord[0].st);
- vec4 finalColor = base * gl_Color;
- gl_FragColor.rgb = mix(gl_Fog.color.rgb, finalColor.rgb, fogFactor);
- gl_FragColor.a = mix(0.0, finalColor.a, distanceFactor);
-}
-
diff --git a/Shaders/contrail.vert b/Shaders/contrail.vert
deleted file mode 100644
index a1ec81eb9..000000000
--- a/Shaders/contrail.vert
+++ /dev/null
@@ -1,99 +0,0 @@
-// -*-C++-*-
-#version 120
-
-varying float fogFactor;
-varying float distanceFactor;
-
-uniform sampler3D Noise;
-
-uniform float scale_x;
-uniform float scale_y;
-uniform float scale_z;
-
-uniform float offset_x;
-uniform float offset_y;
-uniform float offset_z;
-
-uniform float fade_max;
-uniform float fade_min;
-
-void main(void)
-{
- vec4 rawpos = gl_Vertex;
-
- float shade = 0.9;
- float cloud_height = 30000.0;
-
- // map noise vectors
- vec4 noisevec = texture3D(Noise, rawpos.xyz);
- float noise0 = (noisevec.r * 2.0) - 1.0;
- float noise1 =(noisevec.g * 2.0) - 1.0;
- vec2 noise2 = noisevec.xy;
-
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- //gl_TexCoord[0] = gl_MultiTexCoord0 + vec4(textureIndexX, textureIndexY, 0.0, 0.0);
- vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0);
- vec4 l = gl_ModelViewMatrixInverse * vec4(0.0,0.0,1.0,1.0);
- vec3 u = normalize(ep.xyz - l.xyz);
-
- // Find a rotation matrix that rotates 1,0,0 into u. u, r and w are
- // the columns of that matrix.
- vec3 absu = abs(u);
- vec3 r = normalize(vec3(-u.y, u.x, 0.0));
- vec3 w = cross(u, r);
-
- // Do the matrix multiplication by [ u r w pos]. Scale
- // the x component first
- gl_Position = vec4(gl_Vertex.x * scale_x, 0.0, 0.0, 1.0);
- gl_Position.xyz += gl_Vertex.x * u;
- gl_Position.xyz += gl_Vertex.y * r * scale_y;
- gl_Position.xyz += gl_Vertex.z * w * scale_z;
-
- // Adjust the position post-rotation and scaling
- gl_Position.yz -= 3.0/2.0;
-
- // Offset in y and z directions using a random noise factor
- float offset_Y = (noise0 * offset_y) + offset_y/2.0;
- float offset_Z = (noise0 * offset_z) + offset_z/2.0;
-
- distanceFactor = 1.0 - clamp(abs(noise0), fade_min, fade_max);
-// distanceFactor = 0.5;
-
- gl_Position.y += offset_Y;
- gl_Position.z += offset_Z;
-
- gl_Position.xyz += gl_Color.xyz;
-
- // Determine a lighting normal based on the vertex position from the
- // center of the cloud, so that sprite on the opposite side of the cloud to the sun are darker.
- float n = dot(normalize(-gl_LightSource[0].position.xyz),
- normalize(mat3x3(gl_ModelViewMatrix) * (- gl_Position.xyz)));;
-
- // Determine the position - used for fog and shading calculations
- vec3 ecPosition = vec3(gl_ModelViewMatrix * gl_Position);
- float fogCoord = abs(ecPosition.z);
- float fract = smoothstep(0.0, cloud_height, gl_Position.z + cloud_height);
-
- // Final position of the sprite
- gl_Position = gl_ModelViewProjectionMatrix * gl_Position;
-
- // Calculate the total offset distance in the yx plane, normalised
- /*float distance = normalize(sqrt(pow(gl_Position.y, 2) + pow(gl_Position.z, 2)));
- distanceFactor = 1.0 - clamp(distance, 0.5, 1.0);*/
- // Determine the shading of the sprite based on its vertical position and position relative to the sun.
- n = min(smoothstep(-0.5, 0.0, n), fract);
-
- // Determine the shading based on a mixture from the backlight to the front
- vec4 backlight = gl_LightSource[0].diffuse * shade;
-
- gl_FrontColor = mix(backlight, gl_LightSource[0].diffuse, n);
- gl_FrontColor += gl_FrontLightModelProduct.sceneColor;
-
- // As we get within 100m of the sprite, it is faded out. Equally at large distances it also fades out.
- gl_FrontColor.a = min(smoothstep(10.0, 100.0, fogCoord), 1.0 - smoothstep(60000.0, 80000.0, fogCoord));
- gl_BackColor = gl_FrontColor;
-
- // Fog doesn't affect clouds as much as other objects.
- fogFactor = exp( -gl_Fog.density * fogCoord);
- fogFactor = clamp(fogFactor, 0.0, 1.0);
-}
diff --git a/Shaders/crop.frag b/Shaders/crop.frag
deleted file mode 100644
index dd575b0b4..000000000
--- a/Shaders/crop.frag
+++ /dev/null
@@ -1,83 +0,0 @@
-#version 120
-
-varying vec4 rawpos;
-varying vec4 ecPosition;
-varying vec3 VNormal;
-varying vec3 Normal;
-
-uniform sampler3D NoiseTex;
-uniform sampler2D SampleTex;
-uniform sampler1D ColorsTex;
-
-varying vec4 constantColor;
-
-uniform float snowlevel; // From /sim/rendering/snow-level-m
-
-const float scale = 1.0;
-
-#define BLA 1
-#define BLA2 0
-
-////fog "include" /////
-uniform int fogType;
-
-vec3 fog_Func(vec3 color, int type);
-//////////////////////
-
-float getShadowing();
-vec3 getClusteredLightsContribution(vec3 p, vec3 n, vec3 texel);
-
-void main (void)
-{
-
- vec4 basecolor = texture2D(SampleTex, rawpos.xy*0.000144);
- basecolor = texture1D(ColorsTex, basecolor.r+0.00);
-
- vec4 noisevec = texture3D(NoiseTex, (rawpos.xyz)*0.01*scale);
-
- vec4 nvL = texture3D(NoiseTex, (rawpos.xyz)*0.00066*scale);
- vec4 km = floor((rawpos)/1000.0);
-
- float fogFactor;
- float fogCoord = ecPosition.z;
- const float LOG2 = 1.442695;
- fogFactor = exp2(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord * LOG2);
-// float biasFactor = exp2(-0.00000002 * fogCoord * fogCoord * LOG2);
- float biasFactor = fogFactor = clamp(fogFactor, 0.0, 1.0);
-
- float n=0.06;
- n += nvL[0]*0.4;
- n += nvL[1]*0.6;
- n += nvL[2]*2.0;
- n += nvL[3]*4.0;
- n += noisevec[0]*0.1;
- n += noisevec[1]*0.4;
-
- n += noisevec[2]*0.8;
- n += noisevec[3]*2.1;
- n = mix(0.6, n, biasFactor);
-
- // good
- vec4 c1;
- c1 = basecolor * vec4(smoothstep(0.0, 1.15, n), smoothstep(0.0, 1.2, n), smoothstep(0.1, 1.3, n), 1.0);
-
- //"steep = gray"
- c1 = mix(vec4(n-0.42, n-0.44, n-0.51, 1.0), c1, smoothstep(0.970, 0.990, abs(normalize(Normal).z)+nvL[2]*1.3));
-
- //"snow"
- c1 = mix(c1, clamp(n+nvL[2]*4.1+vec4(0.1, 0.1, nvL[2]*2.2, 1.0), 0.7, 1.0), smoothstep(snowlevel+300.0, snowlevel+360.0, (rawpos.z)+nvL[1]*3000.0));
-
- vec3 diffuse = gl_Color.rgb * max(0.0, dot(VNormal, gl_LightSource[0].position.xyz)) * getShadowing();
- vec4 ambient_light = constantColor + gl_LightSource[0].diffuse * vec4(diffuse, 1.0);
-
- c1 *= ambient_light;
- vec4 finalColor = c1;
- finalColor.rgb += getClusteredLightsContribution(ecPosition.xyz, VNormal, basecolor.rgb);
-
-// if(gl_Fog.density == 1.0)
-// fogFactor=1.0;
-//
-// gl_FragColor = mix(gl_Fog.color ,finalColor, fogFactor);
- finalColor.rgb = fog_Func(finalColor.rgb, fogType);
- gl_FragColor = finalColor;
-}
diff --git a/Shaders/crop.vert b/Shaders/crop.vert
deleted file mode 100644
index 669e66225..000000000
--- a/Shaders/crop.vert
+++ /dev/null
@@ -1,28 +0,0 @@
-#version 120
-
-varying vec4 rawpos;
-varying vec4 ecPosition;
-varying vec3 VNormal;
-varying vec3 Normal;
-varying vec4 constantColor;
-
-void setupShadows(vec4 eyeSpacePos);
-
-void main(void)
-{
- gl_TexCoord[0] = gl_MultiTexCoord0;
-
- rawpos = gl_Vertex;
- ecPosition = gl_ModelViewMatrix * gl_Vertex;
- VNormal = normalize(gl_NormalMatrix * gl_Normal);
- Normal = normalize(gl_Normal);
-
- gl_FrontColor = gl_Color;
-
- constantColor = gl_FrontMaterial.emission
- + gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient);
-
- gl_Position = ftransform();
-
- setupShadows(ecPosition);
-}
diff --git a/Shaders/flutter.vert b/Shaders/flutter.vert
deleted file mode 100644
index 4d93d7dad..000000000
--- a/Shaders/flutter.vert
+++ /dev/null
@@ -1,146 +0,0 @@
-// -*-C++-*-
-// © Vivian Meazza - 2011
-
-// Shader that uses OpenGL state values to do per-pixel lighting
-//
-// The only light used is gl_LightSource[0], which is assumed to be
-// directional.
-//
-// Diffuse colors come from the gl_Color, ambient from the material. This is
-// equivalent to osg::Material::DIFFUSE.
-
-#version 120
-#define fps2kts 0.5925
-
-#define MODE_OFF 0
-#define MODE_DIFFUSE 1
-#define MODE_AMBIENT_AND_DIFFUSE 2
-
-// The ambient term of the lighting equation that doesn't depend on
-// the surface normal is passed in gl_{Front,Back}Color. The alpha
-// component is set to 1 for front, 0 for back in order to work around
-// bugs with gl_FrontFacing in the fragment shader.
-varying vec4 diffuse_term;
-varying vec3 normal;
-//varying float fogCoord;
-varying vec4 ecPosition;
-
-uniform int colorMode;
-uniform float osg_SimulationTime;
-uniform float Offset, AmpFactor, WindE, WindN, spd, hdg;
-uniform sampler3D Noise;
-
-////fog "include"////////
-//uniform int fogType;
-//
-//void fog_Func(int type);
-/////////////////////////
-
-void setupShadows(vec4 eyeSpacePos);
-
-/////// functions /////////
-
-float normalize_range(float _val)
- {
- if (_val > 180.0)
- return _val - 360.0;
- else
- return _val;
- }
-
-void relWind(out float rel_wind_speed_kts, out float rel_wind_from_rad)
- {
- //calculate speed north and east in kts
- float speed_north_kts = cos(radians(hdg)) * spd ;
- float speed_east_kts = sin(radians(hdg)) * spd ;
-
- //calculate the relative wind speed north and east in kts
- float rel_wind_speed_from_east_kts = WindE*fps2kts + speed_east_kts;
- float rel_wind_speed_from_north_kts = WindN*fps2kts + speed_north_kts;
-
- //combine relative speeds north and east to get relative windspeed in kts
- rel_wind_speed_kts = sqrt(pow(abs(rel_wind_speed_from_east_kts), 2.0)
- + pow(abs(rel_wind_speed_from_north_kts), 2.0));
-
- //calculate the relative wind direction
- float rel_wind_from_deg = degrees(atan(rel_wind_speed_from_east_kts, rel_wind_speed_from_north_kts));
- //rel_wind_from_rad = atan(rel_wind_speed_from_east_kts, rel_wind_speed_from_north_kts);
- float rel_wind = rel_wind_from_deg - hdg;
- rel_wind = normalize_range(rel_wind);
- rel_wind_from_rad = radians(rel_wind);
- }
-
-void rotationmatrix(in float angle, out mat4 rotmat)
- {
- rotmat = mat4( cos( angle ), -sin( angle ), 0.0, 0.0,
- sin( angle ), cos( angle ), 0.0, 0.0,
- 0.0 , 0.0 , 1.0, 0.0,
- 0.0 , 0.0 , 0.0, 1.0 );
- }
-
-void main()
- {
- mat4 RotationMatrix;
-
- float relWindspd=0.0;
- float relWinddir=0.0;
-
- // compute relative wind speed and direction
- relWind (relWindspd, relWinddir);
-
- // map noise vector
- vec4 noisevec = texture3D(Noise, gl_Vertex.xyz);
-
- //waving effect
- float tsec = osg_SimulationTime;
- vec4 pos = gl_Vertex;
- vec4 oldpos = gl_Vertex;
-
- float freq = (10.0 * relWindspd) + 10.0;
- pos.y = sin((pos.x * 5.0 + tsec * freq )/5.0) * 0.5 ;
- pos.y += sin((pos.z * 5.0 + tsec * freq/2.0)/5.0) * 0.125 ;
-
- pos.y *= pow(pos.x - Offset, 2.0) * AmpFactor;
-
- //rotate the flag to align with relative wind
- rotationmatrix(-relWinddir, RotationMatrix);
- pos *= RotationMatrix;
- gl_Position = gl_ModelViewProjectionMatrix * pos;
-
- //do the colour and fog
- ecPosition = gl_ModelViewMatrix * gl_Vertex;
-
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- normal = gl_NormalMatrix * gl_Normal;
- vec4 ambient_color, diffuse_color;
-
- if (colorMode == MODE_DIFFUSE) {
- diffuse_color = gl_Color;
- ambient_color = gl_FrontMaterial.ambient;
- } else if (colorMode == MODE_AMBIENT_AND_DIFFUSE) {
- diffuse_color = gl_Color;
- ambient_color = gl_Color;
- } else {
- diffuse_color = gl_FrontMaterial.diffuse;
- ambient_color = gl_FrontMaterial.ambient;
- }
-
- diffuse_term = diffuse_color * gl_LightSource[0].diffuse;
- vec4 ambient_term = ambient_color * gl_LightSource[0].ambient;
-
- // Super hack: if diffuse material alpha is less than 1, assume a
- // transparency animation is at work
- if (gl_FrontMaterial.diffuse.a < 1.0)
- diffuse_term.a = gl_FrontMaterial.diffuse.a;
- else
- diffuse_term.a = gl_Color.a;
-
- // Another hack for supporting two-sided lighting without using
- // gl_FrontFacing in the fragment shader.
- gl_FrontColor.rgb = ambient_term.rgb; gl_FrontColor.a = 0.0;
- gl_BackColor.rgb = ambient_term.rgb; gl_FrontColor.a = 1.0;
-// fogCoord = abs(ecPosition.z / ecPosition.w);
-
- //fog_Func(fogType);
- setupShadows(ecPosition);
- }
diff --git a/Shaders/forest.frag b/Shaders/forest.frag
deleted file mode 100644
index dfd8609b5..000000000
--- a/Shaders/forest.frag
+++ /dev/null
@@ -1,197 +0,0 @@
-#version 120
-
-varying vec4 rawpos;
-varying vec4 ecPosition;
-varying vec3 VTangent;
-varying vec3 VBinormal;
-varying vec3 VNormal;
-varying vec3 Normal;
-
-uniform sampler3D NoiseTex;
-uniform sampler2D SampleTex;
-uniform sampler1D ColorsTex;
-uniform sampler2D SampleTex2;
-uniform sampler2D NormalTex;
-uniform float depth_factor;
-
-uniform float red, green, blue, alpha;
-
-uniform float quality_level; // From /sim/rendering/quality-level
-uniform float snowlevel; // From /sim/rendering/snow-level-m
-
-const float scale = 1.0;
-int linear_search_steps = 10;
-
-////fog "include" /////
-uniform int fogType;
-
-vec3 fog_Func(vec3 color, int type);
-//////////////////////
-
-float getShadowing();
-vec3 getClusteredLightsContribution(vec3 p, vec3 n, vec3 texel);
-
-float ray_intersect(sampler2D reliefMap, vec2 dp, vec2 ds)
-{
-
- float size = 1.0 / float(linear_search_steps);
- float depth = 0.0;
- float best_depth = 1.0;
-
- for(int i = 0; i < linear_search_steps - 1; ++i)
- {
- depth += size;
- float t = texture2D(reliefMap, dp + ds * depth).a;
- if(best_depth > 0.996)
- if(depth >= t)
- best_depth = depth;
- }
- depth = best_depth;
-
- const int binary_search_steps = 5;
-
- for(int i = 0; i < binary_search_steps; ++i)
- {
- size *= 0.5;
- float t = texture2D(reliefMap, dp + ds * depth).a;
- if(depth >= t)
- {
- best_depth = depth;
- depth -= 2.0 * size;
- }
- depth += size;
- }
-
- return(best_depth);
-}
-
-
-void main (void)
-{
- float bump = 1.0;
-
- if ( quality_level >= 3.5 ) {
- linear_search_steps = 20;
- }
- vec2 uv, dp, ds;
- vec3 N;
- float d;
- if ( bump > 0.9 && quality_level >= 2.0 )
- {
- vec3 V = normalize(ecPosition.xyz);
- float a = dot(VNormal, -V);
- vec2 s = vec2(dot(V, VTangent), dot(V, VBinormal));
- s *= depth_factor / a;
- ds = s;
- dp = gl_TexCoord[0].st;
- d = ray_intersect(NormalTex, dp, ds);
-
- uv = dp + ds * d;
- N = texture2D(NormalTex, uv).xyz * 2.0 - 1.0;
- }
- else
- {
- uv = gl_TexCoord[0].st;
- N = vec3(0.0, 0.0, 1.0);
- }
-
-
- vec4 basecolor = texture2D(SampleTex, rawpos.xy*0.000344);
- vec4 basecolor2 = texture2D(SampleTex2, rawpos.xy*0.000144);
-
- basecolor = texture1D(ColorsTex, basecolor.r+0.0);
-
- vec4 noisevec = texture3D(NoiseTex, (rawpos.xyz)*0.01*scale);
-
- vec4 nvL = texture3D(NoiseTex, (rawpos.xyz)*0.00066*scale);
-
- float vegetationlevel = (rawpos.z)+nvL[2]*3000.0;
-
- const float LOG2 = 1.442695;
- float fogCoord = abs(ecPosition.z / ecPosition.w);
- float fogFactor = exp(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord);
- float biasFactor = exp2(-0.00000002 * fogCoord * fogCoord * LOG2);
-
- float n = 0.06;
- n += nvL[0]*0.4;
- n += nvL[1]*0.6;
- n += nvL[2]*2.0;
- n += nvL[3]*4.0;
- n += noisevec[0]*0.1;
- n += noisevec[1]*0.4;
-
- n += noisevec[2]*0.8;
- n += noisevec[3]*2.1;
-
- //very low n/biasFactor mix, to keep forest color
- n = mix(0.05, n, biasFactor);
-
- vec4 c1;
- c1 = basecolor * vec4(smoothstep(-1.3, 0.5, n), smoothstep(-1.3, 0.5, n), smoothstep(-2.0, 0.9, n), 0.0);
-
- vec4 c2;
- c2 = basecolor2 * vec4(smoothstep(-1.3, 0.5, n), smoothstep(-1.3, 0.5, n), smoothstep(-2.0, 0.9, n), 0.0);
-
- N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal);
- vec3 l = gl_LightSource[0].position.xyz;
- vec3 diffuse;
-
- //draw floor where !steep, and another blurb for smoothing transitions
- vec4 c3, c4, c5, c3a, c4a, c5a;
- float subred = 1.0 - red; float subgreen = 1.0 - green; float subblue = 1.0 - blue;
- c3 = mix(vec4(n-subred, n-subgreen, -n-subblue, 0.0), c1, smoothstep(0.990, 0.970, abs(normalize(Normal).z)+nvL[2]*1.3));
- c4 = mix(vec4(n-subred, n-subgreen-0.6, -n-subblue, 0.0), c1, smoothstep(0.990, 0.890, abs(normalize(Normal).z)+nvL[2]*0.9));
- c4a = mix(vec4(n-subred+0.12, n-subgreen-0.52, -n-subblue, 0.3), c1, smoothstep(0.990, 0.970, abs(normalize(Normal).z)+nvL[2]*1.32));
- c5 = mix(c3, c4, 1.0);
- c5a = mix(c3, c4a, 1.0);
-
-
- if (vegetationlevel <= 2200.0) {
- c1 = mix(c2, c5, clamp(0.65, n*0.1, 0.5));
- diffuse = gl_Color.rgb * max(0.7, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz));
- }
-
- if (vegetationlevel > 2200.0 && vegetationlevel < 2300.0) {
- c1 = mix(c2, c5, clamp(0.65, n*0.5, 0.35));
- diffuse = gl_Color.rgb * max(0.7, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz));
- }
-
- if (vegetationlevel >= 2300.0 && vegetationlevel < 2480.0) {
- c1 = mix(c2, c5a, clamp(0.65, n*0.5, 0.30));
- diffuse = gl_Color.rgb * max(0.85, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz));
- }
-
- if (vegetationlevel >= 2480.0 && vegetationlevel < 2530.0) {
- c1 = mix(c2, c5a, clamp(0.65, n*0.5, 0.20));
- diffuse = gl_Color.rgb * max(0.85, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz));
- }
-
- if (vegetationlevel >= 2530.0 && vegetationlevel < 2670.0) {
- c1 = mix(c2, c5, clamp(0.65, n*0.5, 0.10));
- diffuse = gl_Color.rgb * max(0.85, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz));
- }
-
- if (vegetationlevel >= 2670.0) {
- c1 = mix(c2, c5, clamp(0.0, n*0.1, 0.4));
- diffuse = gl_Color.rgb * max(0.85, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz));
- }
-
-
- //adding snow and permanent snow/glacier
- if (vegetationlevel > snowlevel) {
- c3 = mix(vec4(n+1.0, n+1.0, n+1.0, 0.0), c1, smoothstep(0.990, 0.965, abs(normalize(Normal).z)+nvL[2]*1.3));
- c4 = mix(vec4(n+1.0, n+1.0, n+1.0, 0.0), c1, smoothstep(0.990, 0.965, abs(normalize(Normal).z)+nvL[2]*0.9));
- c5 = mix(c3, c4, 1.0);
- c1 = mix(c1, c5, clamp(0.65, n*0.5, 0.6));
- diffuse = gl_Color.rgb * max(0.8, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz));
- }
-
- vec4 ambient_light = gl_LightSource[0].diffuse * vec4(diffuse, 0.0) * getShadowing();
-
- c1 *= ambient_light;
- vec4 finalColor = c1;
- finalColor.rgb += getClusteredLightsContribution(ecPosition.xyz, VNormal, basecolor.rgb);
-
- finalColor.rgb = fog_Func(finalColor.rgb, fogType);
- gl_FragColor = finalColor;
-}
diff --git a/Shaders/forest.vert b/Shaders/forest.vert
deleted file mode 100644
index 3b566c1b7..000000000
--- a/Shaders/forest.vert
+++ /dev/null
@@ -1,37 +0,0 @@
-#version 120
-varying vec4 rawpos;
-varying vec4 ecPosition;
-varying vec3 VNormal;
-varying vec3 VTangent;
-varying vec3 VBinormal;
-varying vec3 Normal;
-varying vec4 constantColor;
-
-attribute vec3 tangent;
-attribute vec3 binormal;
-
-// ////fog "include"////////
-// uniform int fogType;
-//
-// void fog_Func(int type);
-// /////////////////////////
-
-void setupShadows(vec4 eyeSpacePos);
-
-void main(void)
-{
- rawpos = gl_Vertex;
- ecPosition = gl_ModelViewMatrix * rawpos;
- Normal = normalize(gl_Normal);
- VNormal = gl_NormalMatrix * gl_Normal;
- VTangent = gl_NormalMatrix * tangent;
- VBinormal = gl_NormalMatrix * binormal;
-
- gl_FrontColor = gl_Color;
- constantColor = gl_FrontMaterial.emission
- + gl_FrontColor * (gl_LightModel.ambient + gl_LightSource[0].ambient);
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
-// fog_Func(fogType);
- setupShadows(ecPosition);
-}
diff --git a/Shaders/landmass-g.vert b/Shaders/landmass-g.vert
deleted file mode 100644
index 199134a37..000000000
--- a/Shaders/landmass-g.vert
+++ /dev/null
@@ -1,59 +0,0 @@
-#version 120
-
-// "landmass" effect with forest construction using a geometry
-// shader. The landmass effect includes a bumpmap effect as well as
-// variation by altitude.
-//
-// The fragment shader needs position and normals in model and eye
-// coordinates. This vertex shader calculates the positions and
-// normals of the forest polygons so the geometry shader can do as
-// little as possible.
-
-// Input for the geometry shader. "raw" means terrain model
-// coordinates; that's a tile-local coordinate system, with z as local
-// up. "ec" means eye coordinates.
-
-// model position of original terrain poly; the bottom of the forest.
-varying vec4 rawposIn;
-// model normal
-varying vec3 NormalIn;
-varying vec4 ecPosIn;
-varying vec3 ecNormalIn;
-// eye spacce tangent and binormal
-varying vec3 VTangentIn;
-varying vec3 VBinormalIn;
-// screen-space position of top
-// constant color component
-varying vec4 constantColorIn;
-
-attribute vec3 tangent;
-attribute vec3 binormal;
-
-uniform float canopy_height;
-
-////fog "include"////////
-// uniform int fogType;
-//
-// void fog_Func(int type);
-/////////////////////////
-
-void main(void)
- {
- rawposIn = gl_Vertex;
- ecPosIn = gl_ModelViewMatrix * gl_Vertex;
- NormalIn = normalize(gl_Normal);
- //rawTopIn = rawposIn + vec4(0.0, 0.0, canopy_height, 0.0);
- //ecTopIn = gl_ModelViewMatrix * rawTopIn;
- ecNormalIn = gl_NormalMatrix * NormalIn;
- VTangentIn = gl_NormalMatrix * tangent;
- VBinormalIn = gl_NormalMatrix * binormal;
-
- gl_FrontColor = gl_Color;
- gl_Position = ftransform();
- //positionTopIn = gl_ModelViewProjectionMatrix * rawTopIn;
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- constantColorIn = gl_FrontMaterial.emission
- + gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient);
-
-// fog_Func(fogType);
- }
diff --git a/Shaders/landmass.frag b/Shaders/landmass.frag
deleted file mode 100644
index 6f0c35ef7..000000000
--- a/Shaders/landmass.frag
+++ /dev/null
@@ -1,152 +0,0 @@
-#version 120
-
-varying vec4 rawpos;
-varying vec4 ecPosition;
-varying vec3 VNormal;
-varying vec3 VTangent;
-varying vec3 VBinormal;
-varying vec3 Normal;
-varying vec4 constantColor;
-
-uniform sampler3D NoiseTex;
-uniform sampler2D BaseTex;
-uniform sampler2D NormalTex;
-uniform float depth_factor;
-uniform float quality_level; // From /sim/rendering/quality-level
-uniform float snowlevel; // From /sim/rendering/snow-level-m
-
-const float scale = 1.0;
-int linear_search_steps = 10;
-
-////fog "include" /////
-uniform int fogType;
-
-vec3 fog_Func(vec3 color, int type);
-//////////////////////
-
-float ray_intersect(sampler2D reliefMap, vec2 dp, vec2 ds)
- {
-
- float size = 1.0 / float(linear_search_steps);
- float depth = 0.0;
- float best_depth = 1.0;
-
- for(int i = 0; i < linear_search_steps - 1; ++i)
- {
- depth += size;
- float t = texture2D(reliefMap, dp + ds * depth).a;
- if(best_depth > 0.996)
- if(depth >= t)
- best_depth = depth;
- }
- depth = best_depth;
-
- const int binary_search_steps = 5;
-
- for(int i = 0; i < binary_search_steps; ++i)
- {
- size *= 0.5;
- float t = texture2D(reliefMap, dp + ds * depth).a;
- if(depth >= t)
- {
- best_depth = depth;
- depth -= 2.0 * size;
- }
- depth += size;
- }
-
- return(best_depth);
- }
-
-void main (void)
- {
- float bump = 1.0;
-
- if ( quality_level >= 3.0 ) {
- linear_search_steps = 20;
- }
-
- vec2 uv, dp = vec2(0, 0), ds = vec2(0, 0);
- vec3 N;
- float d = 0;
- if ( bump > 0.9 && quality_level > 2.0 && quality_level <= 4.0)
- {
- vec3 V = normalize(ecPosition.xyz);
- float a = dot(VNormal, -V);
- vec2 s = vec2(dot(V, VTangent), dot(V, VBinormal));
-
- // prevent a divide by zero
- if (a > -1e-3 && a < 1e-3) a = 1e-3;
- s *= depth_factor / a;
- ds = s;
- dp = gl_TexCoord[0].st;
- d = ray_intersect(NormalTex, dp, ds);
-
- uv = dp + ds * d;
- N = texture2D(NormalTex, uv).xyz * 2.0 - 1.0;
- }
- else
- {
- uv = gl_TexCoord[0].st;
- N = vec3(0.0, 0.0, 1.0);
- }
-
- vec4 noisevec = texture3D(NoiseTex, (rawpos.xyz)*0.01*scale);
- vec4 nvL = texture3D(NoiseTex, (rawpos.xyz)*0.00066*scale);
-
- float fogFactor;
- float fogCoord = ecPosition.z;
- const float LOG2 = 1.442695;
- fogFactor = exp2(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord * LOG2);
- float biasFactor = fogFactor = clamp(fogFactor, 0.0, 1.0);
-
- float n=0.06;
- n += nvL[0]*0.4;
- n += nvL[1]*0.6;
- n += nvL[2]*2.0;
- n += nvL[3]*4.0;
- n += noisevec[0]*0.1;
- n += noisevec[1]*0.4;
-
- n += noisevec[2]*0.8;
- n += noisevec[3]*2.1;
- n = mix(0.6, n, biasFactor);
- // good
- vec4 c1 = texture2D(BaseTex, uv);
- //brown
- //c1 = mix(c1, vec4(n-0.46, n-0.45, n-0.53, 1.0), smoothstep(0.50, 0.55, nvL[2]*6.6));
- //"steep = gray"
- c1 = mix(vec4(n-0.30, n-0.29, n-0.37, 1.0), c1, smoothstep(0.970, 0.990, abs(normalize(Normal).z)+nvL[2]*1.3));
- //"snow"
- c1 = mix(c1, clamp(n+nvL[2]*4.1+vec4(0.1, 0.1, nvL[2]*2.2, 1.0), 0.7, 1.0), smoothstep(snowlevel+300.0, snowlevel+360.0, (rawpos.z)+nvL[1]*3000.0));
-
- N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal);
- vec3 l = gl_LightSource[0].position.xyz;
- vec3 diffuse = gl_Color.rgb * max(0.0, dot(N, l));
- float shadow_factor = 1.0;
-
- // Shadow
- if ( quality_level >= 3.0 ) {
- dp += ds * d;
- vec3 sl = normalize( vec3( dot( l, VTangent ), dot( l, VBinormal ), dot( -l, VNormal ) ) );
- ds = sl.xy * depth_factor / sl.z;
- dp -= ds * d;
- float dl = ray_intersect(NormalTex, dp, ds);
- if ( dl < d - 0.05 )
- shadow_factor = dot( constantColor.xyz, vec3( 1.0, 1.0, 1.0 ) ) * 0.25;
- }
- // end shadow
-
- vec4 ambient_light = constantColor + gl_LightSource[0].diffuse * shadow_factor * vec4(diffuse, 1.0);
-
- c1 *= ambient_light;
- vec4 finalColor = c1;
-
- //if(gl_Fog.density == 1.0)
- // fogFactor=1.0;
-
-// gl_FragColor = mix(gl_Fog.color ,finalColor, fogFactor);
- finalColor.rgb = fog_Func(finalColor.rgb, fogType);
- gl_FragColor = finalColor;
-
- }
diff --git a/Shaders/landmass.geom b/Shaders/landmass.geom
deleted file mode 100644
index 673496592..000000000
--- a/Shaders/landmass.geom
+++ /dev/null
@@ -1,124 +0,0 @@
-#version 120
-#extension GL_EXT_geometry_shader4 : enable
-
-// Geometry shader that creates a prism from a terrain triangle,
-// resulting in a forest effect.
-//
-// A geometry shader should do as little computation as possible.
-
-// See landmass-g.vert for a description of the inputs.
-varying in vec4 rawposIn[3];
-varying in vec3 NormalIn[3];
-varying in vec4 ecPosIn[3];
-varying in vec3 ecNormalIn[3];
-varying in vec3 VTangentIn[3];
-varying in vec3 VBinormalIn[3];
-varying in vec4 constantColorIn[3];
-
-uniform float canopy_height;
-
-// model position
-varying out vec4 rawpos;
-// eye position
-varying out vec4 ecPosition;
-// eye space surface matrix
-varying out vec3 VNormal;
-varying out vec3 VTangent;
-varying out vec3 VBinormal;
-// model normal
-varying out vec3 Normal;
-varying out vec4 constantColor;
-varying out float bump;
-
-// Emit one vertex of the forest geometry.
-// parameters:
-// i - index into original terrain triangle
-void doVertex(in int i, in vec4 pos, in vec4 ecpos, in vec4 screenpos,
- in vec3 rawNormal, in vec3 normal, in float s)
-{
- rawpos = pos;
- ecPosition = ecpos;
- Normal = rawNormal;
- VNormal = normal;
- VTangent = VTangentIn[i];
- VBinormal = VBinormalIn[i];
- bump = s;
-
- gl_FrontColor = gl_FrontColorIn[i];
- constantColor = constantColorIn[i];
- gl_Position = screenpos;
- gl_TexCoord[0] = gl_TexCoordIn[i][0];
- EmitVertex();
-}
-
-vec3 rawSideNormal[3];
-vec3 sideNormal[3];
-
-// Emit a vertex for a forest side triangle
-void doSideVertex(in int vertIdx, in int sideIdx, vec4 pos, in vec4 ecpos,
- in vec4 screenpos)
-{
- doVertex(vertIdx, pos, ecpos, screenpos, rawSideNormal[sideIdx],
- sideNormal[sideIdx], 0.0);
-}
-
-void main(void)
-{
- vec4 rawTopDisp = vec4(0.0, 0.0, canopy_height, 0.0);
- vec4 ecTopDisp = gl_ModelViewMatrix * rawTopDisp;
- vec4 mvpTopDisp = gl_ModelViewProjectionMatrix * rawTopDisp;
- // model forest top
- vec4 rawTopIn[3];
- vec4 ecTopIn[3];
- vec4 positionTopIn[3];
- rawSideNormal[0] = normalize(cross((rawposIn[1] - rawposIn[0]).xyz,
- NormalIn[0]));
- rawSideNormal[1] = normalize(cross((rawposIn[2] - rawposIn[1]).xyz,
- NormalIn[1]));
- rawSideNormal[2] = normalize(cross((rawposIn[0] - rawposIn[2]).xyz,
- NormalIn[2]));
- for (int i = 0; i < 3; ++i) {
- sideNormal[i] = gl_NormalMatrix * rawSideNormal[i];
- rawTopIn[i] = rawposIn[i] + rawTopDisp;
- ecTopIn[i] = ecPosIn[i] + ecTopDisp;
- positionTopIn[i] = gl_PositionIn[i] + mvpTopDisp;
- }
- if (canopy_height > 0.01) {
- // Sides
- doSideVertex(0, 0, rawTopIn[0], ecTopIn[0], positionTopIn[0]);
- doSideVertex(0, 0, rawposIn[0], ecPosIn[0], gl_PositionIn[0]);
- doSideVertex(1, 0, rawTopIn[1], ecTopIn[1], positionTopIn[1]);
- doSideVertex(1, 0, rawposIn[1], ecPosIn[1], gl_PositionIn[1]);
-
- doSideVertex(2, 1, rawTopIn[2], ecTopIn[2], positionTopIn[2]);
- doSideVertex(2, 1, rawposIn[2], ecPosIn[2], gl_PositionIn[2]);
-
- doSideVertex(0, 2, rawTopIn[0], ecTopIn[0], positionTopIn[0]);
- doSideVertex(0, 2, rawposIn[0], ecPosIn[0], gl_PositionIn[0]);
- // Degenerate triangles; avoids EndPrimitive()
- doSideVertex(0, 2, rawposIn[0], ecPosIn[0], gl_PositionIn[0]);
- doVertex(0, rawTopIn[0], ecTopIn[0], positionTopIn[0], NormalIn[0],
- ecNormalIn[0], 1.0);
- // Top
- }
- doVertex(0, rawTopIn[0], ecTopIn[0], positionTopIn[0], NormalIn[0],
- ecNormalIn[0], 1.0);
- doVertex(1, rawTopIn[1], ecTopIn[1], positionTopIn[1], NormalIn[1],
- ecNormalIn[1], 1.0);
- doVertex(2, rawTopIn[2], ecTopIn[2], positionTopIn[2], NormalIn[2],
- ecNormalIn[2], 1.0);
- // Don't render "bottom" triangle for now; it's hidden.
-#if 0
- // degenerate
- doVertex(2, rawTopIn[2], ecTopIn[2], positionTopIn[2], NormalIn[2],
- ecNormalIn[2], 1.0);
- // bottom
- doVertex(0, rawposIn[0], ecPosIn[0], gl_PositionIn[0], NormalIn[0],
- ecNormalIn[0], 1.0);
- doVertex(1, rawposIn[1], ecPosIn[1], gl_PositionIn[1], NormalIn[1],
- ecNormalIn[1], 1.0);
- doVertex(2, rawposIn[2], ecPosIn[2], gl_PositionIn[2], NormalIn[2],
- ecNormalIn[2], 1.0);
-#endif
- EndPrimitive();
-}
diff --git a/Shaders/landmass.vert b/Shaders/landmass.vert
deleted file mode 100644
index 83ea4bc7b..000000000
--- a/Shaders/landmass.vert
+++ /dev/null
@@ -1,37 +0,0 @@
-#version 120
-
-varying vec4 rawpos;
-varying vec4 ecPosition;
-varying vec3 VNormal;
-varying vec3 VTangent;
-varying vec3 VBinormal;
-varying vec3 Normal;
-varying vec4 constantColor;
-
-attribute vec3 tangent;
-attribute vec3 binormal;
-
-// ////fog "include" /////
-// uniform int fogType;
-//
-// void fog_Func(int type);
-//
-// //////////////////////
-
-void main(void)
- {
- rawpos = gl_Vertex;
- ecPosition = gl_ModelViewMatrix * rawpos;
- Normal = normalize(gl_Normal);
- VNormal = gl_NormalMatrix * gl_Normal;
- VTangent = gl_NormalMatrix * tangent;
- VBinormal = gl_NormalMatrix * binormal;
-
- gl_FrontColor = gl_Color;
- constantColor = gl_FrontMaterial.emission
- + gl_FrontColor * (gl_LightModel.ambient + gl_LightSource[0].ambient);
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
-
-// fog_Func(fogType);
- }
diff --git a/Shaders/light-cone.frag b/Shaders/light-cone.frag
deleted file mode 100644
index dcffce836..000000000
--- a/Shaders/light-cone.frag
+++ /dev/null
@@ -1,15 +0,0 @@
-#version 120
-//varying float fogCoord;
-////fog "include" /////
-uniform int fogType;
-
-vec3 fog_Func(vec3 color, int type);
-//////////////////////
-
-void main()
-{
- vec4 fragColor = gl_FrontMaterial.ambient;
-// float fogFactor = exp(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord);
-// gl_FragColor = mix(gl_Fog.color, fragColor, fogFactor);
- gl_FragColor = fragColor;
-}
diff --git a/Shaders/light-cone.vert b/Shaders/light-cone.vert
deleted file mode 100644
index e56c871c0..000000000
--- a/Shaders/light-cone.vert
+++ /dev/null
@@ -1,10 +0,0 @@
-#version 120
-// varying float fogCoord;
-
-void main()
-{
-// vec3 ecPosition = vec3(gl_ModelViewMatrix * gl_Vertex);
-
- gl_Position = ftransform();
-// fogCoord = abs(ecPosition.z);
-}
diff --git a/Shaders/lightmap.frag b/Shaders/lightmap.frag
deleted file mode 100644
index 9d72cd9da..000000000
--- a/Shaders/lightmap.frag
+++ /dev/null
@@ -1,75 +0,0 @@
-// -*-C++-*-
-#version 120
-
-// Ambient term comes in gl_Color.rgb.
-//
-// See http://wiki.flightgear.org/index.php/Howto:_Lightmap for details on
-// how to use it.
-
-varying vec4 diffuse_term;
-varying vec3 normal;
-//varying float fogCoord;
-
-uniform sampler2D texture;
-
-// lightmap options
-uniform float condition;
-uniform float lightmap_factor;
-uniform sampler2D lightmap_texture;
-
-////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, halfV;
- 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 fragColor;
- vec4 specular = vec4(0.0);
- n = normalize(normal);
- // 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) * n;
- NdotL = max(dot(n, lightDir), 0.0);
- if (NdotL > 0.0) {
- color += diffuse_term * NdotL;
- halfV = halfVector;
- NdotHV = max(dot(n, halfV), 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);
- fragColor = color * texel + specular;
-
- // The lightmap function
- if ( condition >= 1.0 ) {
- vec3 lightmapTexel = texture2D(lightmap_texture, gl_TexCoord[0].st).rgb * lightmap_factor;
- fragColor.rgb = max(fragColor.rgb, lightmapTexel * gl_FrontMaterial.diffuse.rgb * texel.rgb);
- }
-
- // fogFactor = exp(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord);
- // gl_FragColor = mix(gl_Fog.color, fragColor, fogFactor);
- fragColor.rgb = fog_Func(fragColor.rgb, fogType);
- gl_FragColor = fragColor;
-}
diff --git a/Shaders/lightmap.vert b/Shaders/lightmap.vert
deleted file mode 100644
index 2473388a7..000000000
--- a/Shaders/lightmap.vert
+++ /dev/null
@@ -1,59 +0,0 @@
-// -*-C++-*-
-#version 120
-
-// Shader that uses OpenGL state values to do per-pixel lighting
-//
-// The only light used is gl_LightSource[0], which is assumed to be
-// directional.
-//
-// Diffuse colors come from the gl_Color, ambient from the material. This is
-// equivalent to osg::Material::DIFFUSE.
-//
-// See http://wiki.flightgear.org/index.php/Howto:_Lightmap for details on
-// how to use it.
-
-#define MODE_OFF 0
-#define MODE_DIFFUSE 1
-#define MODE_AMBIENT_AND_DIFFUSE 2
-
-// The constant term of the lighting equation that doesn't depend on
-// the surface normal is passed in gl_{Front,Back}Color. The alpha
-// component is set to 1 for front, 0 for back in order to work around
-// bugs with gl_FrontFacing in the fragment shader.
-varying vec4 diffuse_term;
-varying vec3 normal;
-//varying float fogCoord;
-uniform int colorMode;
-
-void main()
-{
- vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- normal = gl_NormalMatrix * gl_Normal;
- vec4 ambient_color, diffuse_color;
- if (colorMode == MODE_DIFFUSE) {
- diffuse_color = gl_Color;
- ambient_color = gl_FrontMaterial.ambient;
- } else if (colorMode == MODE_AMBIENT_AND_DIFFUSE) {
- diffuse_color = gl_Color;
- ambient_color = gl_Color;
- } else {
- diffuse_color = gl_FrontMaterial.diffuse;
- ambient_color = gl_FrontMaterial.ambient;
- }
- diffuse_term = diffuse_color * gl_LightSource[0].diffuse;
- vec4 constant_term = gl_FrontMaterial.emission + ambient_color *
- (gl_LightModel.ambient + gl_LightSource[0].ambient);
- // Super hack: if diffuse material alpha is less than 1, assume a
- // transparency animation is at work
- if (gl_FrontMaterial.diffuse.a < 1.0)
- diffuse_term.a = gl_FrontMaterial.diffuse.a;
- else
- diffuse_term.a = gl_Color.a;
- // Another hack for supporting two-sided lighting without using
- // gl_FrontFacing in the fragment shader.
- gl_FrontColor.rgb = constant_term.rgb; gl_FrontColor.a = 1.0;
- gl_BackColor.rgb = constant_term.rgb; gl_BackColor.a = 0.0;
- //fogCoord = abs(ecPosition.z / ecPosition.w);
-}
diff --git a/Shaders/mat-anim.frag b/Shaders/mat-anim.frag
deleted file mode 100644
index 5e6b07a9c..000000000
--- a/Shaders/mat-anim.frag
+++ /dev/null
@@ -1,52 +0,0 @@
-// -*-C++-*-
-#version 120
-
-// Shader for use with material animations
-varying vec4 diffuse, constantColor, matSpecular;
-varying vec3 normal;
-//varying float fogCoord, alpha;
-varying float alpha;
-
-uniform sampler2D texture;
-
-////fog "include" /////
-uniform int fogType;
-
-vec3 fog_Func(vec3 color, int type);
-//////////////////////
-
-void main()
-{
- vec3 n, halfV;
- float NdotL, NdotHV, fogFactor;
- vec4 color = constantColor;
- vec3 lightDir = gl_LightSource[0].position.xyz;
- vec3 halfVector = gl_LightSource[0].halfVector.xyz;
- vec4 texel;
- vec4 fragColor;
- vec4 specular = vec4(0.0);
- n = normalize(normal);
- if (!gl_FrontFacing)
- n = -n;
- NdotL = max(dot(n, lightDir), 0.0);
- if (NdotL > 0.0) {
- color += diffuse * NdotL;
- halfV = normalize(halfVector);
- NdotHV = max(dot(n, halfV), 0.0);
- if (gl_FrontMaterial.shininess > 0.0)
- specular.rgb = (matSpecular.rgb
- * gl_LightSource[0].specular.rgb
- * pow(NdotHV, gl_FrontMaterial.shininess));
- }
- color.a = alpha;
- // 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);
- fragColor = color * texel + specular;
- //fogFactor = exp(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord);
- //gl_FragColor = mix(gl_Fog.color, fragColor, fogFactor);
- fragColor.rgb = fog_Func(fragColor.rgb, fogType);
- gl_FragColor = fragColor;
-}
diff --git a/Shaders/mat-anim.vert b/Shaders/mat-anim.vert
deleted file mode 100644
index 5bbe85e99..000000000
--- a/Shaders/mat-anim.vert
+++ /dev/null
@@ -1,39 +0,0 @@
-// -*-C++-*-
-#version 120
-
-// Shader that uses OpenGL state values to do per-pixel lighting
-//
-// The only light used is gl_LightSource[0], which is assumed to be
-// directional.
-//
-// Diffuse colors come from the gl_Color, ambient from the material. This is
-// equivalent to osg::Material::DIFFUSE.
-vec4 ambientColor();
-vec4 diffuseColor();
-vec4 specularColor();
-vec4 emissionColor();
-
-varying vec4 diffuse, constantColor, matSpecular;
-varying vec3 normal;
-//varying float alpha, fogCoord;
-varying float alpha;
-
-void main()
-{
- //vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
- //vec3 ecPosition3 = vec3(gl_ModelViewMatrix * gl_Vertex) / ecPosition.w;
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- normal = gl_NormalMatrix * gl_Normal;
- diffuse = diffuseColor() * gl_LightSource[0].diffuse;
- // Super hack: if diffuse material alpha is less than 1, assume a
- // transparency animation is at work
- if (gl_FrontMaterial.diffuse.a < 1.0)
- alpha = gl_FrontMaterial.diffuse.a;
- else
- alpha = diffuse.a;
- constantColor = emissionColor()
- + ambientColor() * (gl_LightModel.ambient + gl_LightSource[0].ambient);
- //fogCoord = abs(ecPosition3.z);
- matSpecular = specularColor();
-}
diff --git a/Shaders/mode-diffuse.vert b/Shaders/mode-diffuse.vert
deleted file mode 100644
index ed975a107..000000000
--- a/Shaders/mode-diffuse.vert
+++ /dev/null
@@ -1,22 +0,0 @@
-// -*-C++-*-
-#version 120
-
-vec4 ambientColor()
-{
- return gl_FrontMaterial.ambient;
-}
-
-vec4 diffuseColor()
-{
- return gl_Color;
-}
-
-vec4 specularColor()
-{
- return gl_FrontMaterial.specular;
-}
-
-vec4 emissionColor()
-{
- return gl_FrontMaterial.emission;
-}
diff --git a/Shaders/mode-off.vert b/Shaders/mode-off.vert
deleted file mode 100644
index 82f99de09..000000000
--- a/Shaders/mode-off.vert
+++ /dev/null
@@ -1,22 +0,0 @@
-// -*-C++-*-
-#version 120
-
-vec4 ambientColor()
-{
- return gl_FrontMaterial.ambient;
-}
-
-vec4 diffuseColor()
-{
- return gl_FrontMaterial.diffuse;
-}
-
-vec4 specularColor()
-{
- return gl_FrontMaterial.specular;
-}
-
-vec4 emissionColor()
-{
- return gl_FrontMaterial.emission;
-}
diff --git a/Shaders/model-default.frag b/Shaders/model-default.frag
deleted file mode 100644
index 1fd3e7669..000000000
--- a/Shaders/model-default.frag
+++ /dev/null
@@ -1,57 +0,0 @@
-// -*-C++-*-
-#version 120
-
-// Ambient term comes in gl_Color.rgb.
-varying vec4 diffuse_term;
-varying vec3 normal;
-//varying float fogCoord;
-
-uniform sampler2D texture;
-
-////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, halfV;
- float NdotL, NdotHV, fogFactor;
- vec4 color = gl_FrontLightModelProduct.sceneColor + gl_Color;
- vec3 lightDir = gl_LightSource[0].position.xyz;
- vec3 halfVector = gl_LightSource[0].halfVector.xyz;
- vec4 texel;
- 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;
- halfV = normalize(halfVector);
- NdotHV = max(dot(n, halfV), 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);
- fragColor = color * texel + specular;
- //fogFactor = exp(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord);
- //gl_FragColor = mix(gl_Fog.color, fragColor, fogFactor);
- fragColor.rgb = fog_Func(fragColor.rgb, fogType);
- gl_FragColor = fragColor;
-}
diff --git a/Shaders/model-default.vert b/Shaders/model-default.vert
deleted file mode 100644
index 591b7e507..000000000
--- a/Shaders/model-default.vert
+++ /dev/null
@@ -1,56 +0,0 @@
-// -*-C++-*-
-
-// Shader that uses OpenGL state values to do per-pixel lighting
-//
-// The only light used is gl_LightSource[0], which is assumed to be
-// directional.
-//
-// Diffuse colors come from the gl_Color, ambient from the material. This is
-// equivalent to osg::Material::DIFFUSE.
-#version 120
-
-#define MODE_OFF 0
-#define MODE_DIFFUSE 1
-#define MODE_AMBIENT_AND_DIFFUSE 2
-
-// The ambient term of the lighting equation that doesn't depend on
-// the surface normal is passed in gl_{Front,Back}Color. The alpha
-// component is set to 1 for front, 0 for back in order to work around
-// bugs with gl_FrontFacing in the fragment shader.
-varying vec4 diffuse_term;
-varying vec3 normal;
-//varying float fogCoord;
-
-uniform int colorMode;
-
-void main()
-{
- //vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- normal = gl_NormalMatrix * gl_Normal;
- vec4 ambient_color, diffuse_color;
- if (colorMode == MODE_DIFFUSE) {
- diffuse_color = gl_Color;
- ambient_color = gl_FrontMaterial.ambient;
- } else if (colorMode == MODE_AMBIENT_AND_DIFFUSE) {
- diffuse_color = gl_Color;
- ambient_color = gl_Color;
- } else {
- diffuse_color = gl_FrontMaterial.diffuse;
- ambient_color = gl_FrontMaterial.ambient;
- }
- diffuse_term = diffuse_color * gl_LightSource[0].diffuse;
- vec4 ambient_term = ambient_color * gl_LightSource[0].ambient;
- // Super hack: if diffuse material alpha is less than 1, assume a
- // transparency animation is at work
- if (gl_FrontMaterial.diffuse.a < 1.0)
- diffuse_term.a = gl_FrontMaterial.diffuse.a;
- else
- diffuse_term.a = gl_Color.a;
- // Another hack for supporting two-sided lighting without using
- // gl_FrontFacing in the fragment shader.
- gl_FrontColor.rgb = ambient_term.rgb; gl_FrontColor.a = 1.0;
- gl_BackColor.rgb = ambient_term.rgb; gl_FrontColor.a = 0.0;
- //fogCoord = abs(ecPosition.z / ecPosition.w);
-}
diff --git a/Shaders/reflect-bump-spec.frag b/Shaders/reflect-bump-spec.frag
deleted file mode 100644
index 5245f36ff..000000000
--- a/Shaders/reflect-bump-spec.frag
+++ /dev/null
@@ -1,141 +0,0 @@
-// -*- mode: C; -*-
-// Licence: GPL v2
-// Author: Vivian Meazza.
-
-#version 120
-
-varying vec3 rawpos;
-varying vec3 VNormal;
-varying vec3 VTangent;
-varying vec3 VBinormal;
-varying vec3 Normal;
-varying vec3 vViewVec;
-varying vec3 reflVec;
-
-varying vec4 Diffuse;
-varying float alpha;
-//varying float fogCoord;
-
-uniform samplerCube Environment;
-uniform sampler2D Rainbow;
-uniform sampler2D BaseTex;
-uniform sampler2D Fresnel;
-uniform sampler2D Map;
-uniform sampler2D NormalTex;
-uniform sampler3D Noise;
-
-uniform float refl_correction;
-uniform float rainbowiness;
-uniform float fresneliness;
-uniform float noisiness;
-uniform float ambient_correction;
-uniform float reflect_map;
-uniform float normalmap_dds;
-
-////fog "include" /////
-uniform int fogType;
-
-vec3 fog_Func(vec3 color, int type);
-//////////////////////
-
-void main (void)
-{
- vec3 halfV;
- float NdotL, NdotHV;
-
- vec3 lightDir = gl_LightSource[0].position.xyz;
- vec3 halfVector = gl_LightSource[0].halfVector.xyz;
-
-
- vec4 color = gl_Color;
- vec4 specular = vec4(0.0);
- vec4 ns = texture2D(NormalTex, gl_TexCoord[0].st);
- vec3 n = ns.rgb * 2.0 - 1.0;
- n = normalize(n.x * VTangent + n.y * VBinormal + n.z * VNormal);
-
- //fix dds normal
- if (normalmap_dds > 0.0) {
- n = -n;
- }
-
- NdotL = max(0.0, dot(n, lightDir));
-
- // calculate the specular light
- if (NdotL > 0.0) {
- color += Diffuse * NdotL;
- halfV = normalize(halfVector);
- NdotHV = max(dot(n, halfV), 0.0);
- if (gl_FrontMaterial.shininess > 0.0)
- specular.rgb = (gl_FrontMaterial.specular.rgb * ns.a
- * gl_LightSource[0].specular.rgb
- * pow(NdotHV, gl_FrontMaterial.shininess));
- }
-
- //color.a = alpha;
- vec4 texel = texture2D(BaseTex, gl_TexCoord[0].st);
- //vec4 texelcolor = color * texel + specular;
- color.a = texel.a * alpha;
- color = clamp(color, 0.0, 1.0);
-
- // calculate the fog factor
-// const float LOG2 = 1.442695;
-// float fogFactor = exp2(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord * LOG2);
-// fogFactor = clamp(fogFactor, 0.0, 1.0);
-//
-// if(gl_Fog.density == 1.0)
-// fogFactor=1.0;
-
- vec3 normal = normalize(VNormal);
- vec3 viewVec = normalize(vViewVec);
-
- // Map a rainbowish color
- float v = dot(viewVec, normal);
- vec4 rainbow = texture2D(Rainbow, vec2(v, 0.0));
-
- // Map a fresnel effect
- vec4 fresnel = texture2D(Fresnel, vec2(v, 0.0));
-
- // map the refection of the environment
- vec4 reflection = textureCube(Environment, reflVec);
-
- // set the user shininess offse
- float transparency_offset = clamp(refl_correction, -1.0, 1.0);
- float reflFactor = 0.0;
-
- if(reflect_map > 0.0){
- // map the shininess of the object with user input
- vec4 map = texture2D(Map, gl_TexCoord[0].st);
- //float pam = (map.a * -2) + 1; //reverse map
- reflFactor = map.a + transparency_offset;
- } else {
- // set the reflectivity proportional to shininess with user input
- reflFactor = (gl_FrontMaterial.shininess / 128.0) * ns.a + transparency_offset;
- }
-
- reflFactor = clamp(reflFactor, 0.0, 1.0);
-
- // set ambient adjustment to remove bluiness with user input
- float ambient_offset = clamp(ambient_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 ;
- ambient_Correction = clamp(ambient_Correction, -1.0, 1.0);
-
- // map noise vector
- vec4 noisevec = texture3D(Noise, rawpos.xyz);
-
- // add fringing fresnel and rainbow effects and modulate by reflection
- vec4 reflcolor = mix(reflection, rainbow, rainbowiness * v);
- vec4 reflfrescolor = mix(reflcolor, fresnel, fresneliness * v);
- vec4 noisecolor = mix(reflfrescolor, noisevec, noisiness);
- vec4 raincolor = vec4(noisecolor.rgb * reflFactor, 1.0);
-
- vec4 mixedcolor = mix(texel, raincolor, reflFactor);
-
- // the final reflection
- vec4 reflColor = vec4(color.rgb * mixedcolor.rgb + specular.rgb + ambient_Correction.rgb, color.a);
-
- reflColor = clamp(reflColor, 0.0, 1.0);
-
-// gl_FragColor = mix(gl_Fog.color, reflColor, fogFactor);
- reflColor.rgb = fog_Func(reflColor.rgb, fogType);
- gl_FragColor = reflColor;
-}
\ No newline at end of file
diff --git a/Shaders/reflect-bump-spec.vert b/Shaders/reflect-bump-spec.vert
deleted file mode 100644
index 45d6f7273..000000000
--- a/Shaders/reflect-bump-spec.vert
+++ /dev/null
@@ -1,71 +0,0 @@
-// -*- mode: C; -*-
-// Licence: GPL v2
-// © Emilian Huminiuc and Vivian Meazza 2011
-#version 120
-
-varying vec3 rawpos;
-varying float fogCoord;
-varying vec3 VNormal;
-varying vec3 VTangent;
-varying vec3 VBinormal;
-varying vec3 Normal;
-varying vec3 vViewVec;
-varying vec3 reflVec;
-
-varying vec4 Diffuse;
-varying float alpha;
-
-uniform mat4 osg_ViewMatrixInverse;
-
-attribute vec3 tangent;
-attribute vec3 binormal;
-
-////fog "include"////////
-// uniform int fogType;
-//
-// void fog_Func(int type);
-/////////////////////////
-
-void main(void)
-{
- rawpos = gl_Vertex.xyz / gl_Vertex.w;
- vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
- ecPosition.xyz = ecPosition.xyz / ecPosition.w;
- //fogCoord = ecPosition.z;
- //fog_Func(fogType);
-
- vec3 n = normalize(gl_Normal);
- vec3 t = cross(gl_Normal, vec3(1.0,0.0,0.0));
- vec3 b = cross(n,t);
-
- VNormal = normalize(gl_NormalMatrix * gl_Normal);
- VTangent = normalize(gl_NormalMatrix * tangent);
- VBinormal = normalize(gl_NormalMatrix * binormal);
- Normal = normalize(gl_Normal);
-
- Diffuse = gl_Color * gl_LightSource[0].diffuse;
- //Diffuse= gl_Color.rgb * max(0.0, dot(normalize(VNormal), gl_LightSource[0].position.xyz));
-
- // Super hack: if diffuse material alpha is less than 1, assume a
- // transparency animation is at work
- if (gl_FrontMaterial.diffuse.a < 1.0)
- alpha = gl_FrontMaterial.diffuse.a;
- else
- alpha = gl_Color.a;
-
- // Vertex in eye coordinates
- vec3 vertVec = ecPosition.xyz;
-
- vViewVec.x = dot(t, vertVec);
- vViewVec.y = dot(b, vertVec);
- vViewVec.z = dot(n, vertVec);
-
- // calculate the reflection vector
- vec4 reflect_eye = vec4(reflect(vertVec, VNormal), 0.0);
- reflVec = normalize(gl_ModelViewMatrixInverse * reflect_eye).xyz;
-
- gl_FrontColor = gl_FrontMaterial.emission + gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient);
-
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
-}
diff --git a/Shaders/reflect.frag b/Shaders/reflect.frag
deleted file mode 100644
index 5cb6d5f3f..000000000
--- a/Shaders/reflect.frag
+++ /dev/null
@@ -1,139 +0,0 @@
-// -*- mode: C; -*-
-// Licence: GPL v2
-// Author: Vivian Meazza.
-// additions by Emilian Huminuc
-
-#version 120
-
-varying vec3 rawpos;
-varying vec3 VNormal;
-varying vec4 constantColor;
-varying vec3 vViewVec;
-varying vec3 reflVec;
-
-varying vec4 Diffuse;
-varying float alpha;
-//varying float fogCoord;
-
-uniform samplerCube Environment;
-uniform sampler2D Rainbow;
-uniform sampler2D BaseTex;
-uniform sampler2D Fresnel;
-uniform sampler2D Map;
-uniform sampler3D Noise;
-uniform sampler2D Lightmap;
-
-uniform float refl_correction;
-uniform float rainbowiness;
-uniform float fresneliness;
-uniform float noisiness;
-uniform float ambient_correction;
-uniform float lightmap_factor;
-
-uniform int light_map;
-uniform int reflect_map;
-
-////fog "include" /////
-uniform int fogType;
-
-vec3 fog_Func(vec3 color, int type);
-//////////////////////
-
-void main (void)
-{
- vec3 n, halfV;
- float NdotL, NdotHV;
- vec4 color = constantColor;
- vec4 specular = vec4(0.0);
- n = normalize(VNormal);
- vec3 lightDir = gl_LightSource[0].position.xyz;
- vec3 halfVector = gl_LightSource[0].halfVector.xyz;
-
- NdotL = dot(n, lightDir);
-
- // calculate the specular light
- if (NdotL > 0.0) {
- color += Diffuse * NdotL;
- halfV = normalize(halfVector);
- NdotHV = max(dot(n, halfV), 0.0);
- if (gl_FrontMaterial.shininess > 0.0)
- specular.rgb = (gl_FrontMaterial.specular.rgb
- * gl_LightSource[0].specular.rgb
- * pow(NdotHV, gl_FrontMaterial.shininess));
- }
-
- vec4 texel = texture2D(BaseTex, gl_TexCoord[0].st);
- // vec4 texelcolor = color * texel + specular;
- color.a = texel.a * alpha;
- color = clamp(color, 0.0, 1.0);
-
- // calculate the fog factor
-// const float LOG2 = 1.442695;
-// float fogFactor = exp2(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord * LOG2);
-// fogFactor = clamp(fogFactor, 0.0, 1.0);
-//
-// if(gl_Fog.density == 1.0)
-// fogFactor=1.0;
-
- vec3 normal = normalize(VNormal);
- vec3 viewVec = normalize(vViewVec);
-
- // Map a rainbowish color
- float v = dot(viewVec, normal);
- vec4 rainbow = texture2D(Rainbow, vec2(v, 0.0));
-
- // Map a fresnel effect
- vec4 fresnel = texture2D(Fresnel, vec2(v, 0.0));
-
- // map the refection of the environment
- vec4 reflection = textureCube(Environment, reflVec);
-
- // set the user shininess offset
- float transparency_offset = clamp(refl_correction, -1.0, 1.0);
- float reflFactor = 0.0;
-
- if(reflect_map > 0){
- // map the shininess of the object with user input
- vec4 map = texture2D(Map, gl_TexCoord[0].st);
- //float pam = (map.a * -2) + 1; //reverse map
- reflFactor = map.a + transparency_offset;
- } else {
- // set the reflectivity proportional to shininess with user
- // input
- reflFactor = (gl_FrontMaterial.shininess / 128.0) + transparency_offset;
- }
-
- reflFactor = clamp(reflFactor, 0.0, 1.0);
-
- // set ambient adjustment to remove bluiness with user input
- float ambient_offset = clamp(ambient_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(ambient_Correction.rgb, 0.5);
- ambient_Correction = clamp(ambient_Correction, -1.0, 1.0);
-
- // map noise vector
- vec4 noisevec = texture3D(Noise, rawpos.xyz);
-
- // add fringing fresnel and rainbow effects and modulate by reflection
- vec4 reflcolor = mix(reflection, rainbow, rainbowiness * v);
- vec4 reflfrescolor = mix(reflcolor, fresnel, fresneliness * v);
- vec4 noisecolor = mix(reflfrescolor, noisevec, noisiness);
- vec4 raincolor = vec4(noisecolor.rgb, 1.0) * reflFactor;
-
- vec4 mixedcolor = mix(texel, raincolor, reflFactor);
-
- // the final reflection
- vec4 reflColor = vec4(color.rgb * mixedcolor.rgb + specular.rgb + ambient_Correction.rgb, color.a);
- reflColor = clamp(reflColor, 0.0, 1.0);
-
- // add a lightmap
-
- if ( light_map >= 1 ) {
- vec3 lightmapTexel = texture2D(Lightmap, gl_TexCoord[0].st).rgb * lightmap_factor;
- reflColor.rgb = max(reflColor.rgb, lightmapTexel * gl_FrontMaterial.diffuse.rgb * mixedcolor.rgb);
- }
-
-// gl_FragColor = mix(gl_Fog.color, reflColor, fogFactor);
- reflColor.rgb = fog_Func(reflColor.rgb, fogType);
- gl_FragColor = reflColor;
-}
diff --git a/Shaders/reflect.vert b/Shaders/reflect.vert
deleted file mode 100644
index 514a790a2..000000000
--- a/Shaders/reflect.vert
+++ /dev/null
@@ -1,60 +0,0 @@
-// -*- mode: C; -*-
-// Licence: GPL v2
-// Author: Vivian Meazza.
-#version 120
-
-varying vec3 rawpos;
-varying vec3 VNormal;
-varying vec4 constantColor;
-varying vec3 vViewVec;
-varying vec3 reflVec;
-
-varying vec4 Diffuse;
-varying float alpha;
-//varying float fogCoord;
-
-uniform mat4 osg_ViewMatrixInverse;
-
-//attribute vec3 tangent, binormal, normal;
-
-void main(void)
-{
- rawpos = gl_Vertex.xyz / gl_Vertex.w;
- vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
- ecPosition.xyz = ecPosition.xyz / ecPosition.w;
-
- vec3 t = normalize(cross(gl_Normal, vec3(1.0,0.0,0.0)));
- vec3 b = normalize(cross(gl_Normal,t));
- vec3 n = normalize(gl_Normal);
-
- VNormal = normalize(gl_NormalMatrix * gl_Normal);
-
- Diffuse = gl_Color * gl_LightSource[0].diffuse;
- //Diffuse= gl_Color.rgb * max(0.0, dot(normalize(VNormal), gl_LightSource[0].position.xyz));
- // Super hack: if diffuse material alpha is less than 1, assume a
- // transparency animation is at work
- if (gl_FrontMaterial.diffuse.a < 1.0)
- alpha = gl_FrontMaterial.diffuse.a;
- else
- alpha = gl_Color.a;
-
- //fogCoord = abs(ecPosition.z);
-
- // Vertex in eye coordinates
- vec3 vertVec = ecPosition.xyz;
-
- vViewVec.x = dot(t, vertVec);
- vViewVec.y = dot(b, vertVec);
- vViewVec.z = dot(n, vertVec);
-
- // calculate the reflection vector
- vec4 reflect_eye = vec4(reflect(vertVec, VNormal), 0.0);
- reflVec = normalize(gl_ModelViewMatrixInverse * reflect_eye).xyz;
-
- gl_FrontColor = gl_Color;
- constantColor = gl_FrontMaterial.emission
- + gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient);
-
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
-}
diff --git a/Shaders/runway.frag b/Shaders/runway.frag
deleted file mode 100644
index b45e0ffda..000000000
--- a/Shaders/runway.frag
+++ /dev/null
@@ -1,139 +0,0 @@
-// -*- mode: C; -*-
-// Licence: GPL v2
-// © Emilian Huminiuc and Vivian Meazza 2011
-
-#version 120
-
-varying vec3 rawpos;
-varying vec3 VNormal;
-varying vec3 VTangent;
-varying vec3 VBinormal;
-varying vec3 vViewVec;
-varying vec3 reflVec;
-varying vec3 vertVec;
-
-varying vec4 Diffuse;
-varying float alpha;
-//varying float fogCoord;
-
-uniform samplerCube Environment;
-uniform sampler2D Rainbow;
-uniform sampler2D BaseTex;
-uniform sampler2D Fresnel;
-uniform sampler2D Map;
-uniform sampler2D NormalTex;
-uniform sampler3D Noise;
-
-uniform float spec_adjust;
-uniform float rainbowiness;
-uniform float fresneliness;
-uniform float noisiness;
-uniform float ambient_correction;
-uniform float normalmap_dds;
-
-//uniform int fogType;
-
-////fog "include" /////
-uniform int fogType;
-
-vec3 fog_Func(vec3 color, int type);
-//////////////////////
-
-float getShadowing();
-vec3 getClusteredLightsContribution(vec3 p, vec3 n, vec3 texel);
-
-void main (void)
-{
- //vec3 halfV;
- //float NdotL, NdotHV;
-
- vec4 texel = texture2D(BaseTex, gl_TexCoord[0].st);
- vec4 nmap = texture2D(NormalTex, gl_TexCoord[0].st * 8.0);
- vec4 map = texture2D(Map, gl_TexCoord[0].st * 8.0);
- vec4 specNoise = texture3D(Noise, rawpos.xyz * 0.0045);
- vec4 noisevec = texture3D(Noise, rawpos.xyz);
-
- vec3 lightDir = gl_LightSource[0].position.xyz;
- vec3 halfVector = gl_LightSource[0].halfVector.xyz;
- vec3 N;
- float pf;
-
- N = nmap.rgb * 2.0 - 1.0;
- N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal);
- if (normalmap_dds > 0)
- N = -N;
-
- float lightness = dot(texel.rgb, vec3( 0.3, 0.59, 0.11 ));
- // calculate the specular light
- float refl_correction = spec_adjust * 2.5 - 1.0;
- float shininess = max (0.35, refl_correction);
- 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)));
-
- if (nDotVP == 0.0)
- pf = 0.0;
- else
- pf = pow(nDotHV, /*gl_FrontMaterial.*/shininess);
-
- float shadowmap = getShadowing();
- vec4 Diffuse = gl_LightSource[0].diffuse * nDotVP * shadowmap;
- //vec4 Specular = vec4(vec3(0.5*shininess), 1.0)* gl_LightSource[0].specular * pf;
- vec4 Specular = vec4(1.0)* lightness * gl_LightSource[0].specular * pf * shadowmap;
-
- vec4 color = gl_Color + Diffuse * gl_FrontMaterial.diffuse;
- //color += Specular * vec4(vec3(0.5*shininess), 1.0) * nmap.a;
- float nFactor = 1.0 - N.z;
- color += Specular * vec4(1.0) * nmap.a * nFactor;
- color.a = texel.a * alpha;
- color = clamp(color, 0.0, 1.0);
-
- vec3 viewVec = normalize(vViewVec);
-
- // Map a rainbowish color
- float v = abs(dot(viewVec, normalize(VNormal)));
- vec4 rainbow = texture2D(Rainbow, vec2(v, 0.0));
-
- // Map a fresnel effect
- vec4 fresnel = texture2D(Fresnel, vec2(v, 0.0));
-
- // map the refection of the environment
- vec4 reflection = textureCube(Environment, reflVec * dot(N,VNormal));
-
-
- // set the user shininess offset
- float transparency_offset = clamp(refl_correction, -1.0, 1.0);
- float reflFactor = 0.0;
-
- float MixFactor = specNoise.r * specNoise.g * specNoise.b * 350.0;
-
- MixFactor = 0.75 * smoothstep(0.0, 1.0, MixFactor);
-
- reflFactor = max(map.a * (texel.r + texel.g), 1.0 - MixFactor) * (1.0- N.z) + transparency_offset ;
-
- reflFactor =0.75 * smoothstep(0.05, 1.0, reflFactor);
-
- // set ambient adjustment to remove bluiness with user input
- float ambient_offset = clamp(ambient_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 ;
- ambient_Correction = clamp(ambient_Correction, -1.0, 1.0);
-
- // add fringing fresnel and rainbow effects and modulate by reflection
- vec4 reflcolor = mix(reflection, rainbow, rainbowiness * v);
- reflcolor += Specular * nmap.a * nFactor;
- vec4 reflfrescolor = mix(reflcolor, fresnel, fresneliness * v);
- vec4 noisecolor = mix(reflfrescolor, noisevec, noisiness);
- vec4 raincolor = vec4(noisecolor.rgb * reflFactor, 1.0);
- raincolor += Specular * nmap.a * nFactor;
-
-
- vec4 mixedcolor = mix(texel, raincolor * (1.0 - refl_correction * (1.0 - lightness)), reflFactor); //* (1.0 - 0.5 * transparency_offset )
-
- // the final reflection
- vec4 fragColor = vec4(color.rgb * mixedcolor.rgb + ambient_Correction.rgb * (1.0 - refl_correction * (1.0 - 0.8 * lightness)) * nFactor, color.a);
- fragColor += Specular * nmap.a * nFactor;
-
- fragColor.rgb += getClusteredLightsContribution(vertVec, N, texel.rgb);
-
- fragColor.rgb = fog_Func(fragColor.rgb, fogType);
- gl_FragColor = fragColor;
-}
diff --git a/Shaders/runway.vert b/Shaders/runway.vert
deleted file mode 100644
index 66344e1a8..000000000
--- a/Shaders/runway.vert
+++ /dev/null
@@ -1,76 +0,0 @@
-// -*- mode: C; -*-
-// Licence: GPL v2
-// © Emilian Huminiuc and Vivian Meazza 2011
-#version 120
-
-varying vec3 rawpos;
-varying float fogCoord;
-varying vec3 VNormal;
-varying vec3 VTangent;
-varying vec3 VBinormal;
-varying vec3 Normal;
-varying vec3 vViewVec;
-varying vec3 reflVec;
-varying vec3 vertVec;
-
-varying vec4 Diffuse;
-varying float alpha;
-
-uniform mat4 osg_ViewMatrixInverse;
-
-attribute vec3 tangent;
-attribute vec3 binormal;
-
-////fog "include"////////
-// uniform int fogType;
-//
-// void fog_Func(int type);
-/////////////////////////
-
-void setupShadows(vec4 eyeSpacePos);
-
-void main(void)
-{
- rawpos = gl_Vertex.xyz / gl_Vertex.w;
- vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
- ecPosition.xyz = ecPosition.xyz / ecPosition.w;
- //fogCoord = ecPosition.z;
- //fog_Func(fogType);
-
- vec3 n = normalize(gl_Normal);
- vec3 t = cross(gl_Normal, vec3(1.0,0.0,0.0));
- vec3 b = cross(n,t);
-
- VNormal = normalize(gl_NormalMatrix * gl_Normal);
- VTangent = normalize(gl_NormalMatrix * tangent);
- VBinormal = normalize(gl_NormalMatrix * binormal);
- Normal = normalize(gl_Normal);
-
- Diffuse = gl_Color * gl_LightSource[0].diffuse;
- //Diffuse= gl_Color.rgb * max(0.0, dot(normalize(VNormal), gl_LightSource[0].position.xyz));
-
- // Super hack: if diffuse material alpha is less than 1, assume a
- // transparency animation is at work
- if (gl_FrontMaterial.diffuse.a < 1.0)
- alpha = gl_FrontMaterial.diffuse.a;
- else
- alpha = gl_Color.a;
-
- // Vertex in eye coordinates
- vertVec = ecPosition.xyz;
-
- vViewVec.x = dot(t, vertVec);
- vViewVec.y = dot(b, vertVec);
- vViewVec.z = dot(n, vertVec);
-
- // calculate the reflection vector
- vec4 reflect_eye = vec4(reflect(vertVec, VNormal), 0.0);
- reflVec = normalize(gl_ModelViewMatrixInverse * reflect_eye).xyz;
-
- gl_FrontColor = gl_FrontMaterial.emission + gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient);
-
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
-
- setupShadows(ecPosition);
-}
diff --git a/Shaders/terrain-default.frag b/Shaders/terrain-default.frag
deleted file mode 100644
index 128b9e241..000000000
--- a/Shaders/terrain-default.frag
+++ /dev/null
@@ -1,65 +0,0 @@
-// -*-C++-*-
-#version 120
-varying vec4 diffuse, constantColor;
-varying vec3 normal, lightDir, halfVector;
-//varying float fogCoord, alpha;
-varying float alpha;
-
-uniform sampler2D texture;
-
-////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, halfV;
- float NdotL, NdotHV, fogFactor;
- vec4 color = gl_FrontMaterial.emission
- + gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient);
- vec3 lightDir = gl_LightSource[0].position.xyz;
- vec3 halfVector = gl_LightSource[0].halfVector.xyz;
- vec4 texel;
- vec4 fragColor;
- vec4 specular = vec4(0.0);
-
- n = normalize(normal);
- NdotL = max(dot(n, lightDir), 0.0);
- if (NdotL > 0.0) {
- color += diffuse * NdotL;
- halfV = normalize(halfVector);
- NdotHV = max(dot(n, halfV), 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 = alpha;
-
-
- // 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);
- fragColor = color * texel + specular;
-
- // Store pixel's luminance in the alpha value
- if(alpha > 0.95) {
- float lum = 1.0 - (luminance(fragColor.rgb) * 3.0);
- float tex_lum = luminance(texel.rgb);
- fragColor.a = tex_lum * clamp(lum, 0.01, 1.0);
- }
-
-// fogFactor = exp(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord);
-// gl_FragColor = mix(gl_Fog.color, fragColor, fogFactor);
- fragColor.rgb = fog_Func(fragColor.rgb, fogType);
- gl_FragColor = fragColor;
-}
diff --git a/Shaders/test.frag b/Shaders/test.frag
deleted file mode 100644
index 8bf1aa59f..000000000
--- a/Shaders/test.frag
+++ /dev/null
@@ -1,13 +0,0 @@
-#version 120
-
-uniform sampler2D baseTexture;
-varying float fogFactor;
-
-void main(void)
-{
- vec4 base = texture2D( baseTexture, gl_TexCoord[0].st);
- vec4 finalColor = base * gl_Color;
- gl_FragColor.rgb = mix(gl_Fog.color.rgb, finalColor.rgb, fogFactor );
- gl_FragColor.a = mix(0.0, finalColor.a, fogFactor);
-}
-
diff --git a/Shaders/test.vert b/Shaders/test.vert
deleted file mode 100644
index eb3e1155d..000000000
--- a/Shaders/test.vert
+++ /dev/null
@@ -1,91 +0,0 @@
-// -*-C++-*-
-#version 120
-
-varying float fogFactor;
-
-//attribute vec3 usrAttr3;
-//attribute vec3 usrAttr4;
-
-//float textureIndexX = usrAttr3.r;
-//float textureIndexY = usrAttr3.g;
-//float wScale = usrAttr3.b;
-//float hScale = usrAttr4.r;
-//float shade = usrAttr4.g;
-//float cloud_height = usrAttr4.b;
-
-//float shade = usrAttr3.r;
-//float cloud_height = usrAttr3.g;
-//float scale = usrAttr3.b;
-
-float shading;
-
-float shade = 0.3;
-float cloud_height = 1000.0;
-float scale = 0.5;
-
-void main(void)
-{
- //shade = 0.1 * shade;
- //scale = 0.1 * scale;
-
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0);
- vec4 l = gl_ModelViewMatrixInverse * vec4(0.0,0.0,1.0,1.0);
- vec3 view = normalize(ep.xyz - l.xyz);
-
- vec4 posh = gl_ModelViewMatrixInverse * normalize(vec4(gl_Vertex.x,gl_Vertex.y,gl_Vertex.z,1.0));
- vec3 pos = normalize(ep.xyz - posh.xyz);
-
- mat4 sprime = mat4(1.0,0.0,0.0,0.0,0.0,0.5,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0);
- mat4 scale = gl_ModelViewMatrix * sprime * gl_ModelViewMatrixInverse;
-
- float dist = sqrt(gl_Vertex.x * gl_Vertex.x + gl_Vertex.y * gl_Vertex.y + gl_Vertex.z * gl_Vertex.z);
- //vec3 u = normalize(smoothstep(500.0, 1500.0, dist) * pos + (1.0 - smoothstep(500.0, 1500.0, dist)) * view);
- //vec3 u = normalize(mix(pos, view, smoothstep(500.0,1500.0,dist)));
- vec3 u = view;
-
- // Find a rotation matrix that rotates 1,0,0 into u. u, r and w are
- // the columns of that matrix.
- vec3 absu = abs(u);
- vec3 r = normalize(vec3(-u.y, u.x, 0.0));
- vec3 w = cross(u, r);
-
- // Do the matrix multiplication by [ u r w pos]. Assume no
- // scaling in the homogeneous component of pos.
- gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
- gl_Position.xyz = gl_Vertex.x * u;
- gl_Position.xyz += gl_Vertex.y * r * 1.0;
- gl_Position.xyz += gl_Vertex.z * w * scale;
- //gl_Position.xyz += gl_Vertex.y * r * wScale;
- //gl_Position.xyz += gl_Vertex.z * w * hScale;
- gl_Position.xyz += gl_Color.xyz;
-
- // Determine a lighting normal based on the vertex position from the
- // center of the cloud, so that sprite on the opposite side of the cloud to the sun are darker.
- float n = dot(normalize(-gl_LightSource[0].position.xyz),
- normalize(mat3x3(gl_ModelViewMatrix) * (- gl_Position.xyz)));;
-
- // Determine the position - used for fog and shading calculations
- vec3 ecPosition = vec3(gl_ModelViewMatrix * gl_Position);
- float fogCoord = abs(ecPosition.z);
- float fract = smoothstep(0.0, cloud_height, gl_Position.z + cloud_height);
-
- // Final position of the sprite
- gl_Position = gl_ModelViewProjectionMatrix * gl_Position;
-
-// Determine the shading of the sprite based on its vertical position and position relative to the sun.
- n = min(smoothstep(-0.5, 0.0, n), fract);
-// Determine the shading based on a mixture from the backlight to the front
- vec4 backlight = gl_LightSource[0].diffuse * shade;
-
- gl_FrontColor = mix(backlight, gl_LightSource[0].diffuse, n);
- gl_FrontColor += gl_FrontLightModelProduct.sceneColor;
-
- // As we get within 100m of the sprite, it is faded out. Equally at large distances it also fades out.
- gl_FrontColor.a = min(smoothstep(10.0, 100.0, fogCoord), 1.0 - smoothstep(15000.0, 20000.0, fogCoord));
- gl_BackColor = gl_FrontColor;
-
- // Fog doesn't affect clouds as much as other objects.
- fogFactor = exp( -gl_Fog.density * fogCoord * 0.2);
- fogFactor = clamp(fogFactor, 0.0, 1.0);
-}
diff --git a/Shaders/transition.frag b/Shaders/transition.frag
deleted file mode 100644
index b750c4e8c..000000000
--- a/Shaders/transition.frag
+++ /dev/null
@@ -1,176 +0,0 @@
-// -*-C++-*-
-// Texture switching based on face slope and snow level
-// based on earlier work by Frederic Bouvier, Tim Moore, and Yves Sablonier.
-// © Emilian Huminiuc 2011
-
-#version 120
-
-varying float RawPosZ;
-varying vec3 WorldPos;
-varying vec3 normal;
-varying vec3 Vnormal;
-varying vec4 eyePos;
-
-uniform float SnowLevel;
-uniform float Transitions;
-uniform float InverseSlope;
-uniform float RainNorm;
-
-uniform float CloudCover0;
-uniform float CloudCover1;
-uniform float CloudCover2;
-uniform float CloudCover3;
-uniform float CloudCover4;
-
-uniform sampler2D BaseTex;
-uniform sampler2D SecondTex;
-uniform sampler2D ThirdTex;
-uniform sampler2D SnowTex;
-
-uniform sampler3D NoiseTex;
-
-////fog "include" /////
-uniform int fogType;
-
-vec3 fog_Func(vec3 color, int type);
-//////////////////////
-
-float getShadowing();
-vec3 getClusteredLightsContribution(vec3 p, vec3 n, vec3 texel);
-
-void main()
- {
- float pf = 0.0;
-
- vec3 lightDir = gl_LightSource[0].position.xyz;
- vec3 halfVector = gl_LightSource[0].halfVector.xyz;
-
- vec4 texel = vec4(0.0);
- vec4 specular = vec4(0.0);
-
- float cover = min(min(min(min(CloudCover0, CloudCover1),CloudCover2),CloudCover3),CloudCover4);
-
- vec4 Noise = texture3D(NoiseTex, WorldPos.xyz*0.0011);
- vec4 Noise2 = texture3D(NoiseTex, WorldPos.xyz * 0.00008);
- float MixFactor = Noise.r * Noise.g * Noise.b; //Mixing Factor to create a more organic looking boundary
- float MixFactor2 = Noise2.r * Noise2.g * Noise2.b;
- MixFactor *= 300.0;
- MixFactor2 *= 300.0;
- MixFactor = clamp(MixFactor, 0.0, 1.0);
- MixFactor2 = clamp(MixFactor2, 0.0, 1.0);
- float L1 = 0.90 - 0.02 * MixFactor; //first transition slope
- float L2 = 0.78 + 0.04 * MixFactor; //Second transition slope
-
- // If gl_Color.a == 0, this is a back-facing polygon and the
- // Vnormal should be reversed.
- // vec3 n = (2.0 * gl_Color.a - 1.0) * Vnormal;
- vec3 n = normalize(Vnormal);
-
- 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)));
- vec4 Diffuse = gl_LightSource[0].diffuse * nDotVP * getShadowing();
-
- if (nDotVP > 0.0)
- pf = pow(nDotHV, gl_FrontMaterial.shininess);
-
- if (gl_FrontMaterial.shininess > 0.0)
- specular = gl_FrontMaterial.specular * gl_LightSource[0].diffuse * pf;
-
-// vec4 diffuseColor = gl_FrontMaterial.emission +
-// vec4(1.0) * (gl_LightModel.ambient + gl_LightSource[0].ambient) +
-// Diffuse * gl_FrontMaterial.diffuse;
- vec4 ambientColor = gl_LightModel.ambient + gl_LightSource[0].ambient;
- //vec4 diffuseColor = gl_Color + Diffuse * gl_FrontMaterial.diffuse + ambientColor;
- vec4 diffuseColor = vec4(Diffuse) + ambientColor; //ATI workaround
- diffuseColor += specular * gl_FrontMaterial.specular;
-
- // 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.
- diffuseColor = clamp(diffuseColor, 0.0, 1.0);
-
-
- //Select texture based on slope
- float slope = normalize(normal).z;
-
- //pull the texture fetch outside flow control to fix aliasing artefacts :(
- vec4 baseTexel = texture2D(BaseTex, gl_TexCoord[0].st);
- vec4 secondTexel = texture2D(SecondTex, gl_TexCoord[0].st);
- vec4 thirdTexel = texture2D(ThirdTex, gl_TexCoord[0].st);
- vec4 snowTexel = texture2D(SnowTex, gl_TexCoord[0].st);
-
- //Normal transition. For more abrupt faces apply another texture (or 2).
- if (InverseSlope == 0.0) {
- //Do we do an intermediate transition
- if (Transitions >= 1.5) {
- if (slope >= L1) {
- texel = baseTexel;
- }
- if (slope >= L2 && slope < L1){
- texel = mix(secondTexel, baseTexel, smoothstep(L2, L1 - 0.06 * MixFactor, slope));
- }
- if (slope < L2){
- texel = mix(thirdTexel, secondTexel, smoothstep(L2 - 0.13 * MixFactor, L2, slope));
- }
- // Just one transition
- } else if (Transitions < 1.5) {
- if (slope >= L1) {
- texel = baseTexel;
- }
- if (slope < L1) {
- texel = mix(thirdTexel, baseTexel, smoothstep(L2 - 0.13 * MixFactor, L1, slope));
- }
- }
-
- //Invert the transition: keep original texture on abrupt slopes and switch to another on flatter terrain
- } else if (InverseSlope > 0.0) {
- //Interemdiate transition ?
- if (Transitions >= 1.5) {
- if (slope >= L1 + 0.1) {
- texel = thirdTexel;
- }
- if (slope >= L2 && slope < L1 + 0.1){
- texel = mix(secondTexel, thirdTexel, smoothstep(L2 + 0.06 * MixFactor, L1 + 0.1, slope));
- }
- if (slope <= L2){
- texel = mix(baseTexel, secondTexel, smoothstep(L2 - 0.06 * MixFactor, L2, slope));
- }
- //just one
- } else if (Transitions < 1.5) {
- if (slope > L1 + 0.1) {
- texel = thirdTexel;
- }
- if (slope <= L1 + 0.1){
- texel = mix(baseTexel, thirdTexel, smoothstep(L2 - 0.06 * MixFactor, L1 + 0.1, slope));
- }
- }
- }
-
- //darken textures with wetness
- float wetness = 1.0 - 0.3 * RainNorm;
- texel.rgb = texel.rgb * wetness;
-
- float altitude = RawPosZ;
- //Snow texture for areas higher than SnowLevel
- 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.0 * MixFactor),
- SnowLevel - (1000.0 * slope - 150.0 * MixFactor),
- altitude)
- );
- }
-
- vec4 fragColor = diffuseColor * texel + specular;
- fragColor.rgb += getClusteredLightsContribution(eyePos.xyz, n, texel.rgb);
-
- if(cover >= 2.5){
- fragColor.rgb = fragColor.rgb * 1.2;
- } else {
- fragColor.rg = fragColor.rg * (0.6 + 0.2 * cover);
- fragColor.b = fragColor.b * (0.5 + 0.25 * cover);
- }
-
- fragColor.rgb *= 1.2 - 0.6 * MixFactor * MixFactor2;
- fragColor.rgb = fog_Func(fragColor.rgb, fogType);
- gl_FragColor = fragColor;
- }
diff --git a/Shaders/transition.vert b/Shaders/transition.vert
deleted file mode 100644
index 9325f6d51..000000000
--- a/Shaders/transition.vert
+++ /dev/null
@@ -1,30 +0,0 @@
-// -*-C++-*-
-// -*-C++-*-
-// Texture switching based on face slope and snow level
-// based on earlier work by Frederic Bouvier, Tim Moore, and Yves Sablonier.
-// © Emilian Huminiuc 2011
-
-
-#version 120
-
-varying float RawPosZ;
-varying vec3 WorldPos;
-varying vec4 eyePos;
-varying vec3 normal;
-varying vec3 Vnormal;
-
-uniform mat4 osg_ViewMatrixInverse;
-
-void setupShadows(vec4 eyeSpacePos);
-
-void main()
- {
- RawPosZ = gl_Vertex.z;
- eyePos = gl_ModelViewMatrix * gl_Vertex;
- WorldPos = (osg_ViewMatrixInverse * eyePos).xyz;
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- normal = normalize(gl_Normal);
- Vnormal = normalize(gl_NormalMatrix * gl_Normal);
- setupShadows(eyePos);
- }
diff --git a/Shaders/trivial_transparent.frag b/Shaders/trivial_transparent.frag
deleted file mode 100644
index c03ed6e8f..000000000
--- a/Shaders/trivial_transparent.frag
+++ /dev/null
@@ -1,12 +0,0 @@
-#version 120
-uniform sampler2D baseTexture;
-
-
-void main(void)
-{
- vec4 base = texture2D( baseTexture, gl_TexCoord[0].st);
- if (base.a <= 0.01)
- discard;
-
- gl_FragColor = vec4 (1.0, 1.0, 1.0, 1.0);
-}
diff --git a/Shaders/ubershader.frag b/Shaders/ubershader.frag
deleted file mode 100644
index 32a3b7170..000000000
--- a/Shaders/ubershader.frag
+++ /dev/null
@@ -1,293 +0,0 @@
-// -*- mode: C; -*-
-// UBERSHADER - default forward rendering - fragment shader
-// Licence: GPL v2
-// Authors: Frederic Bouvier and Gijs de Rooy
-// with major additions and revisions by
-// Emilian Huminiuc and Vivian Meazza 2011
-#version 120
-
-varying vec4 diffuseColor;
-varying vec3 VBinormal;
-varying vec3 VNormal;
-varying vec3 VTangent;
-varying vec3 rawpos;
-varying vec3 eyeVec;
-varying vec3 eyeDir;
-
-uniform sampler2D BaseTex;
-uniform sampler2D LightMapTex;
-uniform sampler2D NormalTex;
-uniform sampler2D ReflGradientsTex;
-uniform sampler2D ReflMapTex;
-uniform sampler3D ReflNoiseTex;
-uniform samplerCube Environment;
-
-uniform int dirt_enabled;
-uniform int dirt_multi;
-uniform int lightmap_enabled;
-uniform int lightmap_multi;
-uniform int nmap_dds;
-uniform int nmap_enabled;
-uniform int refl_enabled;
-uniform int refl_dynamic;
-uniform int refl_map;
-
-uniform float amb_correction;
-uniform float dirt_b_factor;
-uniform float dirt_g_factor;
-uniform float dirt_r_factor;
-uniform float lightmap_a_factor;
-uniform float lightmap_b_factor;
-uniform float lightmap_g_factor;
-uniform float lightmap_r_factor;
-uniform float nmap_tile;
-uniform float refl_correction;
-uniform float refl_fresnel;
-uniform float refl_noise;
-uniform float refl_rainbow;
-
-uniform vec3 lightmap_r_color;
-uniform vec3 lightmap_g_color;
-uniform vec3 lightmap_b_color;
-uniform vec3 lightmap_a_color;
-
-uniform vec3 dirt_r_color;
-uniform vec3 dirt_g_color;
-uniform vec3 dirt_b_color;
-
-///reflection orientation
-uniform mat4 osg_ViewMatrixInverse;
-uniform float latDeg;
-uniform float lonDeg;
-
-///fog include//////////////////////
-uniform int fogType;
-vec3 fog_Func(vec3 color, int type);
-////////////////////////////////////
-
-float getShadowing();
-vec3 getClusteredLightsContribution(vec3 p, vec3 n, vec3 texel);
-
-
-//////rotation matrices/////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////
-mat3 rotX(in float angle)
-{
- mat3 rotmat = mat3(
- 1.0, 0.0, 0.0,
- 0.0, cos(angle), -sin(angle),
- 0.0, sin(angle), cos(angle)
- );
- return rotmat;
-}
-
-mat3 rotY(in float angle)
-{
- mat3 rotmat = mat3(
- cos(angle), 0.0, sin(angle),
- 0.0, 1.0, 0.0,
- -sin(angle), 0.0, cos(angle)
- );
- return rotmat;
-}
-
-mat3 rotZ(in float angle)
-{
- mat3 rotmat = mat3(
- cos(angle), -sin(angle), 0.0,
- sin(angle), cos(angle), 0.0,
- 0.0, 0.0, 1.0
- );
- return rotmat;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-
-void main (void)
-{
- vec4 texel = texture2D(BaseTex, gl_TexCoord[0].st);
- vec4 nmap = texture2D(NormalTex, gl_TexCoord[0].st * nmap_tile);
- vec4 reflmap = texture2D(ReflMapTex, gl_TexCoord[0].st);
- vec4 noisevec = texture3D(ReflNoiseTex, rawpos.xyz);
- vec4 lightmapTexel = texture2D(LightMapTex, gl_TexCoord[0].st);
-
- vec3 mixedcolor;
- vec3 N = vec3(0.0,0.0,1.0);
- float pf = 0.0;
-
- ///BEGIN bump //////////////////////////////////////////////////////////////////
- if (nmap_enabled > 0 ){
- N = nmap.rgb * 2.0 - 1.0;
- N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal);
- if (nmap_dds > 0)
- N = -N;
- } else {
- N = normalize(VNormal);
- }
- ///END bump ////////////////////////////////////////////////////////////////////
- vec3 viewN = normalize((gl_ModelViewMatrixTranspose * vec4(N,0.0)).xyz);
- vec3 viewVec = normalize(eyeVec);
- float v = abs(dot(viewVec, viewN));// Map a rainbowish color
- vec4 fresnel = texture2D(ReflGradientsTex, vec2(v, 0.75));
- vec4 rainbow = texture2D(ReflGradientsTex, vec2(v, 0.25));
-
- mat4 reflMatrix = gl_ModelViewMatrixInverse;
- vec3 wRefVec = reflect(viewVec,N);
-
- ////dynamic reflection /////////////////////////////
- if (refl_dynamic > 0){
- reflMatrix = osg_ViewMatrixInverse;
-
- vec3 wVertVec = normalize(reflMatrix * vec4(viewVec,0.0)).xyz;
- vec3 wNormal = normalize(reflMatrix * vec4(N,0.0)).xyz;
-
- float latRad = radians(90.-latDeg);
- float lonRad = radians(lonDeg);
-
- mat3 rotCorrY = rotY(latRad);
- mat3 rotCorrZ = rotZ(lonRad);
- mat3 reflCorr = rotCorrY * rotCorrZ;
- wRefVec = reflect(wVertVec,wNormal);
- wRefVec = normalize(reflCorr * wRefVec);
- } else { ///static reflection
- wRefVec = normalize(reflMatrix * vec4(wRefVec,0.0)).xyz;
- }
-
- vec3 reflection = textureCube(Environment, wRefVec).xyz;
-
- vec3 E = eyeDir;
- E = normalize(E);
-
- vec3 L = normalize((gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz);
- vec3 H = normalize(L + E);
-
- N = viewN;
-
- float nDotVP = dot(N,L);
- float nDotHV = dot(N,H);
- float eDotLV = max(0.0, dot(-E,L));
-
- //glare on the backside of tranparent objects
- if ((gl_Color.a < .999 || texel.a < 1.0) && nDotVP < 0.0) {
- nDotVP = dot(-N, L);
- nDotHV = dot(-N, H);
- }
-
- nDotVP = max(0.0, nDotVP);
- nDotHV = max(0.0, nDotHV);
-
- if (nDotVP == 0.0)
- pf = 0.0;
- else
- pf = pow(nDotHV, gl_FrontMaterial.shininess);
-
- float shadowmap = getShadowing();
- vec4 Diffuse = gl_LightSource[0].diffuse * nDotVP * shadowmap;
- vec4 Specular = gl_FrontMaterial.specular * gl_LightSource[0].diffuse * pf * shadowmap;
-
- vec4 color = gl_Color + Diffuse*diffuseColor;
- color = clamp( color, 0.0, 1.0 );
- color.a = texel.a * diffuseColor.a;
- ////////////////////////////////////////////////////////////////////
- //BEGIN reflect
- ////////////////////////////////////////////////////////////////////
- if (refl_enabled > 0 ){
- float reflFactor = 0.0;
- float transparency_offset = clamp(refl_correction, -1.0, 1.0);// set the user shininess offset
-
- if(refl_map > 0){
- // map the shininess of the object with user input
- reflFactor = reflmap.a + transparency_offset;
- } else if (nmap_enabled > 0) {
- // set the reflectivity proportional to shininess with user input
- reflFactor = gl_FrontMaterial.shininess * 0.0078125 * nmap.a + transparency_offset;
- } else {
- reflFactor = gl_FrontMaterial.shininess* 0.0078125 + transparency_offset;
- }
- reflFactor = clamp(reflFactor, 0.0, 1.0);
-
- // add fringing fresnel and rainbow effects and modulate by reflection
- vec3 reflcolor = mix(reflection, rainbow.rgb, refl_rainbow * v);
- vec3 reflfrescolor = mix(reflcolor, fresnel.rgb, refl_fresnel * v);
- vec3 noisecolor = mix(reflfrescolor, noisevec.rgb, refl_noise);
- vec3 raincolor = noisecolor * reflFactor;
- raincolor += Specular.rgb;
- raincolor *= gl_LightSource[0].diffuse.rgb;
- mixedcolor = mix(texel.rgb, raincolor, reflFactor);
- } else {
- mixedcolor = texel.rgb;
- }
- /////////////////////////////////////////////////////////////////////
- //END reflect
- /////////////////////////////////////////////////////////////////////
-
- if (color.a<1.0){
- color.a += .1 * eDotLV;
- }
- //////////////////////////////////////////////////////////////////////
- //begin DIRT
- //////////////////////////////////////////////////////////////////////
- if (dirt_enabled >= 1){
- vec3 dirtFactorIn = vec3 (dirt_r_factor, dirt_g_factor, dirt_b_factor);
- vec3 dirtFactor = reflmap.rgb * dirtFactorIn.rgb;
- mixedcolor.rgb = mix(mixedcolor.rgb, dirt_r_color, smoothstep(0.0, 1.0, dirtFactor.r));
- if (color.a < 1.0) {
- color.a += dirtFactor.r * eDotLV;
- }
- if (dirt_multi > 0) {
- mixedcolor.rgb = mix(mixedcolor.rgb, dirt_g_color, smoothstep(0.0, 1.0, dirtFactor.g));
- mixedcolor.rgb = mix(mixedcolor.rgb, dirt_b_color, smoothstep(0.0, 1.0, dirtFactor.b));
- if (color.a < 1.0) {
- color.a += dirtFactor.g * eDotLV;
- color.a += dirtFactor.b * eDotLV;
- }
- }
-
- }
- //////////////////////////////////////////////////////////////////////
- //END Dirt
- //////////////////////////////////////////////////////////////////////
-
-
- // set ambient adjustment to remove bluiness with user input
- float ambient_offset = clamp(amb_correction, -1.0, 1.0);
- vec4 ambient = gl_LightModel.ambient + gl_LightSource[0].ambient;
-
- vec3 ambient_Correction = vec3(ambient.rg, ambient.b * 0.6);
-
- ambient_Correction *= ambient_offset;
- ambient_Correction = clamp(ambient_Correction, -1.0, 1.0);
-
- vec4 fragColor = vec4(color.rgb * mixedcolor + ambient_Correction.rgb, color.a);
-
- fragColor += Specular * nmap.a;
-
- fragColor.rgb += getClusteredLightsContribution(eyeVec, N, texel.rgb);
-
- //////////////////////////////////////////////////////////////////////
- // BEGIN lightmap
- //////////////////////////////////////////////////////////////////////
- if ( lightmap_enabled >= 1 ) {
- vec3 lightmapcolor = vec3(0.0);
- vec4 lightmapFactor = vec4(lightmap_r_factor, lightmap_g_factor,
- lightmap_b_factor, lightmap_a_factor);
- lightmapFactor = lightmapFactor * lightmapTexel;
- if (lightmap_multi > 0 ){
- lightmapcolor = lightmap_r_color * lightmapFactor.r +
- lightmap_g_color * lightmapFactor.g +
- lightmap_b_color * lightmapFactor.b +
- lightmap_a_color * lightmapFactor.a ;
- } else {
- lightmapcolor = lightmapTexel.rgb * lightmap_r_color * lightmapFactor.r;
- }
- fragColor.rgb = max(fragColor.rgb, lightmapcolor * smoothstep(0.0, 1.0, mixedcolor*.5 + lightmapcolor*.5));
- }
- //////////////////////////////////////////////////////////////////////
- // END lightmap
- /////////////////////////////////////////////////////////////////////
-
- fragColor.rgb = fog_Func(fragColor.rgb, fogType);
-
- gl_FragColor = fragColor;
-}
diff --git a/Shaders/ubershader.vert b/Shaders/ubershader.vert
deleted file mode 100644
index b447e0260..000000000
--- a/Shaders/ubershader.vert
+++ /dev/null
@@ -1,66 +0,0 @@
-// -*- mode: C; -*-
-// UBERSHADER - vertex shader
-// Licence: GPL v2
-// © Emilian Huminiuc and Vivian Meazza 2011
-#version 120
-
-varying vec4 diffuseColor;
-varying vec3 VBinormal;
-varying vec3 VNormal;
-varying vec3 VTangent;
-varying vec3 rawpos;
-varying vec3 eyeVec;
-varying vec3 eyeDir;
-
-attribute vec3 tangent;
-attribute vec3 binormal;
-
-uniform int nmap_enabled;
-
-void setupShadows(vec4 eyeSpacePos);
-
-void main(void)
-{
- rawpos = gl_Vertex.xyz;
- vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
- eyeVec = ecPosition.xyz;
- eyeDir = gl_ModelViewMatrixInverse[3].xyz - gl_Vertex.xyz;
-
- VNormal = normalize(gl_NormalMatrix * gl_Normal);
-
- vec3 n = normalize(gl_Normal);
-
-// generate "fake" binormals/tangents
- vec3 c1 = cross(n, vec3(0.0,0.0,1.0));
- vec3 c2 = cross(n, vec3(0.0,1.0,0.0));
- vec3 tempTangent = c1;
-
- if(length(c2)>length(c1)){
- tempTangent = c2;
- }
-
- vec3 tempBinormal = cross(n, tempTangent);
-
- if (nmap_enabled > 0){
- tempTangent = tangent;
- tempBinormal = binormal;
- }
-
- VTangent = normalize(gl_NormalMatrix * tempTangent);
- VBinormal = normalize(gl_NormalMatrix * tempBinormal);
-
- diffuseColor = gl_Color;
- // Super hack: if diffuse material alpha is less than 1, assume a
- // transparency animation is at work
- if (gl_FrontMaterial.diffuse.a < 1.0)
- diffuseColor.a = gl_FrontMaterial.diffuse.a;
-
- gl_FrontColor = gl_FrontMaterial.emission + gl_Color
- * (gl_LightModel.ambient + gl_LightSource[0].ambient);
-
- gl_Position = ftransform();
- gl_ClipVertex = ecPosition;
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
-
- setupShadows(ecPosition);
-}
diff --git a/Shaders/urban-ALS.frag b/Shaders/urban-ALS.frag
deleted file mode 100644
index ccb8bce49..000000000
--- a/Shaders/urban-ALS.frag
+++ /dev/null
@@ -1,612 +0,0 @@
-// -*- mode: C; -*-
-// Licence: GPL v2
-// Author: Frederic Bouvier.
-// Adapted from the paper by F. Policarpo et al. : Real-time Relief Mapping on Arbitrary Polygonal Surfaces
-// Adapted from the paper and sources by M. Drobot in GPU Pro : Quadtree Displacement Mapping with Height Blending
-
-#version 120
-
-#extension GL_ATI_shader_texture_lod : enable
-#extension GL_ARB_shader_texture_lod : enable
-
-#define TEXTURE_MIP_LEVELS 10
-#define TEXTURE_PIX_COUNT 1024 //pow(2,TEXTURE_MIP_LEVELS)
-#define BINARY_SEARCH_COUNT 10
-#define BILINEAR_SMOOTH_FACTOR 2.0
-
-varying vec3 worldPos;
-varying vec4 ecPosition;
-varying vec3 VNormal;
-varying vec3 VTangent;
-varying vec4 constantColor;
-varying vec3 light_diffuse;
-varying vec3 relPos;
-
-varying float yprime_alt;
-varying float mie_angle;
-varying float steepness;
-
-uniform sampler2D BaseTex;
-uniform sampler2D NormalTex;
-uniform sampler2D QDMTex;
-uniform sampler2D BackgroundTex;
-uniform sampler2D OverlayTex;
-uniform sampler2D GradientTex;
-uniform float depth_factor;
-uniform float tile_size;
-uniform float quality_level;
-uniform float visibility;
-uniform float avisibility;
-uniform float scattering;
-uniform float terminator;
-uniform float terrain_alt;
-uniform float hazeLayerAltitude;
-uniform float overcast;
-uniform float eye_alt;
-uniform float mysnowlevel;
-uniform float dust_cover_factor;
-uniform float wetness;
-uniform float fogstructure;
-uniform float cloud_self_shading;
-uniform float air_pollution;
-uniform float blend_bias;
-uniform float urban_domain_size;
-uniform float urban_domain_fraction;
-uniform float landing_light1_offset;
-uniform float landing_light2_offset;
-uniform float landing_light3_offset;
-
-uniform vec3 night_color;
-
-uniform bool random_buildings;
-uniform bool osm_buildings;
-
-uniform int cloud_shadow_flag;
-uniform int use_searchlight;
-uniform int use_landing_light;
-uniform int use_alt_landing_light;
-uniform int gquality_level;
-uniform int tquality_level;
-uniform int urban_blend;
-uniform int urban_domains;
-
-const float scale = 1.0;
-int linear_search_steps = 10;
-int GlobalIterationCount = 0;
-int gIterationCap = 64;
-
-const float EarthRadius = 5800000.0;
-const float terminator_width = 200000.0;
-
-float alt;
-float eShade;
-
-float shadow_func (in float x, in float y, in float noise, in float dist);
-float Noise2D(in vec2 coord, in float wavelength);
-float Noise3D(in vec3 coord, in float wavelength);
-float VoronoiNoise2D(in vec2 coord, in float wavelength, in float xrand, in float yrand);
-float fog_func (in float targ, in float alt);
-float rayleigh_in_func(in float dist, in float air_pollution, in float avisibility, in float eye_alt, in float vertex_alt);
-float alt_factor(in float eye_alt, in float vertex_alt);
-float light_distance_fading(in float dist);
-float fog_backscatter(in float avisibility);
-
-
-
-vec3 rayleigh_out_shift(in vec3 color, in float outscatter);
-vec3 get_hazeColor(in float light_arg);
-vec3 searchlight();
-vec3 landing_light(in float offset, in float offsetv);
-vec3 filter_combined (in vec3 color) ;
-
-float getShadowing();
-
-void QDM(inout vec3 p, inout vec3 v)
-{
- const int MAX_LEVEL = TEXTURE_MIP_LEVELS;
- const float NODE_COUNT = TEXTURE_PIX_COUNT;
- const float TEXEL_SPAN_HALF = 1.0 / NODE_COUNT / 2.0;
-
- float fDeltaNC = TEXEL_SPAN_HALF * depth_factor;
-
- vec3 p2 = p;
- float level = MAX_LEVEL;
- vec2 dirSign = (sign(v.xy) + 1.0) * 0.5;
- GlobalIterationCount = 0;
- float d = 0.0;
-
- while (level >= 0.0 && GlobalIterationCount < gIterationCap)
- {
- vec4 uv = vec4(p2.xyz, level);
- d = texture2DLod(QDMTex, uv.xy, uv.w).w;
-
- if (d > p2.z)
- {
- //predictive point of ray traversal
- vec3 tmpP2 = p + v * d;
-
- //current node count
- float nodeCount = pow(2.0, (MAX_LEVEL - level));
- //current and predictive node ID
- vec4 nodeID = floor(vec4(p2.xy, tmpP2.xy)*nodeCount);
-
- //check if we are crossing the current cell
- if (nodeID.x != nodeID.z || nodeID.y != nodeID.w)
- {
- //calculate distance to nearest bound
- vec2 a = p2.xy - p.xy;
- vec2 p3 = (nodeID.xy + dirSign) / nodeCount;
- vec2 b = p3.xy - p.xy;
-
- vec2 dNC = (b.xy * p2.z) / a.xy;
- //take the nearest cell
- d = min(d,min(dNC.x, dNC.y))+fDeltaNC;
-
- level++;
- }
- p2 = p + v * d;
- }
- level--;
- GlobalIterationCount++;
- }
-
- //
- // Manual Bilinear filtering
- //
- float rayLength = length(p2.xy - p.xy) + fDeltaNC;
-
- float dA = p2.z * (rayLength - BILINEAR_SMOOTH_FACTOR * TEXEL_SPAN_HALF) / rayLength;
- float dB = p2.z * (rayLength + BILINEAR_SMOOTH_FACTOR * TEXEL_SPAN_HALF) / rayLength;
-
- vec4 p2a = vec4(p + v * dA, 0.0);
- vec4 p2b = vec4(p + v * dB, 0.0);
- dA = texture2DLod(NormalTex, p2a.xy, p2a.w).w;
- dB = texture2DLod(NormalTex, p2b.xy, p2b.w).w;
-
- dA = abs(p2a.z - dA);
- dB = abs(p2b.z - dB);
-
- p2 = mix(p2a.xyz, p2b.xyz, dA / (dA + dB));
-
- p = p2;
-}
-
-float ray_intersect_QDM(vec2 dp, vec2 ds)
-{
- vec3 p = vec3( dp, 0.0 );
- vec3 v = vec3( ds, 1.0 );
- QDM( p, v );
- return p.z;
-}
-
-float ray_intersect_relief(vec2 dp, vec2 ds)
-{
- float size = 1.0 / float(linear_search_steps);
- float depth = 0.0;
- float best_depth = 1.0;
-
- for(int i = 0; i < linear_search_steps - 1; ++i)
- {
- depth += size;
- float t = step(0.95, texture2D(NormalTex, dp + ds * depth).a);
- if(best_depth > 0.996)
- if(depth >= t)
- best_depth = depth;
- }
- depth = best_depth;
-
- const int binary_search_steps = 5;
-
- for(int i = 0; i < binary_search_steps; ++i)
- {
- size *= 0.5;
- float t = step(0.95, texture2D(NormalTex, dp + ds * depth).a);
- if(depth >= t)
- {
- best_depth = depth;
- depth -= 2.0 * size;
- }
- depth += size;
- }
-
- return(best_depth);
-}
-
-float ray_intersect(vec2 dp, vec2 ds)
-{
- if (( random_buildings ) || ( osm_buildings ))
- return 0.0;
- else if ( quality_level >= 4.0 )
- return ray_intersect_QDM( dp, ds );
- else
- return ray_intersect_relief( dp, ds );
-}
-
-void main (void)
-{
- if ( quality_level >= 3.0 ) {
- linear_search_steps = 20;
- }
-
- float depthfactor = depth_factor;
- if (( random_buildings ) || (osm_buildings))
- depthfactor = 0.0;
-
- float steepness_factor = 1.0 -smoothstep(0.85, 0.9, steepness);
-
- vec3 shadedFogColor = vec3(0.55, 0.67, 0.88);
- float effective_scattering = min(scattering, cloud_self_shading);
- vec3 normal = normalize(VNormal);
- vec3 tangent = normalize(VTangent);
- vec3 binormal = normalize(cross(normal, tangent));
- vec3 ecPos3 = ecPosition.xyz / ecPosition.w;
- vec3 V = normalize(ecPos3);
- vec3 s = vec3(dot(V, tangent), dot(V, binormal), dot(normal, -V));
- vec2 ds = s.xy * depthfactor / s.z;
- vec2 dp = gl_TexCoord[0].st - ds;
- float d = ray_intersect(dp, ds);
-
- vec2 uv = dp + ds * d * (1.0-steepness_factor);
-
- vec2 samplePos = (relPos + (gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0)).xyz).xy;
-
- float vnoise = 0;
-
- if (urban_domains == 1)
- {
- vnoise = VoronoiNoise2D(samplePos, urban_domain_size, 1.5, 1.5);
- float dir = 2.0 * 3.1415 * vnoise;
-
- mat2 rotMat = mat2 (cos(dir), sin(dir), -sin(dir), cos(dir));
- uv = rotMat * uv;
- }
-
- vec3 N = texture2D(NormalTex, uv).xyz * 2.0 - 1.0;
-
-
-
- float emis = N.z;
- N.z = sqrt(1.0 - min(1.0,dot(N.xy, N.xy)));
- float Nz = N.z;
- N = normalize(N.x * tangent + N.y * binormal + N.z * normal);
-
- N = mix(N, normal, steepness_factor);
- if ((vnoise > urban_domain_fraction) && (urban_blend == 1)) {N = mix(N,normal, 0.8);}
-
-
- vec3 l = gl_LightSource[0].position.xyz;
- vec3 diffuse = gl_Color.rgb * max(0.0, dot(N, l));
-
- float dist = length(relPos);
- if (cloud_shadow_flag == 1)
- {diffuse = diffuse * shadow_func(relPos.x, relPos.y, 1.0, dist);}
-
- diffuse *= getShadowing();
-
-
- float shadow_factor = 1.0;
-
- // Shadow
- if ( quality_level >= 2.0 ) {
- dp += ds * d;
- vec3 sl = normalize( vec3( dot( l, tangent ), dot( l, binormal ), dot( -l, normal ) ) );
- ds = sl.xy * depthfactor / sl.z;
- dp -= ds * d;
- float dl = ray_intersect(dp, ds);
- if ( dl < d - 0.05 )
- shadow_factor = dot( constantColor.xyz, vec3( 1.0, 1.0, 1.0 ) ) * 0.25;
-
- shadow_factor = mix(shadow_factor, 1.0, steepness_factor);
-
- if (vnoise > urban_domain_fraction) {shadow_factor = 0.5 * (1.0 +shadow_factor);}
-
- }
-
-
-
-
-
- // end shadow
-
- vec4 ambient_light = constantColor + vec4 (light_diffuse,1.0) * vec4(diffuse, 1.0);
- float reflectance = ambient_light.r * 0.3 + ambient_light.g * 0.59 + ambient_light.b * 0.11;
- if ( shadow_factor < 1.0 )
- ambient_light = constantColor + vec4(light_diffuse,1.0) * shadow_factor * vec4(diffuse, 1.0);
- float emission_factor = (1.0 - smoothstep(0.15, 0.25, reflectance)) * emis;
- vec4 tc = texture2D(BaseTex, uv);
- emission_factor *= 0.5*pow(tc.r+0.8*tc.g+0.2*tc.b, 2.0) -0.2;
- ambient_light += (emission_factor * vec4(night_color, 0.0));
-
-
-
- vec4 baseTexel = texture2D(BaseTex, uv);
-
- vec4 finalColor = baseTexel;
-
- // blending effect
-
- if (urban_blend == 1)
- {
- vec4 backgroundTexel = texture2D(BackgroundTex, uv);
- float vbias = 0.0;
- if (vnoise > urban_domain_fraction) {vbias = 0.5 + 0.5 * vnoise;}
-
- finalColor.rgb = mix(backgroundTexel.rgb, baseTexel.rgb, clamp(baseTexel.a - blend_bias - vbias, 0.0, 1.0));
- }
-
- // steepness
-
- vec4 gradientTexel = texture2D(GradientTex, uv);
-
- if (gradientTexel.a > 0.0)
- {
- finalColor.rgb = mix(finalColor.rgb, gradientTexel.rgb, steepness_factor);
- }
-
-// texel postprocessing by shader effects
-
-
-// dust effect
-
-vec4 dust_color;
-
-
-float noise_1500m = Noise3D(worldPos.xyz,1500.0);
-float noise_2000m = Noise3D(worldPos.xyz,2000.0);
-
-if (gquality_level > 2)
- {
- // mix dust
- dust_color = vec4 (0.76, 0.71, 0.56, 1.0);
-
- finalColor = mix(finalColor, dust_color, clamp(0.5 * dust_cover_factor + 3.0 * dust_cover_factor * (((noise_1500m - 0.5) * 0.125)+0.125 ),0.0, 1.0) );
- }
-
-
-// darken wet terrain
-
- finalColor.rgb = finalColor.rgb * (1.0 - 0.6 * wetness);
-
- vec3 secondary_light = vec3 (0.0,0.0,0.0);
-
- if (use_searchlight == 1)
- {
- secondary_light += searchlight();
- }
- if (use_landing_light == 1)
- {
- secondary_light += landing_light(landing_light1_offset, landing_light3_offset);
- }
- if (use_alt_landing_light == 1)
- {
- secondary_light += landing_light(landing_light2_offset, landing_light3_offset);
- }
- ambient_light = clamp(ambient_light,0.0,1.0);
- ambient_light.rgb +=secondary_light * light_distance_fading(dist);
-
-
-
- finalColor *= ambient_light;
-
- vec4 p = vec4( ecPos3 + tile_size * V * (d-1.0) * depthfactor / s.z, 1.0 );
-
-
-
-
-
-float lightArg = (terminator-yprime_alt)/100000.0;
-
-vec3 hazeColor = get_hazeColor(lightArg);
-
-
-
-// Rayleigh color shifts
-
- if ((gquality_level > 5) && (tquality_level > 5))
- {
- float rayleigh_length = 0.5 * avisibility * (2.5 - 1.9 * air_pollution)/alt_factor(eye_alt, eye_alt+relPos.z);
- float outscatter = 1.0-exp(-dist/rayleigh_length);
- finalColor.rgb = rayleigh_out_shift(finalColor.rgb,outscatter);
-// Rayleigh color shift due to in-scattering
- float rShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt + 420000.0);
- float lightIntensity = length(hazeColor * effective_scattering) * rShade;
- vec3 rayleighColor = vec3 (0.17, 0.52, 0.87) * lightIntensity;
- float rayleighStrength = rayleigh_in_func(dist, air_pollution, avisibility/max(lightIntensity,0.05), eye_alt, eye_alt + relPos.z);
- finalColor.rgb = mix(finalColor.rgb, rayleighColor,rayleighStrength);
- }
-
-// here comes the terrain haze model
-
-
-float delta_z = hazeLayerAltitude - eye_alt;
-
-float mvisibility = min(visibility,avisibility);
-
-if (dist > 0.04 * mvisibility)
-{
-
-alt = eye_alt;
-
-
-float transmission;
-float vAltitude;
-float delta_zv;
-float H;
-float distance_in_layer;
-float transmission_arg;
-float intensity;
-vec3 lightDir = gl_LightSource[0].position.xyz;
-
-// angle with horizon
-float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist;
-
-
-// we solve the geometry what part of the light path is attenuated normally and what is through the haze layer
-
-if (delta_z > 0.0) // we're inside the layer
- {
- if (ct < 0.0) // we look down
- {
- distance_in_layer = dist;
- vAltitude = min(distance_in_layer,mvisibility) * ct;
- delta_zv = delta_z - vAltitude;
- }
- else // we may look through upper layer edge
- {
- H = dist * ct;
- if (H > delta_z) {distance_in_layer = dist/H * delta_z;}
- else {distance_in_layer = dist;}
- vAltitude = min(distance_in_layer,visibility) * ct;
- delta_zv = delta_z - vAltitude;
- }
- }
- else // we see the layer from above, delta_z < 0.0
- {
- H = dist * -ct;
- if (H < (-delta_z)) // we don't see into the layer at all, aloft visibility is the only fading
- {
- distance_in_layer = 0.0;
- delta_zv = 0.0;
- }
- else
- {
- vAltitude = H + delta_z;
- distance_in_layer = vAltitude/H * dist;
- vAltitude = min(distance_in_layer,visibility) * (-ct);
- delta_zv = vAltitude;
- }
- }
-
-
-// ground haze cannot be thinner than aloft visibility in the model,
-// so we need to use aloft visibility otherwise
-
-
-transmission_arg = (dist-distance_in_layer)/avisibility;
-
-
-float eqColorFactor;
-
-
-
-if (visibility < avisibility)
- {
- if (gquality_level > 3)
- {
- transmission_arg = transmission_arg + (distance_in_layer/(1.0 * visibility + 1.0 * visibility * fogstructure * 0.06 * (noise_1500m + noise_2000m -1.0) ));
-
- }
- else
- {
- transmission_arg = transmission_arg + (distance_in_layer/visibility);
- }
- // this combines the Weber-Fechner intensity
- eqColorFactor = 1.0 - 0.1 * delta_zv/visibility - (1.0 - effective_scattering);
-
- }
-else
- {
- if (gquality_level > 3)
- {
- transmission_arg = transmission_arg + (distance_in_layer/(1.0 * avisibility + 1.0 * avisibility * fogstructure * 0.06 * (noise_1500m + noise_2000m - 1.0) ));
- }
- else
- {
- transmission_arg = transmission_arg + (distance_in_layer/avisibility);
- }
- // this combines the Weber-Fechner intensity
- eqColorFactor = 1.0 - 0.1 * delta_zv/avisibility - (1.0 - effective_scattering);
- }
-
-
-
-transmission = fog_func(transmission_arg, alt);
-
-// there's always residual intensity, we should never be driven to zero
-if (eqColorFactor < 0.2) eqColorFactor = 0.2;
-
-
-
-
-
-// now dim the light for haze
-eShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt);
-
-// Mie-like factor
-
- if (lightArg < 10.0)
- {
- intensity = length(hazeColor);
- float mie_magnitude = 0.5 * smoothstep(350000.0, 150000.0, terminator-sqrt(2.0 * EarthRadius * terrain_alt));
- hazeColor = intensity * ((1.0 - mie_magnitude) + mie_magnitude * mie_angle) * normalize(mix(hazeColor, vec3 (0.5, 0.58, 0.65), mie_magnitude * (0.5 - 0.5 * mie_angle)) );
- }
-
-
-intensity = length(hazeColor);
-
-if (intensity > 0.0) // this needs to be a condition, because otherwise hazeColor doesn't come out correctly
- {
- // Mie-like factor
-
- if (lightArg < 10.0)
- {
- float mie_magnitude = 0.5 * smoothstep(350000.0, 150000.0, terminator-sqrt(2.0 * EarthRadius * terrain_alt));
- hazeColor = intensity * ((1.0 - mie_magnitude) + mie_magnitude * mie_angle) * normalize(mix(hazeColor, vec3 (0.5, 0.58, 0.65), mie_magnitude * (0.5 - 0.5 * mie_angle)) );
- }
-
- // high altitude desaturation of the haze color
- hazeColor = intensity * normalize (mix(hazeColor, intensity * vec3 (1.0,1.0,1.0), 0.7* smoothstep(5000.0, 50000.0, alt)));
-
- // blue hue of haze
-
- hazeColor.x = hazeColor.x * 0.83;
- hazeColor.y = hazeColor.y * 0.9;
-
-
- // additional blue in indirect light
- float fade_out = max(0.65 - 0.3 *overcast, 0.45);
- intensity = length(hazeColor);
- hazeColor = intensity * normalize(mix(hazeColor, 1.5* shadedFogColor, 1.0 -smoothstep(0.25, fade_out,eShade) ));
-
- // change haze color to blue hue for strong fogging
- hazeColor = intensity * normalize(mix(hazeColor, shadedFogColor, (1.0-smoothstep(0.5,0.9,eqColorFactor))));
-
-
- // reduce haze intensity when looking at shaded surfaces, only in terminator region
-
- float shadow = mix( min(1.0 + dot(VNormal,lightDir),1.0), 1.0, 1.0-smoothstep(0.1, 0.4, transmission));
- hazeColor = mix(shadow * hazeColor, hazeColor, 0.3 + 0.7* smoothstep(250000.0, 400000.0, terminator));
- }
-
-
-// don't let the light fade out too rapidly
-lightArg = (terminator + 200000.0)/100000.0;
-float minLightIntensity = min(0.2,0.16 * lightArg + 0.5);
-vec3 minLight = minLightIntensity * vec3 (0.2, 0.3, 0.4);
-hazeColor *= eqColorFactor * eShade;
-hazeColor.rgb = max(hazeColor.rgb, minLight.rgb);
-
-
-finalColor.rgb = mix( hazeColor +secondary_light * fog_backscatter(mvisibility), finalColor.rgb,transmission);
-
-}
-
-
-finalColor.rgb = filter_combined(finalColor.rgb);
-
-
-gl_FragColor = finalColor;
-
-
-
-
- if (dot(normal,-V) > 0.1) {
- vec4 iproj = gl_ProjectionMatrix * p;
- iproj /= iproj.w;
- gl_FragDepth = (iproj.z+1.0)/2.0;
- } else {
- gl_FragDepth = gl_FragCoord.z;
- }
-
-
-}
diff --git a/Shaders/urban-ALS.vert b/Shaders/urban-ALS.vert
deleted file mode 100644
index eb8af1433..000000000
--- a/Shaders/urban-ALS.vert
+++ /dev/null
@@ -1,289 +0,0 @@
-// -*-C++-*-
-#version 120
-
-// Shader that uses OpenGL state values to do per-pixel lighting
-//
-// The only light used is gl_LightSource[0], which is assumed to be
-// directional.
-//
-// Diffuse colors come from the gl_Color, ambient from the material. This is
-// equivalent to osg::Material::DIFFUSE.
-// Haze part added by Thorsten Renk, Oct. 2011
-
-
-#define MODE_OFF 0
-#define MODE_DIFFUSE 1
-#define MODE_AMBIENT_AND_DIFFUSE 2
-
-// The constant term of the lighting equation that doesn't depend on
-// the surface normal is passed in gl_{Front,Back}Color. The alpha
-// component is set to 1 for front, 0 for back in order to work around
-// bugs with gl_FrontFacing in the fragment shader.
-
-
-varying vec3 relPos;
-varying vec3 worldPos;
-varying vec3 VNormal;
-varying vec3 VTangent;
-varying vec4 ecPosition;
-varying vec4 constantColor;
-varying vec3 light_diffuse;
-
-
-varying float yprime_alt;
-varying float mie_angle;
-varying float steepness;
-
-uniform int colorMode;
-uniform float hazeLayerAltitude;
-uniform float terminator;
-uniform float terrain_alt;
-uniform float avisibility;
-uniform float visibility;
-uniform float overcast;
-uniform float ground_scattering;
-uniform float eye_alt;
-uniform float moonlight;
-
-uniform bool use_IR_vision;
-
-uniform mat4 osg_ViewMatrixInverse;
-
-attribute vec3 tangent;//, binormal;
-
-void setupShadows(vec4 eyeSpacePos);
-
-float earthShade;
-
-
-// This is the value used in the skydome scattering shader - use the same here for consistency?
-const float EarthRadius = 5800000.0;
-const float terminator_width = 200000.0;
-
-float light_func (in float x, in float a, in float b, in float c, in float d, in float e)
-{
-//x = x - 0.5;
-
-// use the asymptotics to shorten computations
-if (x < -15.0) {return 0.0;}
-
-return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d));
-}
-
-
-void main()
-{
-
-
- vec4 light_ambient;
- vec3 shadedFogColor = vec3(0.55, 0.67, 0.88);
- vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight;
-
- //float yprime_alt;
- float yprime;
- float lightArg;
- float intensity;
- float vertex_alt;
- float scattering;
-
- //rawPos = gl_Vertex.xy;
- worldPos = (osg_ViewMatrixInverse *gl_ModelViewMatrix * gl_Vertex).xyz;
- steepness = dot(normalize(gl_Normal), vec3 (0.0, 0.0, 1.0));
-
- // hack: World Scenery 2.0 triangle mesh doesn't yield sensible tangents
- // and normals, so we pretend that urban terrain is always close
- // to flat to get rid of back triangles in urban terrain
-
- //VNormal = normalize(gl_NormalMatrix * gl_Normal);
- //VTangent = gl_NormalMatrix * tangent;
- VNormal = gl_NormalMatrix * vec3 (0.0,0.0,1.0);
- VTangent = gl_NormalMatrix * vec3 (0.0,-1.0,0.0);
-
- ecPosition = gl_ModelViewMatrix * gl_Vertex;
-// Normal = normalize(gl_Normal);
-// VBinormal = gl_NormalMatrix * binormal;
-
-
-// this code is copied from default.vert
-
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- //normal = gl_NormalMatrix * gl_Normal;
- vec4 ambient_color, diffuse_color;
- if (colorMode == MODE_DIFFUSE) {
- diffuse_color = gl_Color;
- ambient_color = gl_FrontMaterial.ambient;
- } else if (colorMode == MODE_AMBIENT_AND_DIFFUSE) {
- diffuse_color = gl_Color;
- ambient_color = gl_Color;
- } else {
- diffuse_color = gl_FrontMaterial.diffuse;
- ambient_color = gl_FrontMaterial.ambient;
- }
-
-
-
- // here start computations for the haze layer
- // we need several geometrical quantities
-
-
-// first current altitude of eye position in model space
- vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0);
-
- // and relative position to vector
- relPos = gl_Vertex.xyz - ep.xyz;
-
- // unfortunately, we need the distance in the vertex shader, although the more accurate version
- // is later computed in the fragment shader again
- float dist = length(relPos);
-
-
- // altitude of the vertex in question, somehow zero leads to artefacts, so ensure it is at least 100m
- vertex_alt = max(gl_Vertex.z,100.0);
- scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_alt);
-
-
-
-// early culling of vertices which can't be seen due to ground haze despite being in aloft visibility range
-
-float delta_z = hazeLayerAltitude - eye_alt;
-
-
- // branch dependent on daytime
-
-if (terminator < 1000000.0) // the full, sunrise and sunset computation
-{
-
-
- // establish coordinates relative to sun position
-
- vec3 lightFull = (gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz;
- vec3 lightHorizon = normalize(vec3(lightFull.x,lightFull.y, 0.0));
-
-
-
- // yprime is the distance of the vertex into sun direction
- yprime = -dot(relPos, lightHorizon);
-
- // this gets an altitude correction, higher terrain gets to see the sun earlier
- yprime_alt = yprime - sqrt(2.0 * EarthRadius * vertex_alt);
-
- // two times terminator width governs how quickly light fades into shadow
- // now the light-dimming factor
- earthShade = 0.6 * (1.0 - smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt)) + 0.4;
-
- // parametrized version of the Flightgear ground lighting function
- lightArg = (terminator-yprime_alt)/100000.0;
-
- // directional scattering for low sun
- if (lightArg < 10.0)
- {mie_angle = (0.5 * dot(normalize(relPos), normalize(lightFull)) ) + 0.5;}
- else
- {mie_angle = 1.0;}
-
-
-
-
- light_diffuse.b = light_func(lightArg, 1.330e-05, 0.264, 3.827, 1.08e-05, 1.0);
- light_diffuse.g = light_func(lightArg, 3.931e-06, 0.264, 3.827, 7.93e-06, 1.0);
- light_diffuse.r = light_func(lightArg, 8.305e-06, 0.161, 3.827, 3.04e-05, 1.0);
-
- light_diffuse = light_diffuse * scattering;
-
- light_ambient.r = light_func(lightArg, 0.236, 0.253, 1.073, 0.572, 0.33);
- light_ambient.g = light_ambient.r * 0.4/0.33;
- light_ambient.b = light_ambient.r * 0.5/0.33;
- light_ambient.a = 1.0;
-
-
-
-// correct ambient light intensity and hue before sunrise
-if (earthShade < 0.5)
- {
- //light_ambient = light_ambient * (0.7 + 0.3 * smoothstep(0.2, 0.5, earthShade));
- intensity = length(light_ambient.rgb);
-
- light_ambient.rgb = intensity * normalize(mix(light_ambient.xyz, shadedFogColor, 1.0 -smoothstep(0.4, 0.8,earthShade) ));
- light_ambient.rgb = light_ambient.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade));
-
- intensity = length(light_diffuse.xyz);
- light_diffuse.xyz = intensity * normalize(mix(light_diffuse.xyz, shadedFogColor, 1.0 -smoothstep(0.4, 0.7,earthShade) ));
- }
-
-
-// the haze gets the light at the altitude of the haze top if the vertex in view is below
-// but the light at the vertex if the vertex is above
-
-vertex_alt = max(vertex_alt,hazeLayerAltitude);
-
-if (vertex_alt > hazeLayerAltitude)
- {
- if (dist > 0.8 * avisibility)
- {
- vertex_alt = mix(vertex_alt, hazeLayerAltitude, smoothstep(0.8*avisibility, avisibility, dist));
- yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt);
- }
- }
-else
- {
- vertex_alt = hazeLayerAltitude;
- yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt);
- }
-
-}
-else // the faster, full-day version without lightfields
-{
- //vertex_alt = max(gl_Vertex.z,100.0);
-
- earthShade = 1.0;
- mie_angle = 1.0;
-
- if (terminator > 3000000.0)
- {light_diffuse = vec3 (1.0, 1.0, 1.0);
- light_ambient = vec4 (0.33, 0.4, 0.5, 0.0); }
- else
- {
-
- lightArg = (terminator/100000.0 - 10.0)/20.0;
- light_diffuse.b = 0.78 + lightArg * 0.21;
- light_diffuse.g = 0.907 + lightArg * 0.091;
- light_diffuse.r = 0.904 + lightArg * 0.092;
-
- light_ambient.b = 0.41 + lightArg * 0.08;
- light_ambient.g = 0.333 + lightArg * 0.06;
- light_ambient.r = 0.316 + lightArg * 0.016;
-
- }
-
- light_diffuse = light_diffuse * scattering;
- yprime_alt = -sqrt(2.0 * EarthRadius * hazeLayerAltitude);
-}
-
-
-// a sky/earth irradiation map model - the sky creates much more diffuse radiation than the ground, so
-// steep faces end up shaded more
-
-light_ambient = light_ambient * ((1.0+steepness)/2.0 * 1.2 + (1.0-steepness)/2.0 * 0.2);
-
-// deeper shadows when there is lots of direct light
-
-float shade_depth = 1.0 * smoothstep (0.6,0.95,ground_scattering) * (1.0-smoothstep(0.1,0.5,overcast)) * smoothstep(0.4,1.5,earthShade);
-
- light_ambient.rgb = light_ambient.rgb * (1.0 - shade_depth);
- light_diffuse.rgb = light_diffuse.rgb * (1.0 + 1.2 * shade_depth);
-
-if (use_IR_vision)
- {
- light_ambient.rgb = max(light_ambient.rgb, vec3 (0.5, 0.5, 0.5));
- }
-
-
-// default lighting based on texture and material using the light we have just computed
-
- gl_FrontColor = gl_Color;
- constantColor = gl_FrontMaterial.emission
- + gl_Color * (gl_LightModel.ambient + light_ambient);
-
-setupShadows(ecPosition);
-}
-
diff --git a/Shaders/urban.frag b/Shaders/urban.frag
deleted file mode 100644
index c4666d53a..000000000
--- a/Shaders/urban.frag
+++ /dev/null
@@ -1,258 +0,0 @@
-// -*- mode: C; -*-
-// Licence: GPL v2
-// Author: Frederic Bouvier.
-// Adapted from the paper by F. Policarpo et al. : Real-time Relief Mapping on Arbitrary Polygonal Surfaces
-// Adapted from the paper and sources by M. Drobot in GPU Pro : Quadtree Displacement Mapping with Height Blending
-
-#version 120
-
-#extension GL_ATI_shader_texture_lod : enable
-#extension GL_ARB_shader_texture_lod : enable
-
-#define TEXTURE_MIP_LEVELS 10
-#define TEXTURE_PIX_COUNT 1024 //pow(2,TEXTURE_MIP_LEVELS)
-#define BINARY_SEARCH_COUNT 10
-#define BILINEAR_SMOOTH_FACTOR 2.0
-
-varying vec4 rawpos;
-varying vec4 ecPosition;
-varying vec3 VNormal;
-varying vec3 VTangent;
-//varying vec3 VBinormal;
-varying vec3 Normal;
-varying vec4 constantColor;
-
-uniform sampler3D NoiseTex;
-uniform sampler2D BaseTex;
-uniform sampler2D NormalTex;
-uniform sampler2D QDMTex;
-uniform float depth_factor;
-uniform float tile_size;
-uniform float quality_level;
-uniform float snowlevel;
-uniform vec3 night_color;
-uniform bool random_buildings;
-uniform bool osm_buildings;
-
-const float scale = 1.0;
-int linear_search_steps = 10;
-int GlobalIterationCount = 0;
-int gIterationCap = 64;
-
-////fog "include" /////
-uniform int fogType;
-
-vec3 fog_Func(vec3 color, int type);
-//////////////////////
-
-float getShadowing();
-
-void QDM(inout vec3 p, inout vec3 v)
-{
- const int MAX_LEVEL = TEXTURE_MIP_LEVELS;
- const float NODE_COUNT = TEXTURE_PIX_COUNT;
- const float TEXEL_SPAN_HALF = 1.0 / NODE_COUNT / 2.0;
-
- float fDeltaNC = TEXEL_SPAN_HALF * depth_factor;
-
- vec3 p2 = p;
- float level = MAX_LEVEL;
- vec2 dirSign = (sign(v.xy) + 1.0) * 0.5;
- GlobalIterationCount = 0;
- float d = 0.0;
-
- while (level >= 0.0 && GlobalIterationCount < gIterationCap)
- {
- vec4 uv = vec4(p2.xyz, level);
- d = texture2DLod(QDMTex, uv.xy, uv.w).w;
-
- if (d > p2.z)
- {
- //predictive point of ray traversal
- vec3 tmpP2 = p + v * d;
-
- //current node count
- float nodeCount = pow(2.0, (MAX_LEVEL - level));
- //current and predictive node ID
- vec4 nodeID = floor(vec4(p2.xy, tmpP2.xy)*nodeCount);
-
- //check if we are crossing the current cell
- if (nodeID.x != nodeID.z || nodeID.y != nodeID.w)
- {
- //calculate distance to nearest bound
- vec2 a = p2.xy - p.xy;
- vec2 p3 = (nodeID.xy + dirSign) / nodeCount;
- vec2 b = p3.xy - p.xy;
-
- vec2 dNC = (b.xy * p2.z) / a.xy;
- //take the nearest cell
- d = min(d,min(dNC.x, dNC.y))+fDeltaNC;
-
- level++;
- }
- p2 = p + v * d;
- }
- level--;
- GlobalIterationCount++;
- }
-
- //
- // Manual Bilinear filtering
- //
- float rayLength = length(p2.xy - p.xy) + fDeltaNC;
-
- float dA = p2.z * (rayLength - BILINEAR_SMOOTH_FACTOR * TEXEL_SPAN_HALF) / rayLength;
- float dB = p2.z * (rayLength + BILINEAR_SMOOTH_FACTOR * TEXEL_SPAN_HALF) / rayLength;
-
- vec4 p2a = vec4(p + v * dA, 0.0);
- vec4 p2b = vec4(p + v * dB, 0.0);
- dA = texture2DLod(NormalTex, p2a.xy, p2a.w).w;
- dB = texture2DLod(NormalTex, p2b.xy, p2b.w).w;
-
- dA = abs(p2a.z - dA);
- dB = abs(p2b.z - dB);
-
- p2 = mix(p2a.xyz, p2b.xyz, dA / (dA + dB));
-
- p = p2;
-}
-
-float ray_intersect_QDM(vec2 dp, vec2 ds)
-{
- vec3 p = vec3( dp, 0.0 );
- vec3 v = vec3( ds, 1.0 );
- QDM( p, v );
- return p.z;
-}
-
-float ray_intersect_relief(vec2 dp, vec2 ds)
-{
- float size = 1.0 / float(linear_search_steps);
- float depth = 0.0;
- float best_depth = 1.0;
-
- for(int i = 0; i < linear_search_steps - 1; ++i)
- {
- depth += size;
- float t = step(0.95, texture2D(NormalTex, dp + ds * depth).a);
- if(best_depth > 0.996)
- if(depth >= t)
- best_depth = depth;
- }
- depth = best_depth;
-
- const int binary_search_steps = 5;
-
- for(int i = 0; i < binary_search_steps; ++i)
- {
- size *= 0.5;
- float t = step(0.95, texture2D(NormalTex, dp + ds * depth).a);
- if(depth >= t)
- {
- best_depth = depth;
- depth -= 2.0 * size;
- }
- depth += size;
- }
-
- return(best_depth);
-}
-
-float ray_intersect(vec2 dp, vec2 ds)
-{
- if (( random_buildings ) || (osm_buildings))
- {return 0.0;}
- else if ( quality_level >= 4.0 )
- {return ray_intersect_QDM( dp, ds );}
- else
- {return ray_intersect_relief( dp, ds );}
-}
-
-void main (void)
-{
- if ( quality_level >= 3.0 ) {
- linear_search_steps = 20;
- }
-
- float depthfactor = depth_factor;
- if (( random_buildings ) || (osm_buildings)) {depthfactor = 0.0;}
-
- vec3 normal = normalize(VNormal);
- vec3 tangent = normalize(VTangent);
- //vec3 binormal = normalize(VBinormal);
- vec3 binormal = normalize(cross(normal, tangent));
- vec3 ecPos3 = ecPosition.xyz / ecPosition.w;
- vec3 V = normalize(ecPos3);
- vec3 s = vec3(dot(V, tangent), dot(V, binormal), dot(normal, -V));
- vec2 ds = s.xy * depthfactor / s.z;
- vec2 dp = gl_TexCoord[0].st - ds;
- float d = ray_intersect(dp, ds);
-
- vec2 uv = dp + ds * d;
- vec3 N = texture2D(NormalTex, uv).xyz * 2.0 - 1.0;
-
-
- float emis = N.z;
- N.z = sqrt(1.0 - min(1.0,dot(N.xy, N.xy)));
- float Nz = N.z;
- N = normalize(N.x * tangent + N.y * binormal + N.z * normal);
-
- vec3 l = gl_LightSource[0].position.xyz;
- vec3 diffuse = gl_Color.rgb * max(0.0, dot(N, l));
- diffuse *= getShadowing();
- float shadow_factor = 1.0;
-
- // Shadow
- if ( quality_level >= 2.0 ) {
- dp += ds * d;
- vec3 sl = normalize( vec3( dot( l, tangent ), dot( l, binormal ), dot( -l, normal ) ) );
- ds = sl.xy * depthfactor / sl.z;
- dp -= ds * d;
- float dl = ray_intersect(dp, ds);
- if ( dl < d - 0.05 )
- shadow_factor = dot( constantColor.xyz, vec3( 1.0, 1.0, 1.0 ) ) * 0.25;
- }
- // end shadow
-
- vec4 ambient_light = constantColor + gl_LightSource[0].diffuse * vec4(diffuse, 1.0);
- float reflectance = ambient_light.r * 0.3 + ambient_light.g * 0.59 + ambient_light.b * 0.11;
- if ( shadow_factor < 1.0 )
- ambient_light = constantColor + gl_LightSource[0].diffuse * shadow_factor * vec4(diffuse, 1.0);
- float emission_factor = (1.0 - smoothstep(0.15, 0.25, reflectance)) * emis;
- vec4 tc = texture2D(BaseTex, uv);
- emission_factor *= 0.5*pow(tc.r+0.8*tc.g+0.2*tc.b, 2.0) -0.2;
- ambient_light += (emission_factor * vec4(night_color, 0.0));
-
- vec4 noisevec = texture3D(NoiseTex, (rawpos.xyz)*0.01*scale);
- vec4 nvL = texture3D(NoiseTex, (rawpos.xyz)*0.00066*scale);
-
- float n=0.06;
- n += nvL[0]*0.4;
- n += nvL[1]*0.6;
- n += nvL[2]*2.0;
- n += nvL[3]*4.0;
- n += noisevec[0]*0.1;
- n += noisevec[1]*0.4;
-
- n += noisevec[2]*0.8;
- n += noisevec[3]*2.1;
- n = mix(0.6, n, length(ecPosition.xyz) );
-
- vec4 finalColor = texture2D(BaseTex, uv);
- finalColor = mix(finalColor, clamp(n+nvL[2]*4.1+vec4(0.1, 0.1, nvL[2]*2.2, 1.0), 0.7, 1.0),
- step(0.8,Nz)*(1.0-emis)*smoothstep(snowlevel+300.0, snowlevel+360.0, (rawpos.z)+nvL[1]*3000.0));
- finalColor *= ambient_light;
-
- vec4 p = vec4( ecPos3 + tile_size * V * (d-1.0) * depthfactor / s.z, 1.0 );
-
- finalColor.rgb = fog_Func(finalColor.rgb, fogType);
- gl_FragColor = finalColor;
-
- if (dot(normal,-V) > 0.1) {
- vec4 iproj = gl_ProjectionMatrix * p;
- iproj /= iproj.w;
- gl_FragDepth = (iproj.z+1.0)/2.0;
- } else {
- gl_FragDepth = gl_FragCoord.z;
- }
-}
diff --git a/Shaders/urban.vert b/Shaders/urban.vert
deleted file mode 100644
index 52cb1068d..000000000
--- a/Shaders/urban.vert
+++ /dev/null
@@ -1,39 +0,0 @@
-// -*- mode: C; -*-
-// Licence: GPL v2
-// Author: Frederic Bouvier
-#version 120
-
-varying vec4 rawpos;
-varying vec4 ecPosition;
-varying vec3 VNormal;
-varying vec3 Normal;
-varying vec3 VTangent;
-varying vec3 VBinormal;
-varying vec4 constantColor;
-
-attribute vec3 tangent, binormal;
-
-////fog "include"////////
-// uniform int fogType;
-//
-// void fog_Func(int type);
-/////////////////////////
-
-void setupShadows(vec4 eyeSpacePos);
-
-void main(void)
-{
- rawpos = gl_Vertex;
- ecPosition = gl_ModelViewMatrix * gl_Vertex;
- VNormal = normalize(gl_NormalMatrix * gl_Normal);
- Normal = normalize(gl_Normal);
- VTangent = gl_NormalMatrix * tangent;
- VBinormal = gl_NormalMatrix * binormal;
- gl_FrontColor = gl_Color;
- constantColor = gl_FrontMaterial.emission
- + gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient);
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
-// fog_Func(fogType);
- setupShadows(ecPosition);
-}
diff --git a/Shaders/wake.vert b/Shaders/wake.vert
deleted file mode 100644
index d95ba57ec..000000000
--- a/Shaders/wake.vert
+++ /dev/null
@@ -1,70 +0,0 @@
-// This shader is mostly an adaptation of the shader found at
-// http://www.bonzaisoftware.com/water_tut.html and its glsl conversion
-// available at http://forum.bonzaisoftware.com/viewthread.php?tid=10
-// © Michael Horsch - 2005
-// Major update and revisions - 2011-10-07
-// © Emilian Huminiuc and Vivian Meazza
-// Optimisation - 2012-5-05
-// © Emilian Huminiuc and Vivian Meazza
-
-#version 120
-#define fps2kts 0.5925
-
-varying vec4 waterTex1;
-varying vec4 waterTex2;
-varying vec3 viewerdir;
-varying vec3 lightdir;
-varying vec3 normal;
-
-uniform float osg_SimulationTime;
-uniform float WindE, WindN, spd, hdg;
-
-/////////////////////////
-
-
-/////// functions /////////
-
-void relWind(out float rel_wind_speed_kts, float rel_wind_from_deg)
-{
- //calculate the carrier speed north and east in kts
- float speed_north_kts = cos(radians(hdg)) * spd ;
- float speed_east_kts = sin(radians(hdg)) * spd ;
-
- //calculate the relative wind speed north and east in kts
- float rel_wind_speed_from_east_kts = WindE*fps2kts + speed_east_kts;
- float rel_wind_speed_from_north_kts = WindN*fps2kts + speed_north_kts;
-
- //combine relative speeds north and east to get relative windspeed in kts
- rel_wind_speed_kts = sqrt((rel_wind_speed_from_east_kts * rel_wind_speed_from_east_kts) + (rel_wind_speed_from_north_kts * rel_wind_speed_from_north_kts));
-
- //calculate the relative wind direction
- rel_wind_from_deg = degrees(atan(rel_wind_speed_from_east_kts, rel_wind_speed_from_north_kts));
-}
-
-void main(void)
-{
-
- float relWindspd=0;
- float relWinddir=0;
- //compute relative wind speed and direction
- relWind (relWindspd, relWinddir);
-
- vec3 N = normalize(gl_Normal);
- normal = N;
-
- viewerdir = vec3(gl_ModelViewMatrixInverse[3]) - vec3(gl_Vertex);
- lightdir = normalize(vec3(gl_ModelViewMatrixInverse * gl_LightSource[0].position));
-
- vec4 t1 = vec4(osg_SimulationTime*0.005217, 0.0, 0.0, 0.0);
- vec4 t2 = vec4(osg_SimulationTime*-0.0012, 0.0, 0.0, 0.0);
-
- float windFactor = -relWindspd * 0.1;
-// float windFactor = sqrt(pow(abs(WindE),2)+pow(abs(WindN),2)) * 0.6;
-
- waterTex1 = gl_MultiTexCoord0 + t1 * windFactor;
- waterTex2 = gl_MultiTexCoord0 + t2 * windFactor;
-
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- gl_Position = ftransform();
-
-}
diff --git a/Shaders/water-inland.frag b/Shaders/water-inland.frag
deleted file mode 100644
index 09e12b654..000000000
--- a/Shaders/water-inland.frag
+++ /dev/null
@@ -1,134 +0,0 @@
-// This shader is mostly an adaptation of the shader found at
-// http://www.bonzaisoftware.com/water_tut.html and its glsl conversion
-// available at http://forum.bonzaisoftware.com/viewthread.php?tid=10
-// © Michael Horsch - 2005
-
-#version 120
-uniform sampler2D water_normalmap;
-uniform sampler2D water_reflection;
-uniform sampler2D water_dudvmap;
-uniform sampler2D water_reflection_grey;
-
-uniform float saturation;
-uniform float CloudCover0, CloudCover1, CloudCover2, CloudCover3, CloudCover4;
-
-varying vec4 waterTex1; //moving texcoords
-varying vec4 waterTex2; //moving texcoords
-varying vec4 waterTex4; //viewts
-//varying vec4 ecPosition;
-varying vec3 viewerdir;
-varying vec3 lightdir;
-varying vec3 normal;
-
-////fog "include" /////
-uniform int fogType;
-
-vec3 fog_Func(vec3 color, int type);
-//////////////////////
-
-void main(void)
-{
- const vec4 sca = vec4(0.005, 0.005, 0.005, 0.005);
- const vec4 sca2 = vec4(0.02, 0.02, 0.02, 0.02);
- const vec4 tscale = vec4(0.25, 0.25, 0.25, 0.25);
-
- // compute direction to viewer
- vec3 E = normalize(viewerdir);
-
- // compute direction to light source
- vec3 L = normalize(lightdir);
-
- // half vector
- vec3 H = normalize(L + E);
-
- const float water_shininess = 240.0;
-
- // approximate cloud cover
- float cover = 0.0;
- cover = min(min(min(min(CloudCover0, CloudCover1),CloudCover2),CloudCover3),CloudCover4);
-
- vec4 viewt = normalize(waterTex4);
-
- vec4 disdis = texture2D(water_dudvmap, vec2(waterTex2 * tscale)) * 2.0 - 1.0;
- vec4 dist = texture2D(water_dudvmap, vec2(waterTex1 + disdis*sca2)) * 2.0 - 1.0;
- vec4 fdist = normalize(dist);
- fdist *= sca;
-
- //normalmap
- vec4 nmap0 = texture2D(water_normalmap, vec2(waterTex1+ disdis*sca2)) * 2.0 - 1.0;
- vec4 nmap2 = texture2D(water_normalmap, vec2(waterTex2 * tscale)) * 2.0 - 1.0;
- vec4 vNorm = normalize(nmap0 + nmap2);
-
- //load reflection
- vec4 tmp = vec4(lightdir, 0.0);
- vec4 refTex;
- vec4 baseTex;
- vec4 greyTex;
- vec4 refl;
- vec4 base;
- vec4 grey;
-
- baseTex = texture2D(water_reflection, vec2(tmp));
- base = normalize(baseTex);
- greyTex = texture2D(water_reflection_grey, vec2(tmp));
- grey = normalize(greyTex);
-
- //cover = 3;
-
- if(cover >= 1.5){
- refl = mix(base, grey, 0.35);
- refl.r *= (0.93);
- refl.g *= (0.95);
- refl.b *= (1.0);
- refl.a *= 1.0;
-
- } else {
- refl = mix(base, grey, 0.45);
- refl.r *= (0.70 + 0.15 * cover);
- refl.g *= (0.80 + 0.15 * cover);
- refl.b *= (0.85 + 0.125 * cover);
- refl.a *= 1.0;
- }
-
- vec3 N0 = vec3(texture2D(water_normalmap, vec2(waterTex1+ disdis*sca2)) * 2.0 - 1.0);
- vec3 N1 = vec3(texture2D(water_normalmap, vec2(waterTex2 * tscale)) * 2.0 - 1.0);
- vec3 N = normalize(normal+N0+N1);
-
- // specular
- vec3 specular_color = vec3(gl_LightSource[0].diffuse)
- * pow(max(0.0, dot(N, H)), water_shininess) * 6.0;
- vec4 specular = vec4(specular_color, 0.5);
- specular = specular * saturation;
-
- //calculate fresnel
- vec4 invfres = vec4( dot(vNorm, viewt) );
- vec4 fres = vec4(1.0) + invfres;
- refl *= fres;
-
- //calculate the fog factor
-// float fogFactor;
-// float fogCoord = ecPosition.z;
-// const float LOG2 = 1.442695;
-// fogFactor = exp2(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord * LOG2);
-//
-// if(gl_Fog.density == 1.0)
-// fogFactor=1.0;
-
- //calculate final colour
- vec4 ambient_light = gl_LightSource[0].diffuse;
- vec4 finalColor;
-
- //cover = 3;
-
- if(cover >= 1.5){
- finalColor = refl + specular;
- } else {
- finalColor = refl;
- }
-
- finalColor *= ambient_light;
-
-// gl_FragColor = mix(gl_Fog.color, finalColor, fogFactor);
- finalColor.rgb = fog_Func(finalColor.rgb, fogType);
- gl_FragColor = finalColor;
-}
diff --git a/Shaders/water-orig.frag b/Shaders/water-orig.frag
deleted file mode 100644
index 4262ac1c2..000000000
--- a/Shaders/water-orig.frag
+++ /dev/null
@@ -1,93 +0,0 @@
-#version 120
-
-varying vec4 rawpos;
-varying vec4 ecPosition;
-varying vec3 VNormal;
-varying vec3 Normal;
-varying vec3 lightVec;
-
-uniform sampler3D NoiseTex;
-uniform float osg_SimulationTime;
-
-//const float scale = 1.0;
-////fog "include" /////
-uniform int fogType;
-
-vec3 fog_Func(vec3 color, int type);
-//////////////////////
-
-void main (void)
-{
- vec4 noisevecS = texture3D(NoiseTex, (rawpos.xyz)*0.0126);
- vec4 nvLS = texture3D(NoiseTex, (rawpos.xyz)*-0.0003323417);
-
- vec4 noisevec = texture3D(NoiseTex, (rawpos.xyz)*0.00423+vec3(0.0,0.0,osg_SimulationTime*0.035217));
- vec4 nvL = texture3D(NoiseTex, (rawpos.xyz)*0.001223417+(0.0,0.0,osg_SimulationTime*-0.0212));
-
-// float fogFactor;
-// if (gl_Fog.density == 1.0)
-// {
-// fogFactor=1.0;
-// }
-// else
-// {
-// float fogCoord = ecPosition.z;
-// const float LOG2 = 1.442695;
-// fogFactor = exp2(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord * LOG2);
-// fogFactor = clamp(fogFactor, 0.0, 1.0);
-// }
-
- float a=1.0;
- float n=0.00;
- n += nvLS[0]*a;
- a/=2.0;
- n += nvLS[1]*a;
- a/=2.0;
- n += nvLS[2]*a;
- a/=2.0;
- n += nvLS[3]*a;
-
- a=4.0;
- float na=n;
- na += nvL[0]*1.1;
- a*=1.2;
- na += nvL[1]*a;
- a*=1.2;
- na += nvL[2]*a;
- a*=1.2;
- na += nvL[3]*a;
- a=2.0;
- na += noisevec[0]*a*0.2;
- a*=1.2;
- na += noisevec[1]*a;
- a*=1.2;
- na += noisevec[2]*a;
- a*=1.2;
- na += noisevec[3]*a;
-
- vec4 c1;
- c1 = asin(vec4(smoothstep(0.0, 2.2, n), smoothstep(-0.1, 2.10, n), smoothstep(-0.2, 2.0, n), 1.0));
-
- vec3 Eye = normalize(-ecPosition.xyz);
- vec3 Reflected = normalize(reflect(-normalize(lightVec), normalize(VNormal+vec3(0.0,0.0,na*0.10-0.24))));
-
- vec3 bump = normalize(VNormal+vec3(0.0, 0.0, na)-0.9);
- vec3 bumped = max(normalize(refract(lightVec, normalize(bump), 0.16)), 0.0);
-
- vec4 ambientColor = gl_LightSource[0].ambient;
- vec4 light = ambientColor;
- c1 *= light;
-
- float bumpFact = (bumped.r+bumped.g+bumped.b);
- float ReflectedEye = max(dot(Reflected, Eye), 0.0);
- float eyeFact = pow(ReflectedEye, 20.0);
- c1 += 0.3 * gl_LightSource[0].diffuse * (1.0-eyeFact) * bumpFact*bumpFact;
- c1 += 0.4 * gl_LightSource[0].diffuse * eyeFact * 3.0*bumpFact;
- eyeFact = pow(eyeFact, 20.0);
- c1 += gl_LightSource[0].specular * eyeFact * 4.0*bumpFact;
-
- vec4 finalColor = c1;
-// gl_FragColor = mix(gl_Fog.color, finalColor, fogFactor);
- finalColor.rgb = fog_Func(finalColor.rgb, fogType);
- gl_FragColor = finalColor;
-}
diff --git a/Shaders/water-orig.vert b/Shaders/water-orig.vert
deleted file mode 100644
index a191481ba..000000000
--- a/Shaders/water-orig.vert
+++ /dev/null
@@ -1,17 +0,0 @@
-#version 120
-
-varying vec4 rawpos;
-varying vec4 ecPosition;
-varying vec3 VNormal;
-varying vec3 Normal;
-varying vec3 lightVec;
-
-void main(void)
-{
- rawpos = gl_Vertex;
- ecPosition = gl_ModelViewMatrix * gl_Vertex;
- VNormal = normalize(gl_NormalMatrix * gl_Normal);
- Normal = normalize(gl_Normal);
- lightVec = normalize(gl_LightSource[0].position.xyz/* - ecPosition*/);
- gl_Position = ftransform();
-}
diff --git a/Shaders/water.frag b/Shaders/water.frag
deleted file mode 100644
index dfd7f5746..000000000
--- a/Shaders/water.frag
+++ /dev/null
@@ -1,222 +0,0 @@
-// This shader is mostly an adaptation of the shader found at
-// http://www.bonzaisoftware.com/water_tut.html and its glsl conversion
-// available at http://forum.bonzaisoftware.com/viewthread.php?tid=10
-// © Michael Horsch - 2005
-// Major update and revisions - 2011-10-07
-// © Emilian Huminiuc and Vivian Meazza
-// Optimisation - 2012-5-05
-// Based on ideas by Thorsten Renk
-// © Emilian Huminiuc and Vivian Meazza
-
-#version 120
-
-uniform sampler2D perlin_normalmap;
-uniform sampler2D sea_foam;
-uniform sampler2D water_dudvmap;
-uniform sampler2D water_normalmap;
-uniform sampler2D water_reflection;
-uniform sampler2D water_reflection_grey;
-
-uniform float CloudCover0;
-uniform float CloudCover1;
-uniform float CloudCover2;
-uniform float CloudCover3;
-uniform float CloudCover4;
-uniform float Overcast;
-uniform float WaveAmp;
-uniform float WaveFreq;
-uniform float WaveSharp;
-uniform float WindE;
-uniform float WindN;
-uniform float normalmap_dds;
-uniform float osg_SimulationTime;
-uniform float saturation;
-
-uniform int Status;
-
-varying vec3 lightdir;
-varying vec3 normal;
-varying vec3 viewerdir;
-varying vec4 waterTex1; //moving texcoords
-varying vec4 waterTex2; //moving texcoords
-
-
-////fog "include" /////
-uniform int fogType;
-
-vec3 fog_Func(vec3 color, int type);
-//////////////////////
-
-/////// functions /////////
-
-void rotationmatrix(in float angle, out mat4 rotmat)
- {
- rotmat = mat4( cos( angle ), -sin( angle ), 0.0, 0.0,
- sin( angle ), cos( angle ), 0.0, 0.0,
- 0.0 , 0.0 , 1.0, 0.0,
- 0.0 , 0.0 , 0.0, 1.0 );
- }
-
-void main(void)
- {
- const vec4 sca = vec4(0.005, 0.005, 0.005, 0.005);
- const vec4 sca2 = vec4(0.02, 0.02, 0.02, 0.02);
- const vec4 tscale = vec4(0.25, 0.25, 0.25, 0.25);
-
- mat4 RotationMatrix;
- // compute direction to viewer
- vec3 E = normalize(viewerdir);
-
- // compute direction to light source
- vec3 L = normalize(lightdir);
-
- // half vector
- vec3 H = normalize(L + E);
-
- vec3 Normal = normalize(normal);
-
- const float water_shininess = 240.0;
-
- // approximate cloud cover
- float cover = 0.0;
- //bool Status = true;
-
-
- float windEffect = sqrt( WindE*WindE + WindN*WindN ) * 0.6; //wind speed in kt
- float windScale = 15.0/(3.0 + windEffect); //wave scale
- float windEffect_low = 0.3 + 0.7 * smoothstep(0.0, 5.0, windEffect); //low windspeed wave filter
- float waveRoughness = 0.05 + smoothstep(0.0, 20.0, windEffect); //wave roughness filter
-
- float mixFactor = 0.75 - 0.15 * smoothstep(0.0, 40.0, windEffect);
- mixFactor = clamp(mixFactor, 0.3, 0.8);
-
- if (Status == 1){
- cover = min(min(min(min(CloudCover0, CloudCover1),CloudCover2),CloudCover3),CloudCover4);
- } else {
- // hack to allow for Overcast not to be set by Local Weather
- if (Overcast == 0.0){
- cover = 5.0;
- } else {
- cover = Overcast * 5.0;
- }
- }
-
- vec4 viewt = vec4(-E, 0.0) * 0.6;
-
- vec4 disdis = texture2D(water_dudvmap, vec2(waterTex2 * tscale)* windScale) * 2.0 - 1.0;
-
- vec4 dist = texture2D(water_dudvmap, vec2(waterTex1 + disdis*sca2)* windScale) * 2.0 - 1.0;
- dist *= (0.6 + 0.5 * smoothstep(0.0, 15.0, windEffect));
- vec4 fdist = normalize(dist);
- if (normalmap_dds > 0)
- fdist = -fdist; //dds fix
- fdist *= sca;
-
- //normalmaps
- rotationmatrix(radians(3.0 * windScale + 0.6 * sin(waterTex1.s * 0.2)), RotationMatrix);
- vec4 nmap = texture2D(water_normalmap, vec2(waterTex1* RotationMatrix + disdis * sca2) * windScale) * 2.0 - 1.0;
- vec4 nmap1 = texture2D(perlin_normalmap, vec2(waterTex1/** RotationMatrix*/ + disdis * sca2) * windScale) * 2.0 - 1.0;
-
- rotationmatrix(radians(-2.0 * windScale -0.4 * sin(waterTex1.s * 0.32)), RotationMatrix);
- nmap += texture2D(water_normalmap, vec2(waterTex1* RotationMatrix + disdis * sca2) * windScale * 1.5) * 2.0 - 1.0;
- //nmap1 += texture2D(perlin_normalmap, vec2(waterTex1* RotationMatrix + disdis * sca2) * windScale) * 2.0 - 1.0;
- rotationmatrix(radians(1.5 * windScale + 0.3 * sin(waterTex1.s * 0.16)), RotationMatrix);
- nmap += texture2D(water_normalmap, vec2(waterTex1* RotationMatrix + disdis * sca2) * windScale * 2.1) * 2.0 - 1.0;
- rotationmatrix(radians(-0.5 * windScale - 0.45 * sin(waterTex1.s * 0.28)), RotationMatrix);
- nmap += texture2D(water_normalmap, vec2(waterTex1* RotationMatrix + disdis * sca2) * windScale * 0.8) * 2.0 - 1.0;
-
- rotationmatrix(radians(-1.2 * windScale - 0.35 * sin(waterTex1.s * 0.28)), RotationMatrix);
- nmap += texture2D(water_normalmap, vec2(waterTex2 * RotationMatrix* tscale) * windScale * 1.7) * 2.0 - 1.0;
- nmap1 += texture2D(perlin_normalmap, vec2(waterTex2/** RotationMatrix*/ * tscale) * windScale) * 2.0 - 1.0;
-
- nmap *= windEffect_low;
- nmap1 *= windEffect_low;
- // mix water and noise, modulated by factor
- vec4 vNorm = normalize(mix(nmap, nmap1, mixFactor) * waveRoughness);
- if (normalmap_dds > 0)
- vNorm = -vNorm; //dds fix
-
- //load reflection
- vec4 tmp = vec4(lightdir, 0.0);
- vec4 refTex = texture2D(water_reflection, vec2(tmp + waterTex1) * 32.0) ;
- vec4 refTexGrey = texture2D(water_reflection_grey, vec2(tmp + waterTex1) * 32.0) ;
- vec4 refl ;
-
- // cover = 0;
-
- if(cover >= 1.5){
- refl = normalize(refTex);
- refl.a = 1.0;
- }
- else
- {
- refl = normalize(refTexGrey);
- refl.r *= (0.75 + 0.15 * cover);
- refl.g *= (0.80 + 0.15 * cover);
- refl.b *= (0.875 + 0.125 * cover);
- refl.a = 1.0;
- }
-
- rotationmatrix(radians(2.1* windScale + 0.25 * sin(waterTex1.s *0.14)), RotationMatrix);
- vec3 N0 = vec3(texture2D(water_normalmap, vec2(waterTex1* RotationMatrix + disdis * sca2) * windScale * 1.15) * 2.0 - 1.0);
- vec3 N1 = vec3(texture2D(perlin_normalmap, vec2(waterTex1/** RotationMatrix*/ + disdis * sca) * windScale) * 2.0 - 1.0);
-
- rotationmatrix(radians(-1.5 * windScale -0.32 * sin(waterTex1.s *0.24)), RotationMatrix);
- N0 += vec3(texture2D(water_normalmap, vec2(waterTex2* RotationMatrix * tscale) * windScale * 1.8) * 2.0 - 1.0);
- N1 += vec3(texture2D(perlin_normalmap, vec2(waterTex2/** RotationMatrix*/ * tscale) * windScale) * 2.0 - 1.0);
-
- rotationmatrix(radians(3.8 * windScale + 0.45 * sin(waterTex1.s *0.32)), RotationMatrix);
- N0 += vec3(texture2D(water_normalmap, vec2(waterTex2 * RotationMatrix * (tscale + sca2)) * windScale * 0.85) * 2.0 - 1.0);
- N1 += vec3(texture2D(perlin_normalmap, vec2(waterTex2/** RotationMatrix*/ * (tscale + sca2)) * windScale) * 2.0 - 1.0);
-
- rotationmatrix(radians(-2.8 * windScale - 0.38 * sin(waterTex1.s * 0.26)), RotationMatrix);
- N0 += vec3(texture2D(water_normalmap, vec2(waterTex1 * RotationMatrix + disdis * sca2) * windScale * 2.1) * 2.0 - 1.0);
- N1 += vec3(texture2D(perlin_normalmap, vec2(waterTex1 /** RotationMatrix*/ + disdis * sca) * windScale) * 2.0 - 1.0);
-
- N0 *= windEffect_low;
- N1 *= windEffect_low;
-
- vec3 N = normalize(mix(Normal + N0, Normal + N1, mixFactor) * waveRoughness);
-
- if (normalmap_dds > 0)
- N = -N; //dds fix
-
- // specular
- vec3 specular_color = vec3(gl_LightSource[0].diffuse)
- * pow(max(0.0, dot(N, H)), water_shininess) * 6.0;
- vec4 specular = vec4(specular_color, 0.5);
-
- specular = specular * saturation * 0.3 ;
-
- //calculate fresnel
- vec4 invfres = vec4( dot(vNorm, viewt) );
- vec4 fres = vec4(1.0) + invfres;
- refl *= fres;
-
- //calculate final colour
- vec4 ambient_light = gl_LightSource[0].diffuse;
- vec4 finalColor;
-
- if(cover >= 1.5){
- finalColor = refl + specular;
- } else {
- finalColor = refl;
- }
-
- float foamSlope = 0.10 + 0.1 * windScale;
-
- vec4 foam_texel = texture2D(sea_foam, vec2(waterTex2 * tscale) * 25.0);
- float waveSlope = N.g;
-
- if (windEffect >= 8.0)
- if (waveSlope >= foamSlope){
- finalColor = mix(finalColor, max(finalColor, finalColor + foam_texel), smoothstep(0.01, 0.50, N.g));
- }
-
-
- finalColor *= ambient_light;
-
- //gl_FragColor = mix(gl_Fog.color, finalColor, fogFactor);
- finalColor.rgb = fog_Func(finalColor.rgb, fogType);
- gl_FragColor = finalColor;
- }
diff --git a/Shaders/water.vert b/Shaders/water.vert
deleted file mode 100644
index 40f49be78..000000000
--- a/Shaders/water.vert
+++ /dev/null
@@ -1,112 +0,0 @@
-// This shader is mostly an adaptation of the shader found at
-// http://www.bonzaisoftware.com/water_tut.html and its glsl conversion
-// available at http://forum.bonzaisoftware.com/viewthread.php?tid=10
-// Michael Horsch - 2005
-// Major update and revisions - 2011-10-07
-// Emilian Huminiuc and Vivian Meazza
-
-#version 120
-
-varying vec4 waterTex1;
-varying vec4 waterTex2;
-
-varying vec3 viewerdir;
-varying vec3 lightdir;
-varying vec3 normal;
-
-varying vec3 WorldPos;
-varying vec2 TopoUV;
-
-uniform float osg_SimulationTime;
-uniform mat4 osg_ViewMatrixInverse;
-uniform float WindE, WindN;
-
-// constants for the cartezian to geodetic conversion.
-
-const float a = 6378137.0; //float a = equRad;
-const float squash = 0.9966471893352525192801545;
-const float latAdjust = 0.9999074159800018; //geotiff source for the depth map
-const float lonAdjust = 0.9999537058469516; //actual extents: +-180.008333333333326/+-90.008333333333340
-
-/////// functions /////////
-
-void rotationmatrix(in float angle, out mat4 rotmat)
- {
- rotmat = mat4( cos( angle ), -sin( angle ), 0.0, 0.0,
- sin( angle ), cos( angle ), 0.0, 0.0,
- 0.0 , 0.0 , 1.0, 0.0,
- 0.0 , 0.0 , 0.0, 1.0 );
- }
-
-void main(void)
- {
- mat4 RotationMatrix;
- normal = normalize(gl_Normal);
- viewerdir = vec3(gl_ModelViewMatrixInverse[3]) - vec3(gl_Vertex);
- lightdir = normalize(vec3(gl_ModelViewMatrixInverse * gl_LightSource[0].position));
-
- vec4 t1 = vec4(0.0, osg_SimulationTime * 0.005217, 0.0, 0.0);
- vec4 t2 = vec4(0.0, osg_SimulationTime * -0.0012, 0.0, 0.0);
-
- float Angle;
-
- float windFactor = sqrt(WindE * WindE + WindN * WindN) * 0.05;
-
- if (WindN == 0.0 && WindE == 0.0) {
- Angle = 0.0;
- }else{
- Angle = atan(-WindN, WindE) - atan(1.0);
- }
-
- rotationmatrix(Angle, RotationMatrix);
- waterTex1 = gl_MultiTexCoord0 * RotationMatrix - t1 * windFactor;
-
- rotationmatrix(Angle, RotationMatrix);
- waterTex2 = gl_MultiTexCoord0 * RotationMatrix - t2 * windFactor;
-
- // fog_Func(fogType);
- WorldPos = (osg_ViewMatrixInverse *gl_ModelViewMatrix * gl_Vertex).xyz;
-
-
- ///FIXME: convert cartezian coordinates to geodetic, this
- ///FIXME: duplicates parts of code in SGGeodesy.cxx
- ////////////////////////////////////////////////////////////////////////////
-
- float e2 = abs(1.0 - squash * squash);
- float ra2 = 1.0/(a * a);
- float e4 = e2 * e2;
- float XXpYY = WorldPos.x * WorldPos.x + WorldPos.y * WorldPos.y;
- float Z = WorldPos.z;
- float sqrtXXpYY = sqrt(XXpYY);
- float p = XXpYY * ra2;
- float q = Z*Z*(1.0-e2)*ra2;
- float r = 1.0/6.0*(p + q - e4);
- float s = e4 * p * q/(4.0*r*r*r);
- if ( s >= 2.0 && s <= 0.0)
- s = 0.0;
- float t = pow(1.0+s+sqrt(s*2.0+s*s), 1.0/3.0);
- float u = r + r*t + r/t;
- float v = sqrt(u*u + e4*q);
- float w = (e2*u+ e2*v-e2*q)/(2.0*v);
- float k = sqrt(u+v+w*w)-w;
- float D = k*sqrtXXpYY/(k+e2);
-
- vec2 NormPosXY = normalize(WorldPos.xy);
- vec2 NormPosXZ = normalize(vec2(D, WorldPos.z));
- float signS = sign(WorldPos.y);
- if (-0.00015 <= WorldPos.y && WorldPos.y<=.00015)
- signS = 1.0;
- float signT = sign(WorldPos.z);
- if (-0.0002 <= WorldPos.z && WorldPos.z<=.0002)
- signT = 1.0;
- float cosLon = dot(NormPosXY, vec2(1.0,0.0));
- float cosLat = dot(abs(NormPosXZ), vec2(1.0,0.0));
- TopoUV.s = signS * lonAdjust * degrees(acos(cosLon))/180.;
- TopoUV.t = signT * latAdjust * degrees(acos(cosLat))/90.;
- TopoUV.s = TopoUV.s * 0.5 + 0.5;
- TopoUV.t = TopoUV.t * 0.5 + 0.5;
-
- //FIXME end/////////////////////////////////////////////////////////////////
-
- gl_Position = ftransform();
- }
\ No newline at end of file
diff --git a/Shaders/water_sine.frag b/Shaders/water_sine.frag
deleted file mode 100644
index 96538b557..000000000
--- a/Shaders/water_sine.frag
+++ /dev/null
@@ -1,391 +0,0 @@
-// FRAGMENT SHADER
-// This shader is mostly an adaptation of the shader found at
-// http://www.bonzaisoftware.com/water_tut.html and its glsl conversion
-// available at http://forum.bonzaisoftware.com/viewthread.php?tid=10
-// ©Michael Horsch - 2005
-// Major update and revisions - 2011-10-07
-// ©Emilian Huminiuc and Vivian Meazza
-// Optimisation - 2012-5-05
-// Based on ideas by Thorsten Renk
-// ©Emilian Huminiuc and Vivian Meazza
-
-#version 120
-
-varying vec2 TopoUV;
-varying vec3 WorldPos;
-varying vec3 lightdir;
-varying vec3 normal;
-varying vec3 viewerdir;
-varying vec4 waterTex1; //moving texcoords
-varying vec4 waterTex2; //moving texcoords
-
-uniform sampler2D perlin_normalmap;
-uniform sampler2D sea_foam;
-uniform sampler2D topo_map;
-uniform sampler2D water_dudvmap;
-uniform sampler2D water_normalmap;
-uniform sampler2D water_reflection;
-uniform sampler2D water_reflection_grey;
-uniform sampler3D Noise;
-
-uniform float CloudCover0;
-uniform float CloudCover1;
-uniform float CloudCover2;
-uniform float CloudCover3;
-uniform float CloudCover4;
-uniform float Overcast;
-uniform float WindE;
-uniform float WindN;
-uniform float osg_SimulationTime;
-uniform float saturation;
-uniform int Status;
-
-uniform float WaveAmp;
-uniform float WaveAngle;
-uniform float WaveDAngle;
-uniform float WaveFactor;
-uniform float WaveFreq;
-uniform float WaveSharp;
-uniform float normalmap_dds;
-
-////fog "include" /////
-uniform int fogType;
-
-vec3 fog_Func(vec3 color, int type);
-//////////////////////
-
-const vec4 AllOnes = vec4(1.0);
-const vec4 sca = vec4(0.005, 0.005, 0.005, 0.005);
-const vec4 sca2 = vec4(0.02, 0.02, 0.02, 0.02);
-const vec4 tscale = vec4(0.25, 0.25, 0.25, 0.25);
-const float water_shininess = 240.0;
-
-/////// functions /////////
-
-void rotationmatrix(in float angle, out mat4 rotmat)
-{
- rotmat = mat4( cos( angle ), -sin( angle ), 0.0, 0.0,
- sin( angle ), cos( angle ), 0.0, 0.0,
- 0.0 , 0.0 , 1.0, 0.0,
- 0.0 , 0.0 , 0.0, 1.0 );
-}
-
-// wave functions ///////////////////////
-
-struct Wave {
- float freq; // 2*PI / wavelength
- float amp; // amplitude
- float phase; // speed * 2*PI / wavelength
- vec2 dir;
-};
-
-Wave wave0 = Wave(1.0, 1.0, 0.5, vec2(0.97, 0.25));
-Wave wave1 = Wave(2.0, 0.5, 1.3, vec2(0.97, -0.25));
-Wave wave2 = Wave(1.0, 1.0, 0.6, vec2(0.95, -0.3));
-Wave wave3 = Wave(2.0, 0.5, 1.4, vec2(0.99, 0.1));
-
-float evaluateWave(in Wave w, vec2 pos, float t)
-{
- return w.amp * sin( dot(w.dir, pos) * w.freq + t * w.phase);
-}
-
-// derivative of wave function
-float evaluateWaveDeriv(Wave w, vec2 pos, float t)
-{
- return w.freq * w.amp * cos( dot(w.dir, pos)*w.freq + t*w.phase);
-}
-
-// sharp wave functions
-float evaluateWaveSharp(Wave w, vec2 pos, float t, float k)
-{
- return w.amp * pow(sin( dot(w.dir, pos)*w.freq + t*w.phase)* 0.5 + 0.5 , k);
-}
-
-float evaluateWaveDerivSharp(Wave w, vec2 pos, float t, float k)
-{
- return k*w.freq*w.amp * pow(sin( dot(w.dir, pos)*w.freq + t*w.phase)* 0.5 + 0.5 , k - 1.0) * cos( dot(w.dir, pos)*w.freq + t*w.phase);
-}
-
-void sumWaves(float angle, float dangle, float windScale, float factor, out float ddx, out float ddy)
-{
- mat4 RotationMatrix;
- float deriv;
- vec4 P = waterTex1 * 1024.0;
-
- rotationmatrix(radians(angle + dangle * windScale + 0.6 * sin(P.x * factor)), RotationMatrix);
- P *= RotationMatrix;
-
- P.y += evaluateWave(wave0, P.xz, osg_SimulationTime);
- deriv = evaluateWaveDeriv(wave0, P.xz, osg_SimulationTime );
- ddx = deriv * wave0.dir.x;
- ddy = deriv * wave0.dir.y;
-
- P.y += evaluateWave(wave1, P.xz, osg_SimulationTime);
- deriv = evaluateWaveDeriv(wave1, P.xz, osg_SimulationTime);
- ddx += deriv * wave1.dir.x;
- ddy += deriv * wave1.dir.y;
-
- P.y += evaluateWaveSharp(wave2, P.xz, osg_SimulationTime, WaveSharp);
- deriv = evaluateWaveDerivSharp(wave2, P.xz, osg_SimulationTime, WaveSharp);
- ddx += deriv * wave2.dir.x;
- ddy += deriv * wave2.dir.y;
-
- P.y += evaluateWaveSharp(wave3, P.xz, osg_SimulationTime, WaveSharp);
- deriv = evaluateWaveDerivSharp(wave3, P.xz, osg_SimulationTime, WaveSharp);
- ddx += deriv * wave3.dir.x;
- ddy += deriv * wave3.dir.y;
-}
-
-void main(void)
-{
- mat4 RotationMatrix;
-
- // compute direction to viewer
- vec3 E = normalize(viewerdir);
-
- // compute direction to light source
- vec3 L = normalize(lightdir);
-
- // half vector
- vec3 H = normalize(L + E);
-
- vec3 Normal = normalize(normal);
-
- // approximate cloud cover
- float cover = 0.0;
- //bool Status = true;
-
-// try some aliasing fix for low angles
-// float viewAngle = smoothstep(0.0,0.5,abs(dot(E,Normal)));
-
- // Global bathymetry texture
- vec4 topoTexel = texture2D(topo_map, TopoUV);
- vec4 mixNoise = texture3D(Noise, WorldPos.xyz * 0.00005);
- vec4 mixNoise1 = texture3D(Noise, WorldPos.xyz * 0.00008);
- float mixNoiseFactor = mixNoise.r * mixNoise.g * mixNoise.b;
- float mixNoise1Factor = mixNoise1.r * mixNoise1.g * mixNoise1.b;
- mixNoiseFactor *= 300.0;
- mixNoise1Factor *= 300.0;
- mixNoiseFactor = 0.8 + 0.2 * smoothstep(0.0,1.0, mixNoiseFactor)* smoothstep(0.0,1.0, mixNoise1Factor);
- float floorMixFactor = smoothstep(0.3, 0.985, topoTexel.a * mixNoiseFactor);
- vec3 floorColour = mix(topoTexel.rgb, mixNoise.rgb * mixNoise1.rgb, 0.3);
-
- float windFloorFactor = 1.0 + 0.5 * smoothstep(0.8, 0.985, topoTexel.a);
- float windEffect = sqrt( WindE*WindE + WindN*WindN ) * 0.6; //wind speed in kt
- float windFloorEffect = windEffect * windFloorFactor;
- float windScale = 15.0/(3.0 + windEffect); //wave scale
- float windEffect_low = 0.3 + 0.7 * smoothstep(0.0, 5.0, windEffect); //low windspeed wave filter
- float waveRoughness = 0.01 + smoothstep(0.0, 40.0, windEffect); //wave roughness filter
-
- float mixFactor = 0.2 + 0.02 * smoothstep(0.0, 50.0, windFloorEffect);
- mixFactor = clamp(mixFactor, 0.3, 0.95);
-
- // sine waves
- //
- // Test data
- // float WaveFreq =1.0;
- // float WaveAmp = 1000.0;
- // float WaveSharp = 10.0;
-
- vec4 ddxVec = vec4(0.0);
- vec4 ddyVec = vec4(0.0);
-
- float ddx = 0.0, ddy = 0.0;
- float ddx1 = 0.0, ddy1 = 0.0;
- float ddx2 = 0.0, ddy2 = 0.0;
- float ddx3 = 0.0, ddy3 = 0.0;
- float waveamp;
-
- float angle = 0.0;
- float WaveAmpFromDepth = WaveAmp * windFloorFactor;
- float phaseFloorFactor = 1.0 - 0.2 * smoothstep(0.8, 0.9, topoTexel.a);
- wave0.freq = WaveFreq; // * (smoothstep(0.8, 0.9, topoTexel.a)*1.5 + 0.25);
- wave0.amp = WaveAmpFromDepth;
- wave0.dir = vec2(cos(radians(angle)), sin(radians(angle)));
- wave0.phase *= phaseFloorFactor;
-
- angle -= 45.0;
- wave1.freq = WaveFreq * 2.0 ;
- wave1.amp = WaveAmpFromDepth * 1.25;
- wave1.dir = vec2(cos(radians(angle)), sin(radians(angle)));
- wave1.phase *= phaseFloorFactor;
-
- angle += 30.0;
- wave2.freq = WaveFreq * 3.5;
- wave2.amp = WaveAmpFromDepth * 0.75;
- wave2.dir = vec2(cos(radians(angle)), sin(radians(angle)));
- wave2.phase *= phaseFloorFactor;
-
- angle -= 50.0;
- wave3.freq = WaveFreq * 3.0 ;
- wave3.amp = WaveAmpFromDepth * 0.75;
- wave3.dir = vec2(cos(radians(angle)), sin(radians(angle)));
- wave3.phase *= phaseFloorFactor;
-
- // sum waves
- ddx = 0.0, ddy = 0.0;
- sumWaves(WaveAngle, -1.5, windScale, WaveFactor, ddx, ddy);
-
- ddx1 = 0.0, ddy1 = 0.0;
- sumWaves(WaveAngle, 1.5, windScale, WaveFactor, ddx1, ddy1);
-
- //reset the waves
- angle = 0.0;
- waveamp = WaveAmpFromDepth * 0.75;
-
- wave0.freq = WaveFreq ;
- wave0.amp = waveamp;
- wave0.dir = vec2(cos(radians(angle)), sin(radians(angle)));
-
- angle -= 20.0;
- wave1.freq = WaveFreq * 2.0 ;
- wave1.amp = waveamp * 1.25;
- wave1.dir = vec2(cos(radians(angle)), sin(radians(angle)));
-
- angle += 35.0;
- wave2.freq = WaveFreq * 3.5;
- wave2.amp = waveamp * 0.75;
- wave2.dir = vec2(cos(radians(angle)), sin(radians(angle)));
-
- angle -= 45.0;
- wave3.freq = WaveFreq * 3.0 ;
- wave3.amp = waveamp * 0.75;
- wave3.dir = vec2(cos(radians(angle)), sin(radians(angle)));
-
- // sum waves
- ddx2 = 0.0, ddy2 = 0.0;
- sumWaves(WaveAngle + WaveDAngle, -1.5, windScale, WaveFactor, ddx2, ddy2);
-
- ddx3 = 0.0, ddy3 = 0.0;
- sumWaves(WaveAngle + WaveDAngle, 1.5, windScale, WaveFactor, ddx3, ddy3);
-
- ddxVec = vec4(ddx, ddx1, ddx2, ddx3);
- ddyVec = vec4(ddy, ddy1, ddy2, ddy3);
-
- float ddxSum = dot(ddxVec, AllOnes);
- float ddySum = dot(ddyVec, AllOnes);
-
- if (Status == 1){
- cover = min(min(min(min(CloudCover0, CloudCover1),CloudCover2),CloudCover3),CloudCover4);
- } else {
- // hack to allow for Overcast not to be set by Local Weather
- if (Overcast == 0.0){
- cover = 5.0;
- } else {
- cover = Overcast * 5.0;
- }
- }
-
- vec4 viewt = vec4(-E, 0.0) * 0.6;
-
- vec4 disdis = texture2D(water_dudvmap, vec2(waterTex2 * tscale)* windScale) * 2.0 - 1.0;
-
- vec2 uvAnimSca2 = (waterTex1 + disdis * sca2).st * windScale;
- //normalmaps
- vec4 nmap = texture2D(water_normalmap, uvAnimSca2) * 2.0 - 1.0;
- vec4 nmap1 = texture2D(perlin_normalmap, uvAnimSca2) * 2.0 - 1.0;
-
- rotationmatrix(radians(3.0 * sin(osg_SimulationTime * 0.0075)), RotationMatrix);
- vec2 uvAnimTscale = (waterTex2 * RotationMatrix * tscale).st * windScale;
-
- nmap += texture2D(water_normalmap, uvAnimTscale) * 2.0 - 1.0;
- nmap1 += texture2D(perlin_normalmap, uvAnimTscale) * 2.0 - 1.0;
-
- nmap *= windEffect_low;
- nmap1 *= windEffect_low;
-
- // mix water and noise, modulated by factor
- vec4 vNorm = normalize(mix(nmap, nmap1, mixFactor) * waveRoughness);
- vNorm.r += ddxSum;
-
- if (normalmap_dds > 0)
- vNorm = -vNorm; //dds fix
-
- //load reflection
- vec4 tmp = vec4(lightdir, 0.0);
- vec2 refTexUV = (tmp + waterTex1).st * 32.0;
- vec4 refTex = texture2D(water_reflection, refTexUV) ;
- vec4 refTexGrey = texture2D(water_reflection_grey, refTexUV) ;
- vec4 refl = vec4(0.0,0.0,0.0,1.0) ;
-
- // Test data
- // cover = 0;
-
- if(cover >= 1.5){
- refl.rgb = normalize(refTex).rgb;
- }
- else
- {
- refl.rgb = normalize(refTexGrey).rgb;
- refl.r *= (0.75 + 0.15 * cover );
- refl.g *= (0.80 + 0.15 * cover );
- refl.b *= (0.875 + 0.125 * cover);
- }
-
-// refl.rgb = mix(refl.rgb, floorColour, 0.99 * floorMixFactor);
-
- vec4 N0 = texture2D(water_normalmap, uvAnimSca2) * 2.0 - 1.0;
- vec4 N1 = texture2D(perlin_normalmap, vec2(waterTex1 + disdis * sca) * windScale) * 2.0 - 1.0;
-
- N0 += texture2D(water_normalmap, vec2(waterTex1 * tscale) * windScale) * 2.0 - 1.0;
- N1 += texture2D(perlin_normalmap, vec2(waterTex2 * tscale) * windScale) * 2.0 - 1.0;
-
-
- rotationmatrix(radians(2.0 * sin(osg_SimulationTime * 0.005)), RotationMatrix);
- vec2 uvAnimTscaleSca2 = (waterTex2 * RotationMatrix * (tscale + sca2)).st * windScale;
- N0 += texture2D(water_normalmap, uvAnimTscaleSca2) * 2.0 - 1.0;
- N1 += texture2D(perlin_normalmap, uvAnimTscaleSca2) * 2.0 - 1.0;
-
- rotationmatrix(radians(-4.0 * sin(osg_SimulationTime * 0.003)), RotationMatrix);
- N0 += texture2D(water_normalmap, vec2(waterTex1 * RotationMatrix + disdis * sca2) * windScale) * 2.0 - 1.0;
- N1 += texture2D(perlin_normalmap, vec2(waterTex1 * RotationMatrix + disdis * sca) * windScale) * 2.0 - 1.0;
-
- N0 *= windEffect_low;
- N1 *= windEffect_low;
-
- N0.r += ddxSum;
- N0.g += ddySum;
-
- Normal = normalize(mix(Normal + N0.rgb, Normal + N1.rgb, mixFactor) * waveRoughness);
-
- if (normalmap_dds > 0)
- Normal = -Normal; //dds fix
-
- float NdotH = max(0.0, dot(Normal, H));
- vec3 specular_color = vec3(gl_LightSource[0].diffuse)
- * pow(NdotH, water_shininess) * 6.0;
- vec4 specular = vec4(specular_color, 0.5);
-
- specular = specular * saturation * 0.3 ;
-
- //calculate fresnel
- float vNormDotViewT = dot(vNorm, viewt);
- vec4 invfres = vec4( vNormDotViewT);
- vec4 fres = vec4(1.0) + invfres;
- refl *= fres;
-
- refl.rgb = mix(refl.rgb, floorColour, floorMixFactor);
- //calculate final colour
- vec4 ambient_light = gl_LightSource[0].diffuse;
- vec4 finalColor;
-
- finalColor = refl + step(1.5, cover) * specular;
-
- //add foam
- vec4 foam_texel = texture2D(sea_foam, (waterTex2 * tscale).st * 50.0);
- float foamSlope = 0.1 + 0.1 * windScale;
-
- float waveSlope1 = Normal.g * windFloorFactor * 0.65;
- float waveSlope2 = vNorm.r * windFloorFactor * 0.3;
- float waveSlope = waveSlope1 + waveSlope2;
-
- finalColor = mix(finalColor, max(finalColor, finalColor + foam_texel),
- smoothstep(7.0, 8.0, windFloorEffect)
- * step(foamSlope, waveSlope)
- * smoothstep(0.01, 0.50, waveSlope)) ;
-
- finalColor *= ambient_light ;
-
- finalColor.rgb = fog_Func(finalColor.rgb, fogType) ;
- gl_FragColor = finalColor ;
-}
diff --git a/Translations/default/menu.xml b/Translations/default/menu.xml
index ef18e9e79..464ec4f35 100644
--- a/Translations/default/menu.xml
+++ b/Translations/default/menu.xml
@@ -35,6 +35,7 @@
Toggle Glide Slope Tunnel
Instant Replay
Stereoscopic View Options
+ ALS Filter Effects
Location
diff --git a/Video/custom-preset.xml b/Video/custom-preset.xml
deleted file mode 100644
index e69de29bb..000000000
diff --git a/Video/graphics-properties.xml b/Video/graphics-properties.xml
index bfabb6fb7..39ff5c039 100644
--- a/Video/graphics-properties.xml
+++ b/Video/graphics-properties.xml
@@ -17,19 +17,71 @@ particular list.
-->
-
-
-
-
-
-
-
- /sim/rendering/shadows/enabled
- /sim/rendering/shaders/*
- /sim/rendering/clouds3d-enable
+
/sim/rendering/shaders/skydome
+ /sim/rendering/shaders/use-shaders
+
+ /sim/rendering/shaders/landmass
+ /sim/rendering/shaders/transition
+ /sim/rendering/shaders/model
+ /sim/rendering/shaders/water
+ /sim/rendering/shaders/clouds
+ /sim/rendering/shaders/wind-effects
+ /sim/rendering/shaders/vegetation-effects
+
+ /sim/rendering/shadows/enabled
+ /sim/rendering/shadows/sun-atlas-size
+
+ /sim/rendering/dynamic-lighting/enabled
+ /sim/rendering/dynamic-lighting/limit-lights
+ /sim/rendering/dynamic-lighting/max-lights
+
+ /sim/rendering/scenery-path-suffix[0]/enabled
+ /sim/rendering/scenery-path-suffix[1]/enabled
+ /sim/rendering/scenery-path-suffix[2]/enabled
+ /sim/rendering/scenery-path-suffix[3]/enabled
+ /sim/rendering/scenery-path-suffix[4]/enabled
+ /sim/rendering/scenery-path-suffix[5]/enabled
+ /sim/rendering/osm-buildings
+ /sim/rendering/random-objects
+ /sim/rendering/random-buildings
+ /sim/rendering/random-vegetation
+ /sim/rendering/random-vegetation-shadows
+ /sim/rendering/vegetation-density
+
/sim/rendering/particles
+ /sim/rendering/precipitation-enable
+ /sim/rendering/clouds3d-enable
+
+
+ /scenery/use-vpb
+ /scenery/elevation-mesh/lod-range-factor
+ /scenery/elevation-mesh/constraint-gap-m
+ /sim/rendering/photoscenery/enabled
+ /sim/rendering/scenery-path-suffix[0]/enabled
+ /sim/rendering/scenery-path-suffix[1]/enabled
+ /sim/rendering/scenery-path-suffix[2]/enabled
+ /sim/rendering/scenery-path-suffix[3]/enabled
+ /sim/rendering/scenery-path-suffix[4]/enabled
+ /sim/rendering/scenery-path-suffix[5]/enabled
+ /sim/rendering/osm-buildings
+ /sim/rendering/random-objects
+ /sim/rendering/random-buildings
+ /sim/rendering/random-vegetation
+ /sim/rendering/random-vegetation-shadows
+ /sim/rendering/vegetation-density
+
+
+
+ /sim/rendering/shadows/enabled
+ /sim/rendering/shadows/sun-atlas-size
+ /sim/rendering/dynamic-lighting/enabled
+
+
+
+
+
diff --git a/Video/high-quality-preset.xml b/Video/high-quality-preset.xml
index be3296606..7296cf681 100644
--- a/Video/high-quality-preset.xml
+++ b/Video/high-quality-preset.xml
@@ -1,42 +1,49 @@
+ high-quality
+ High
+ High quality settings with the most demanding features disabled.
- high-quality
- High
- Adds more vegetation, clouds and weather effects incluing rain and snow.
- Increases fine detail of water, land and aircraft models.
-
-
-
-
-
-
-
- true
- 1
- 6
- 3
- 1
- 1
- true
- 6
- 4
- 5
- 2
- 1
- 1
- 1
-
- true
-
- true
-
- 43
-
-
-
-
-
+
+
+
+
+ true
+ true
+ 6
+ 6
+ 3
+ 5
+ 1
+ 2
+ 0
+
+
+ true
+ 4096
+
+
+ true
+ false
+ 0
+
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ 2.0
+ true
+ true
+ true
+
+
+
-
diff --git a/Video/low-quality-preset.xml b/Video/low-quality-preset.xml
index 65b438897..2d90a9131 100644
--- a/Video/low-quality-preset.xml
+++ b/Video/low-quality-preset.xml
@@ -1,40 +1,51 @@
+ low-quality
+ Low
+ Prioritize performance over eye candy.
- low-quality
- Low
- Basic settings for very low-power laptops. Clouds will be
- shown as simple layers, and distant objects will not be visible.
-
-
-
-
-
-
- true
- 1
- 6
- 3
- 1
- 1
- true
- 6
- 4
- 5
- 2
- 1
- 1
- 1
-
- true
-
- true
-
-
-
-
-
-
+
+
+
+
+ true
+ true
+ 3
+ 2
+ 0
+ 4
+ 0
+ 0
+ 0
+
+
+ true
+ 1024
+
+
+ true
+ true
+ 8
+
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ false
+ true
+ false
+ 0.5
+ true
+ true
+ true
+
+
+
+
diff --git a/Video/medium-quality-preset.xml b/Video/medium-quality-preset.xml
index 46c0ffcba..72a538b58 100644
--- a/Video/medium-quality-preset.xml
+++ b/Video/medium-quality-preset.xml
@@ -1,43 +1,49 @@
+ medium-quality
+ Medium
+ A nice tradeoff between performance and eye candy.
- medium-quality
- Medium
- Tradeoff between visual quality and performance: 3D clouds and
-vegetation are enabled, along with some scenery objects, but the quantity
-and quality are restricted to work on older computers and laptops.
-
-
-
-
-
-
-
- true
- 1
- 6
- 3
- 1
- 1
- true
- 6
- 4
- 5
- 2
- 1
- 1
- 1
-
- true
-
- true
-
- 42
-
-
-
-
-
+
+
+
+
+ true
+ true
+ 4
+ 4
+ 3
+ 4
+ 1
+ 2
+ 0
+
+
+ true
+ 2048
+
+
+ true
+ false
+ 0
+
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ false
+ true
+ true
+ 1.0
+ true
+ true
+ true
+
+
+
-
diff --git a/Video/minimal-quality-preset.xml b/Video/minimal-quality-preset.xml
new file mode 100644
index 000000000..619fedfc3
--- /dev/null
+++ b/Video/minimal-quality-preset.xml
@@ -0,0 +1,49 @@
+
+
+
+ minimal-quality
+ Minimal
+ Minimal settings for low-power laptops or very old systems.
+
+
+
+
+
+ false
+ false
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ false
+ 1024
+
+
+ false
+ false
+ 0
+
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ 0.0
+ false
+ false
+ false
+
+
+
+
diff --git a/Video/ultra-quality-preset.xml b/Video/ultra-quality-preset.xml
new file mode 100644
index 000000000..b83ebeaae
--- /dev/null
+++ b/Video/ultra-quality-preset.xml
@@ -0,0 +1,49 @@
+
+
+
+ ultra-quality
+ Ultra
+ Maximum settings for very powerful systems.
+
+
+
+
+
+ true
+ true
+ 6
+ 6
+ 3
+ 5
+ 1
+ 2
+ 1
+
+
+ true
+ 8192
+
+
+ true
+ false
+ 0
+
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ 4.0
+ true
+ true
+ true
+
+
+
+
diff --git a/defaults.xml b/defaults.xml
index c46b02825..f362e9d55 100644
--- a/defaults.xml
+++ b/defaults.xml
@@ -65,22 +65,14 @@ Started September 2000 by David Megginson, david@megginson.com
5
8
- false
0.0
- 1.0
1.0
1.0
- 1.0
- 1.0
true
1.0
- 1.0
1.0
0.0
0.0
- 0.0
- 1.0
- 1.0
0.003
0.0003
diff --git a/gui/dialogs/advanced-graphics-options.xml b/gui/dialogs/advanced-graphics-options.xml
new file mode 100644
index 000000000..81638a496
--- /dev/null
+++ b/gui/dialogs/advanced-graphics-options.xml
@@ -0,0 +1,1325 @@
+
+
+
+ advanced-graphics-options
+ false
+ true
+ vbox
+ 3
+
+
+ hbox
+ 1
+
+
+ true
+
+
+
+ Advanced Graphics Options
+
+
+
+ true
+
+
+
+
+ Esc
+ 16
+ 16
+ 2
+
+ dialog-close
+
+
+
+
+
+
+
+ hbox
+
+
+
+ vbox
+ 1
+
+
+
+
+
+
+ vbox
+
+
+ hbox
+
+ Rendering Mode
+ left
+
+
+ true
+
+
+
+
+ hbox
+ left
+
+ table
+
+ 0
+ 0
+ left
+ low-spec-mode
+ /sim/gui/dialogs/advanced/mode/low-spec-mode
+ true
+ Low Specifications
+
+ property-assign
+ /sim/gui/dialogs/advanced/mode/low-spec-mode
+ 1
+
+
+ property-assign
+ /sim/gui/dialogs/advanced/mode/als-mode
+ 0
+
+
+ property-assign
+ /sim/rendering/shaders/skydome
+ 0
+
+
+
+
+ 0
+ 1
+ true
+
+
+
+ 0
+ 2
+ right
+ use-shaders
+ /sim/rendering/shaders/use-shaders
+ Use Shaders
+ true
+
+
+ /sim/rendering/shaders/skydome
+
+
+
+ dialog-apply
+ use-shaders
+
+
+
+
+
+
+
+ low-spec-description
+ fill
+ true
+ 400
+ 80
+ 15
+ false
+ true
+ true
+ 0
+ /sim/gui/dialogs/advanced/low-spec-description
+
+
+
+
+ hbox
+ left
+
+
+ left
+ als-mode
+ /sim/gui/dialogs/advanced/mode/als-mode
+ true
+ Atmospheric Light Scattering (ALS)
+
+ property-assign
+ /sim/gui/dialogs/advanced/mode/low-spec-mode
+ 0
+
+
+ property-assign
+ /sim/gui/dialogs/advanced/mode/als-mode
+ 1
+
+
+ property-assign
+ /sim/rendering/shaders/skydome
+ 1
+
+
+
+
+
+
+ als-description
+ fill
+ true
+ 400
+ 100
+ 15
+ false
+ true
+ true
+ 0
+ /sim/gui/dialogs/advanced/als-description
+
+
+
+ hbox
+
+
+ /sim/rendering/shaders/skydome
+
+ ALS Shader Settings
+ left
+
+
+ true
+
+
+
+
+ table
+
+
+
+ /sim/rendering/shaders/skydome
+
+ 0
+ 0
+ left
+ Terrain Quality
+
+
+
+ /sim/rendering/shaders/skydome
+
+ 0
+ 1
+ terrain-quality
+ 200
+ /sim/gui/dialogs/advanced/terrain-quality
+ Low
+ Medium
+ High
+ Ultra
+
+ dialog-apply
+ terrain-quality
+
+
+ nasal
+
+
+
+
+
+
+ /sim/rendering/shaders/skydome
+
+ 1
+ 0
+ left
+ Model Effects
+
+
+
+ /sim/rendering/shaders/skydome
+
+ 1
+ 1
+ model-effects
+ 200
+ /sim/gui/dialogs/advanced/model-effects
+ Disabled
+ Enabled
+
+ dialog-apply
+ model-quality
+
+
+ nasal
+
+
+
+
+
+
+ /sim/rendering/shaders/skydome
+
+ 2
+ 0
+ left
+ Water Effects
+
+
+
+ /sim/rendering/shaders/skydome
+
+ 2
+ 1
+ water-effects
+ 200
+ /sim/gui/dialogs/advanced/water-effects
+ Disabled
+ Low
+ High
+
+ dialog-apply
+ water-effects
+
+
+ nasal
+
+
+
+
+
+
+ /sim/rendering/shaders/skydome
+
+ 4
+ 0
+ left
+ Clouds Detail
+
+
+
+ /sim/rendering/shaders/skydome
+
+ 4
+ 1
+ clouds
+ 200
+ /sim/gui/dialogs/advanced/clouds
+ Low
+ High
+
+ dialog-apply
+ clouds
+
+
+ nasal
+
+
+
+
+
+
+ /sim/rendering/shaders/skydome
+
+ 5
+ 0
+ left
+ Wind Effects
+
+
+
+ /sim/rendering/shaders/skydome
+
+ 5
+ 1
+ wind-effects
+ 200
+ /sim/gui/dialogs/advanced/wind-effects
+ Disabled
+ Enabled
+
+ dialog-apply
+ wind-effects
+
+
+ nasal
+
+
+
+
+
+
+ /sim/rendering/shaders/skydome
+
+ 6
+ 0
+ left
+ Overlay
+
+
+
+ /sim/rendering/shaders/skydome
+
+ 6
+ 1
+ overlay
+ 200
+ /sim/gui/dialogs/advanced/overlay
+ Disabled
+ Enabled
+
+ dialog-apply
+ overlay
+
+
+ nasal
+
+
+
+
+
+
+
+
+
+ /sim/rendering/shaders/skydome
+
+
+ left
+
+ 1.0
+ 0.6
+ 0.6
+
+ These settings can only be changed when using ALS.
+
+
+
+ vbox
+ 1
+
+
+
+
+
+
+ vbox
+ 1
+
+
+
+
+
+
+
+
+
+ vbox
+ 1
+
+
+
+
+
+
+ vbox
+
+
+ hbox
+
+ Shadows and Lights
+ left
+
+
+ true
+
+
+
+
+ table
+
+ 0
+ 0
+ left
+ Shadow Quality
+
+
+ 0
+ 1
+
+
+
+ 0
+ 2
+ shadows
+ 200
+ /sim/gui/dialogs/advanced/shadows
+ Disabled
+ Low
+ Medium
+ High
+ Ultra
+
+ dialog-apply
+ shadows
+
+
+ nasal
+
+
+
+
+
+
+ left
+ Dynamic lighting
+ dynamic-lighting
+ /sim/rendering/dynamic-lighting/enabled
+
+ dialog-apply
+ dynamic-lighting
+
+
+
+
+ left
+ Limit the number of lights being displayed
+ limit-lights
+ /sim/rendering/dynamic-lighting/limit-lights
+
+ dialog-apply
+ limit-lights
+
+
+ /sim/rendering/dynamic-lighting/enabled
+
+
+
+
+ hbox
+ right
+
+ Maximum number of lights
+
+
+ /sim/rendering/dynamic-lighting/enabled
+ /sim/rendering/dynamic-lighting/limit-lights
+
+
+
+
+
+
+ /sim/rendering/dynamic-lighting/enabled
+ /sim/rendering/dynamic-lighting/limit-lights
+
+
+ max-lights
+ 1
+ 16
+ /sim/rendering/dynamic-lighting/max-lights
+
+ dialog-apply
+ max-lights
+
+
+
+
+
+ /sim/rendering/dynamic-lighting/enabled
+ /sim/rendering/dynamic-lighting/limit-lights
+
+
+ 12345678
+ %.0f
+ true
+ /sim/rendering/dynamic-lighting/max-lights
+
+
+
+
+ hbox
+
+ Scenery Layers
+ left
+
+
+ true
+
+
+
+
+ table
+
+
+ 0
+ 0
+ left
+ Pylons and power lines
+
+
+ 0
+ 1
+ pylons
+ 200
+ /sim/gui/dialogs/rendering/pylons
+ Disabled
+ Basic
+ Detailed
+
+ dialog-apply
+ pylons
+
+
+ nasal
+
+
+
+
+
+ 1
+ 0
+ left
+ Detailed Roads and Railways
+
+
+ 1
+ 1
+ roads
+ 200
+ /sim/gui/dialogs/rendering/roads
+ Disabled
+ Enabled
+
+ dialog-apply
+ roads
+
+
+ nasal
+
+
+
+
+
+ 2
+ 0
+ left
+ Buildings
+
+
+ 2
+ 1
+ buildings
+ 200
+ /sim/gui/dialogs/rendering/buildings
+ Disabled
+ Randomly Generated
+ OpenStreetMap Data
+
+ dialog-apply
+ buildings
+
+
+ nasal
+
+
+
+
+
+ 3
+ 0
+ left
+ Random Scenery Objects
+
+
+ 3
+ 1
+ random-objects
+ 200
+ /sim/gui/dialogs/rendering/random-objects
+ Disabled
+ Enabled
+
+ dialog-apply
+ random-objects
+
+
+ nasal
+
+
+
+
+
+ 4
+ 0
+ left
+ Autogenerated Vegetation
+
+
+ 4
+ 1
+ random-vegetation
+ 200
+ /sim/gui/dialogs/rendering/random-vegetation
+ Disabled
+ Ultra Low Density
+ Very Low Density
+ Low Density
+ Medium Density
+ High Density
+ Very High Density
+ Ultra High Density
+
+ dialog-apply
+ random-vegetation
+
+
+ nasal
+
+
+
+
+
+ 5
+ 0
+ left
+ OpenStreetMap Trees
+
+
+ 5
+ 1
+ osm2city-trees
+ 200
+ /sim/gui/dialogs/rendering/osm2city-trees
+ Disabled
+ Enabled
+
+ dialog-apply
+ osm2city-trees
+
+
+ nasal
+
+
+
+
+
+
+
+ 6
+ 0
+ left
+ Vegetation Shadows
+
+
+ 6
+ 1
+ vegetation-shadows
+ 200
+ /sim/gui/dialogs/rendering/vegetation-shadows
+ Disabled
+ Enabled
+
+ dialog-apply
+ vegetation-shadows
+
+
+ nasal
+
+
+
+
+
+ 7
+ 0
+ left
+ Scenery Objects
+
+
+
+ 7
+ 1
+ placed-objects
+ 200
+ /sim/gui/dialogs/rendering/placed-objects
+ Disabled
+ Enabled
+
+ dialog-apply
+ placed-objects
+
+
+ nasal
+
+
+
+
+
+ 8
+ 0
+ 2
+ left
+
+ 1.0
+ 0.6
+ 0.6
+
+ Warning: Pylons, Detailed Roads, Buildings use a lot of memory
+
+
+
+ 9
+ 01
+ 2
+ left
+
+ 1.0
+ 0.6
+ 0.6
+
+ and disk space, and are only available in limited areas.
+
+
+
+
+ vbox
+ 1
+
+
+
+ hbox
+
+ Atmospheric Effects
+ left
+
+
+ true
+
+
+
+
+ left
+ Particles (smoke, dust, spray)
+ particles
+ /sim/rendering/particles
+
+ dialog-apply
+ particles
+
+
+
+
+ left
+ Precipitation
+ precipitation
+ /sim/rendering/precipitation-gui-enable
+
+ dialog-apply
+ precipitation
+
+
+
+
+ left
+ 3D clouds
+ 3d-clouds
+ /sim/rendering/clouds3d-enable
+
+ dialog-apply
+ 3d-clouds
+
+
+
+
+ hbox
+ right
+
+ Cloud density
+
+ /sim/rendering/clouds3d-enable
+
+
+
+ cloud-density
+ 0
+ 1.0
+ /sim/rendering/clouds3d-density
+
+ dialog-apply
+ cloud-density
+
+
+ property-toggle
+ /sim/rendering/clouds3d-enable
+
+
+ property-toggle
+ /sim/rendering/clouds3d-enable
+
+
+
+
+ /sim/rendering/clouds3d-enable
+
+ 12345678
+ %.2f
+ true
+ /sim/rendering/clouds3d-density
+
+
+
+
+ hbox
+ right
+
+ Cloud visibility range
+
+ /sim/rendering/clouds3d-enable
+
+
+
+ cloud-vis-range
+ 1000.0
+ 150000.0
+ /sim/rendering/clouds3d-vis-range
+
+ dialog-apply
+ cloud-vis-range
+
+
+
+
+ /sim/rendering/clouds3d-enable
+
+ 12345678
+ %.fm
+ true
+ /sim/rendering/clouds3d-vis-range
+
+
+
+
+ 1
+
+
+
+
+
+
+ vbox
+ 1
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+ hbox
+
+
+ Back
+
+ dialog-show
+ rendering
+
+
+ dialog-close
+
+
+
+ Close
+ true
+ Esc
+
+ dialog-close
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
diff --git a/gui/dialogs/als-filters.xml b/gui/dialogs/als-filters.xml
index ad71544f1..c0ce3bfe6 100644
--- a/gui/dialogs/als-filters.xml
+++ b/gui/dialogs/als-filters.xml
@@ -406,17 +406,6 @@
-
- Back
-
- dialog-show
- rendering
-
-
- dialog-close
-
-
-
Close
true
diff --git a/gui/dialogs/rendering.xml b/gui/dialogs/rendering.xml
index cf23676d2..8a041c8d2 100644
--- a/gui/dialogs/rendering.xml
+++ b/gui/dialogs/rendering.xml
@@ -46,7 +46,7 @@
0.6
0.6
- Warning: Intel integrated graphics detected. Your graphics card may not support shaders or complex graphics.
+ Warning: Your graphics card may not support complex graphics.
@@ -65,28 +65,6 @@
vbox
-
- hbox
-
- General
- left
-
-
- true
-
-
-
-
- left
- Shadows (may need restart to take affect)
- shadows-enable
- /sim/rendering/shadows/enabled
-
- dialog-apply
- shadows-enable
-
-
-
hbox
left
@@ -104,9 +82,9 @@
@@ -166,6 +144,49 @@
+
+ left
+ Use point sprites for runway lights
+ /sim/rendering/point-sprites
+
+ dialog-apply
+
+
+
+
+ left
+ Use triangles for directional lights
+ /sim/rendering/triangle-directional-lights
+
+ dialog-apply
+
+
+ /sim/rendering/point-sprites
+
+
+
+
+ left
+ Animated jetways
+ jetways
+ /nasal/jetways/enabled
+
+ dialog-apply
+ jetways
+
+
+
+
+ left
+ Satellite Photoscenery
+ satellite-photoscenery
+ /sim/rendering/photoscenery/enabled
+
+ dialog-apply
+ satellite-photoscenery
+
+
+
left
Wireframe
@@ -218,6 +239,133 @@
+
+
+
+ table
+
+
+ hbox
+ 0
+ 0
+
+ /sim/rendering/preset-active
+
+
+ left
+ Graphics Quality
+
+
+ graphics-preset
+ 150
+ /sim/gui/dialogs/rendering/preset
+ /sim/gui/dialogs/rendering/presets-list
+
+ dialog-apply
+ graphics-preset
+
+
+ nasal
+
+
+
+
+
+
+ hbox
+ 0
+ 0
+
+
+ /sim/rendering/preset-active
+
+
+
+
+ Advanced Options
+ left
+
+ dialog-show
+ advanced-graphics-options
+
+
+ dialog-close
+ rendering
+
+ 200
+
+
+
+
+ left
+ 0
+ 1
+ Custom
+ custom-settings
+ /sim/gui/dialogs/rendering/custom-settings
+
+ dialog-apply
+ custom-settings
+
+
+ nasal
+
+
+
+
+
+
+
+ table
+
+
+
+ /sim/rendering/preset-active
+
+ 0
+ 0
+ preset-description
+ fill
+ true
+ 400
+ 60
+ 15
+ false
+ true
+ true
+ 0
+ /sim/rendering/preset-description
+
+
+
+
+
+ /sim/rendering/preset-active
+
+
+ 0
+ 0
+ Save custom settings to file
+ 200
+
+ nasal
+
+
+
+
+
+
+
hbox
@@ -234,9 +382,6 @@
ws30
-
- true
-
@@ -283,743 +428,18 @@
-
- 1
-
-
-
- hbox
-
- Shaders
- left
-
-
- true
-
-
-
-
- table
-
-
- hbox
- 0
- 0
-
-
- /sim/rendering/shaders/custom-settings
-
-
-
-
- Performance
-
-
- quality-level
- 0.0
- 5.0
- 1.0
- 0.17
- /sim/rendering/shaders/quality-level-internal
-
- dialog-apply
- quality-level
-
-
-
- Quality
-
-
- 12345678
- (%1.0f)
- true
- /sim/rendering/shaders/quality-level-internal
-
-
-
-
- hbox
- 0
- 0
-
-
- /sim/rendering/shaders/custom-settings
-
- /sim/rendering/shaders/skydome
-
-
-
-
-
- Shader Options
- left
-
- dialog-show
- shaders
-
-
- dialog-close
- rendering
-
- 200
-
-
-
-
- hbox
- 0
- 0
-
-
- /sim/rendering/shaders/custom-settings
- /sim/rendering/shaders/skydome
-
- /sim/rendering/rembrandt/enabled
-
-
-
-
-
- Shader Options
- left
-
- dialog-show
- shaders-lightfield
-
-
- dialog-close
- rendering
-
- 200
-
-
-
-
- left
- 0
- 1
- Custom
- custom-settings
- /sim/rendering/shaders/custom-settings
-
- dialog-apply
- custom-settings
-
-
-
-
-
- hbox
-
- Atmospheric Effects
- left
-
-
- true
-
-
-
-
- left
- Particles (smoke, dust, spray)
- particles
- /sim/rendering/particles
-
- dialog-apply
- particles
-
-
-
-
- left
- Precipitation
- precipitation
- /sim/rendering/precipitation-gui-enable
-
- dialog-apply
- precipitation
-
-
-
-
- left
- 3D clouds
- 3d-clouds
- /sim/rendering/clouds3d-enable
-
- dialog-apply
- 3d-clouds
-
-
-
-
- hbox
- right
-
- Cloud density
-
- /sim/rendering/clouds3d-enable
-
-
-
- cloud-density
- 0
- 1.0
- /sim/rendering/clouds3d-density
-
- dialog-apply
- cloud-density
-
-
- property-toggle
- /sim/rendering/clouds3d-enable
-
-
- property-toggle
- /sim/rendering/clouds3d-enable
-
-
-
-
- /sim/rendering/clouds3d-enable
-
- 12345678
- %.2f
- true
- /sim/rendering/clouds3d-density
-
-
-
-
- hbox
- right
-
- Cloud visibility range
-
- /sim/rendering/clouds3d-enable
-
-
-
- cloud-vis-range
- 1000.0
- 150000.0
- /sim/rendering/clouds3d-vis-range
-
- dialog-apply
- cloud-vis-range
-
-
-
-
- /sim/rendering/clouds3d-enable
-
- 12345678
- %.fm
- true
- /sim/rendering/clouds3d-vis-range
-
-
-
-
- hbox
-
- Experimental Settings
- left
-
-
- true
-
-
-
-
- table
-
-
- 0
- 0
-
- /sim/rendering/shaders/skydome
-
- Filter effects
- center
-
- dialog-show
- als-filters
-
-
- dialog-close
- rendering
-
- 200
-
-
-
- 0
- 1
-
- /sim/rendering/rembrandt/enabled
-
- Rembrandt Options
- center
-
- dialog-show
- rembrandt
-
-
- dialog-close
- rendering
-
- 200
-
-
-
-
-
-
- vbox
- 1
-
-
-
-
-
-
- vbox
- 1
-
+
+ /sim/rendering/restart-required
+
+
+ 1.0
+ 0.6
+ 0.6
+
+ Some changes require a complete restart to be applied.
-
-
-
-
-
-
- vbox
- 1
-
-
-
-
-
-
- vbox
-
-
- hbox
-
- Scenery Layers
- left
-
-
- true
-
-
-
-
- table
-
-
- 0
- 0
- left
- Pylons and power lines
-
-
- 0
- 1
- pylons
- 200
- /sim/gui/dialogs/rendering/pylons
- Disabled
- Basic
- Detailed
-
- dialog-apply
- pylons
-
-
- nasal
-
-
-
-
-
- 1
- 0
- left
- Detailed Roads and Railways
-
-
- 1
- 1
- roads
- 200
- /sim/gui/dialogs/rendering/roads
- Disabled
- Enabled
-
- dialog-apply
- roads
-
-
- nasal
-
-
-
-
-
- 2
- 0
- left
- Buildings
-
-
- 2
- 1
- buildings
- 200
- /sim/gui/dialogs/rendering/buildings
- Disabled
- Randomly Generated
- OpenStreetMap Data
-
- dialog-apply
- buildings
-
-
- nasal
-
-
-
-
-
- 3
- 0
- left
- Random Scenery Objects
-
-
- 3
- 1
- random-objects
- 200
- /sim/gui/dialogs/rendering/random-objects
- Disabled
- Enabled
-
- dialog-apply
- random-objects
-
-
- nasal
-
-
-
-
-
- 4
- 0
- left
- Autogenerated Vegetation
-
-
- 4
- 1
- random-vegetation
- 200
- /sim/gui/dialogs/rendering/random-vegetation
- Disabled
- Ultra Low Density
- Very Low Density
- Low Density
- Medium Density
- High Density
- Very High Density
- Ultra High Density
-
- dialog-apply
- random-vegetation
-
-
- nasal
-
-
-
-
-
- 5
- 0
- left
- OpenStreetMap Trees
-
-
- 5
- 1
- osm2city-trees
- 200
- /sim/gui/dialogs/rendering/osm2city-trees
- Disabled
- Enabled
-
- dialog-apply
- osm2city-trees
-
-
- nasal
-
-
-
-
-
-
-
- 6
- 0
- left
- Vegetation Shadows
-
-
- 6
- 1
- vegetation-shadows
- 200
- /sim/gui/dialogs/rendering/vegetation-shadows
- Disabled
- Enabled
-
- dialog-apply
- vegetation-shadows
-
-
- nasal
-
-
-
-
-
- 7
- 0
- left
- Scenery Objects
-
-
-
- 7
- 1
- placed-objects
- 200
- /sim/gui/dialogs/rendering/placed-objects
- Disabled
- Enabled
-
- dialog-apply
- placed-objects
-
-
- nasal
-
-
-
-
-
- 8
- 0
- Satellite Photoscenery
- satellite-photoscenery
-
-
- /sim/rendering/rembrandt/enabled
-
-
- /sim/rendering/photoscenery/enabled
-
- dialog-apply
- satellite-photoscenery
-
-
-
-
- 9
- 0
- 2
- left
-
- 1.0
- 0.6
- 0.6
-
- Warning: Pylons, Detailed Roads, Buildings use a lot of memory
-
-
-
- 10
- 0
- 2
- left
-
- 1.0
- 0.6
- 0.6
-
- and disk space, and are only available in limited areas.
-
-
-
-
- hbox
-
- Airports
- left
-
-
- true
-
-
-
-
- left
- Use point sprites for runway lights
- /sim/rendering/point-sprites
-
- dialog-apply
-
-
-
-
- left
- Use triangles for directional lights
- /sim/rendering/triangle-directional-lights
-
- dialog-apply
-
-
- /sim/rendering/point-sprites
-
-
-
-
- left
- Animated jetways
- jetways
- /nasal/jetways/enabled
-
- dialog-apply
- jetways
-
-
-
-
- 1
-
-
+
@@ -1041,16 +461,12 @@
nasal
@@ -1061,175 +477,36 @@
0));
+ setprop("/sim/gui/dialogs/rendering/custom-settings", !getprop("/sim/rendering/preset-active"));
- var matfile = getprop("/sim/rendering/materials-file");
- foreach (var name; keys(materials)) {
- if (matfile == materials[name]) {
- setprop("/sim/gui/dialogs/rendering/texture-set", name);
- }
- }
-
+ # Intel GPU warning
var vendor = getprop("/sim/rendering/gl-vendor");
if (vendor != nil) {
- vendor = string.lc(vendor);
- if (find("intel", vendor) != -1) {
- setprop("/sim/gui/dialogs/rendering/shader-warning", 1);
- } else {
- setprop("/sim/gui/dialogs/rendering/shader-warning", 0);
- }
+ vendor = string.lc(vendor);
+ if (find("intel", vendor) != -1) {
+ setprop("/sim/gui/dialogs/rendering/shader-warning", 1);
+ } else {
+ setprop("/sim/gui/dialogs/rendering/shader-warning", 0);
+ }
}
+ # populate the presets combo based on the registered presets
+ fgcommand('list-graphics-presets', props.Node.new({
+ 'destination-path': '/sim/gui/dialogs/rendering/presets-list',
+ 'as-combobox-values':1,
+ 'clear-destination':1,
+ }));
+
+ # WS 3.0
var osg_version = getprop("/sim/version/openscenegraph");
-
if ((osg_version != nil) and (find("3.6", osg_version) == 0 or find("3.7", osg_version) == 0)) {
- # Currently vpb requires OSG 3.6 specifically.
- setprop("/sim/gui/dialogs/rendering/vpb-available", 1);
+ # Currently vpb requires OSG 3.6 specifically.
+ setprop("/sim/gui/dialogs/rendering/vpb-available", 1);
} else {
- setprop("/sim/gui/dialogs/rendering/vpb-available", 0);
+ setprop("/sim/gui/dialogs/rendering/vpb-available", 0);
}
-
- # Mapping from underlying properties to those used by the GUI.
-
- if (getScenerySuffix("Details")) {
- setprop("/sim/gui/dialogs/rendering/pylons", "Detailed");
- } else if (getScenerySuffix("Pylons")) {
- setprop("/sim/gui/dialogs/rendering/pylons", "Basic");
- } else {
- setprop("/sim/gui/dialogs/rendering/pylons", "Disabled");
- }
-
- if (getScenerySuffix("Roads")) {
- setprop("/sim/gui/dialogs/rendering/roads", "Enabled");
- } else {
- setprop("/sim/gui/dialogs/rendering/roads", "Disabled");
- }
-
- if (getScenerySuffix("Buildings")) {
- setprop("/sim/gui/dialogs/rendering/buildings", "OpenStreetMap Data");
- } else if (getprop("/sim/rendering/random-buildings")) {
- setprop("/sim/gui/dialogs/rendering/buildings", "Randomly Generated");
- } else {
- setprop("/sim/gui/dialogs/rendering/buildings", "Disabled");
- }
-
- if (getprop("/sim/rendering/random-objects")) {
- setprop("/sim/gui/dialogs/rendering/random-objects", "Enabled");
- } else {
- setprop("/sim/gui/dialogs/rendering/random-objects", "Disabled");
- }
-
- if (getprop("/sim/rendering/random-vegetation")) {
- var density = getprop("/sim/rendering/vegetation-density");
- if (density < 0.2) {
- setprop("/sim/gui/dialogs/rendering/random-vegetation", "Ultra Low Density");
- # 0.1
- } else if (density < 0.4) {
- setprop("/sim/gui/dialogs/rendering/random-vegetation", "Very Low Density");
- # 0.25
- } else if (density < 0.8) {
- setprop("/sim/gui/dialogs/rendering/random-vegetation", "Low Density");
- # 0.5
- } else if (density < 1.5) {
- setprop("/sim/gui/dialogs/rendering/random-vegetation", "Medium Density");
- # 1.0
- } else if (density < 3.0) {
- setprop("/sim/gui/dialogs/rendering/random-vegetation", "High Density");
- # 2.0
- } else if (density < 6.0) {
- setprop("/sim/gui/dialogs/rendering/random-vegetation", "Very High Density");
- # 4.0
- } else {
- setprop("/sim/gui/dialogs/rendering/random-vegetation", "Ultra High Density");
- # 8.0
- }
- } else {
- setprop("/sim/gui/dialogs/rendering/random-vegetation", "Disabled");
- }
-
- if (getScenerySuffix("Trees")) {
- setprop("/sim/gui/dialogs/rendering/osm2city-trees", "Enabled");
- } else {
- setprop("/sim/gui/dialogs/rendering/osm2city-trees", "Disabled");
- }
-
- if (getprop("/sim/rendering/random-vegetation-shadows")) {
- setprop("/sim/gui/dialogs/rendering/vegetation-shadows", "Enabled");
- } else {
- setprop("/sim/gui/dialogs/rendering/vegetation-shadows", "Disabled");
- }
-
- if (getScenerySuffix("Objects")) {
- setprop("/sim/gui/dialogs/rendering/placed-objects", "Enabled");
- } else {
- setprop("/sim/gui/dialogs/rendering/placed-objects", "Disabled");
- }
-
-
- var reload_props = [
- "/sim/rendering/photoscenery/enabled",
- "/sim/rendering/materials-file",
- "/sim/rendering/osm-buildings",
- "/sim/rendering/random-buildings",
- "/sim/rendering/random-objects",
- "/sim/rendering/random-vegetation",
- "/sim/rendering/random-vegetation-shadows",
- "/sim/rendering/vegetation-density",
- "/sim/rendering/clouds3d-enable",
- "/sim/rendering/clouds3d-density",
- "/scenery/use-vpb",
- "/scenery/elevation-mesh/lod-range-factor",
- "/scenery/elevation-mesh/constraint-gap-m",
- "/sim/rendering/scenery-path-suffix[0]/enabled",
- "/sim/rendering/scenery-path-suffix[1]/enabled",
- "/sim/rendering/scenery-path-suffix[2]/enabled",
- "/sim/rendering/scenery-path-suffix[3]/enabled",
- "/sim/rendering/scenery-path-suffix[4]/enabled",
- "/sim/rendering/scenery-path-suffix[5]/enabled",
- "/sim/rendering/scenery-path-suffix[6]/enabled"
- ];
-
- var reload_vals = {};
- foreach (var p; reload_props) {
- reload_vals[p] = getprop(p);
- }
-
- ]]>
+ ]]>
diff --git a/gui/dialogs/shaders-lightfield.xml b/gui/dialogs/shaders-lightfield.xml
deleted file mode 100644
index 58f7ae83f..000000000
--- a/gui/dialogs/shaders-lightfield.xml
+++ /dev/null
@@ -1,419 +0,0 @@
-
-
-
- shaders-lightfield
- false
- vbox
- 20
-
-
- hbox
-
- 1
-
-
-
- Shader options
-
-
-
- 1
-
-
-
- 16
- 16
-
- 27
- 2
-
- dialog-close
-
-
-
-
-
-
-
- hbox
-
- General
- left
-
-
- true
-
-
-
-
- hbox
- right
-
-
- left
- Clouds
-
-
- cloud
- 0.0
- 1.0
- 1.0
- 0.17
- true
- /sim/rendering/shaders/clouds
-
- dialog-apply
- cloud
-
-
-
- 55
-
-
-
-
- hbox
- right
-
-
- left
- Landmass
-
-
- landmass
- 0.0
- 6.0
- 1.0
- 0.17
- true
- /sim/rendering/shaders/landmass
-
- dialog-apply
- landmass
-
-
-
- 55
-
-
-
-
- hbox
- right
-
-
- left
- Transition
-
-
- transition
- 0.0
- 6.0
- 1.0
- 0.17
- true
- /sim/rendering/shaders/transition
-
- dialog-apply
- transition
-
-
-
- 55
-
-
-
-
-
- hbox
- right
-
-
- left
- Urban
-
-
- urban
- 0.0
- 5.0
- 1.0
- 0.17
- true
- /sim/rendering/shaders/urban
-
- dialog-apply
- urban
-
-
-
- 55
-
-
-
-
- hbox
- right
-
-
- left
- Agriculture
-
-
- agriculture
- 0.0
- 1.0
- 1.0
- 0.17
- true
- /sim/rendering/shaders/crop
-
- dialog-apply
- agriculture
-
-
-
- 55
-
-
-
-
-
- hbox
- right
-
- Water
-
-
- water
- 0.0
- 5.0
- 1.0
- 0.17
- true
- /sim/rendering/shaders/water
-
- dialog-apply
- water
-
-
-
- 55
-
-
-
-
- hbox
- right
-
- Model
-
-
- model
- 0.0
- 3.0
- 1.0
- 0.17
- true
- /sim/rendering/shaders/model
-
- dialog-apply
- model
-
-
-
- 55
-
-
-
-
- hbox
- right
-
- Forest
-
-
- forest
- 0.0
- 1.0
- 1.0
- 0.17
- true
- /sim/rendering/shaders/forest
-
- dialog-apply
- forest
-
-
-
- 55
-
-
-
-
- hbox
- right
-
- Wind Effects
-
-
- wind
- 0.0
- 2.0
- 1.0
- 0.17
- true
- /sim/rendering/shaders/wind-effects
-
- dialog-apply
- wind
-
-
-
- 55
-
-
-
-
- hbox
- right
-
- Overlay
-
-
- vegetation
- 0.0
- 1.0
- 1.0
- 0.17
- true
- /sim/rendering/shaders/vegetation-effects
-
- dialog-apply
- vegetation
-
-
-
- 55
-
-
-
-
-
- hbox
-
- Aircraft
- left
-
-
- true
-
-
-
-
-
- if (props.globals.getNode("/sim/rendering/shaders/aircraft") != nil) {
- var group = cmdarg().getChildren("group")[11];
- group.removeChildren("slider");
- group.removeChildren("hrule");
- group.removeChildren("text");
- var shaders = props.globals.getNode("/sim/rendering/shaders/aircraft").getChildren();
- for(i=0; size(shaders) > i; i+=1) {
-
- var fraction = 0.5;
- var min = 0;
- var max = 1;
- var step = 1;
-
- var name = shaders[i].getNode("name");
-
- if (shaders[i].getNode("step") != nil){
- step = shaders[i].getNode("step");
- }
- if (shaders[i].getNode("min") != nil){
- min = shaders[i].getNode("min");
- }
- if (shaders[i].getNode("max") != nil){
- max = shaders[i].getNode("max");
- }
-
- if (min != nil and max != nil and step != nil){
- fraction = step/(max+step);
- }
-
- var target = group.getChild("slider", i, 1);
- props.copy(group.getNode("slider-template"), target);
- target.getNode("label").setValue(name != nil ? name.getValue() : (shaders[i].getName()));
- target.getNode("name").setValue("aircraftshader"~i);
- target.getNode("binding").getNode("object-name").setValue("aircraftshader"~i);
- target.getNode("min").setValue(min);
- target.getNode("max").setValue(max);
- target.getNode("step").setValue(step);
- target.getNode("fraction").setValue(fraction);
- target.getNode("property").setValue(shaders[i].getPath()~"/quality-level");
- }
- }
-
-
-
-
-
- vbox
- left
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- dialog-apply
-
-
-
-
-
-
-
-
-
-
- hbox
-
-
- Back
-
- dialog-show
- rendering
-
-
- dialog-close
-
-
-
- Close
- true
- Esc
-
- dialog-close
-
-
-
-
-
diff --git a/gui/dialogs/shaders.xml b/gui/dialogs/shaders.xml
deleted file mode 100644
index 4bdfc82f7..000000000
--- a/gui/dialogs/shaders.xml
+++ /dev/null
@@ -1,435 +0,0 @@
-
-
-
- shaders
- false
- vbox
- 20
-
-
- hbox
-
- 1
-
-
-
- Shader options
-
-
-
- 1
-
-
-
- 16
- 16
-
- 27
- 2
-
- dialog-close
-
-
-
-
-
-
-
- hbox
-
- General
- left
-
-
- true
-
-
-
-
- hbox
-
-
- vbox
- left
-
-
- left
- Generic
-
-
-
- left
- Crop
-
-
- /sim/rendering/rembrandt/enabled
-
-
-
-
-
- left
- Landmass
-
-
- /sim/rendering/rembrandt/enabled
-
-
-
-
-
- left
- Persistent contrails
-
-
- /sim/rendering/rembrandt/enabled
-
-
-
-
-
- left
- Transition
-
-
-
- /sim/rendering/rembrandt/enabled
-
-
- /sim/rendering/materials-file
- Materials/dds/materials.xml
-
-
-
-
-
-
- left
- Model
-
-
-
- left
- Urban
-
-
-
- left
- Water
-
-
-
- left
- Lights
-
- /sim/rendering/rembrandt/enabled
-
-
-
-
-
-
- vbox
-
-
- generic
- 0.0
- 1.0
- 1.0
- 0.5
- true
- /sim/rendering/shaders/generic
-
- dialog-apply
- generic
-
-
-
-
- crop
-
-
- /sim/rendering/rembrandt/enabled
-
-
- 0.0
- 1.0
- 1.0
- 0.5
- true
- /sim/rendering/shaders/crop
-
- dialog-apply
- crop
-
-
-
-
- landmass
-
-
- /sim/rendering/rembrandt/enabled
-
-
- 0.0
- 5.0
- 1.0
- 0.17
- true
- /sim/rendering/shaders/landmass
-
- dialog-apply
- landmass
-
-
-
-
- contrails
-
-
- /sim/rendering/rembrandt/enabled
-
-
- 0.0
- 1.0
- 1.0
- 0.5
- true
- /sim/rendering/shaders/contrails
-
- dialog-apply
- contrails
-
-
-
-
- transition
-
-
-
- /sim/rendering/rembrandt/enabled
-
-
- /sim/rendering/materials-file
- Materials/dds/materials.xml
-
-
-
- 0.0
- 1.0
- 1.0
- 0.5
- true
- /sim/rendering/shaders/transition
-
- dialog-apply
- transition
-
-
-
-
- model
- 0.0
- 1.0
- 1.0
- 0.5
- true
- /sim/rendering/shaders/model
-
- dialog-apply
- model
-
-
-
-
- urban
- 0.0
- 5.0
- 1.0
- 0.17
- true
- /sim/rendering/shaders/urban
-
- dialog-apply
- urban
-
-
-
-
- water
- 0.0
- 5.0
- 1.0
- 0.17
- true
- /sim/rendering/shaders/water
-
- dialog-apply
- water
-
-
-
-
- lights
-
- /sim/rendering/rembrandt/enabled
-
- 0.0
- 4.0
- 1.0
- 0.2
- true
- /sim/rendering/shaders/lights
-
- dialog-apply
- lights
-
-
-
-
-
-
-
-
- Some shaders are disabled because
-
- 1.0
- 0.6
- 0.6
-
-
- /sim/rendering/rembrandt/enabled
-
-
-
- left
- you have Rembrandt enabled.
-
- 1.0
- 0.6
- 0.6
-
-
- /sim/rendering/rembrandt/enabled
-
-
-
-
- hbox
-
- Aircraft
- left
-
-
- true
-
-
-
-
-
- if (props.globals.getNode("/sim/rendering/shaders/aircraft") != nil) {
- var group = cmdarg().getChildren("group")[4];
- group.removeChildren("slider");
- group.removeChildren("hrule");
- group.removeChildren("text");
- var shaders = props.globals.getNode("/sim/rendering/shaders/aircraft").getChildren();
- for(i=0; size(shaders) > i; i+=1) {
-
- var fraction = 0.5;
- var min = 0;
- var max = 1;
- var step = 1;
-
- var name = shaders[i].getNode("name");
-
- if (shaders[i].getNode("step") != nil){
- step = shaders[i].getNode("step");
- }
- if (shaders[i].getNode("min") != nil){
- min = shaders[i].getNode("min");
- }
- if (shaders[i].getNode("max") != nil){
- max = shaders[i].getNode("max");
- }
-
- if (min != nil and max != nil and step != nil){
- fraction = step/(max+step);
- }
-
- var target = group.getChild("slider", i, 1);
- props.copy(group.getNode("slider-template"), target);
- target.getNode("label").setValue(name != nil ? name.getValue() : (shaders[i].getName()));
- target.getNode("name").setValue("aircraftshader"~i);
- target.getNode("binding").getNode("object-name").setValue("aircraftshader"~i);
- target.getNode("min").setValue(min);
- target.getNode("max").setValue(max);
- target.getNode("step").setValue(step);
- target.getNode("fraction").setValue(fraction);
- target.getNode("property").setValue(shaders[i].getPath()~"/quality-level");
- }
- }
-
-
-
-
-
- vbox
- left
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- dialog-apply
-
-
-
-
-
-
-
-
-
-
- hbox
-
-
- Back
-
- dialog-show
- rendering
-
-
- dialog-close
-
-
-
- Close
- true
- Esc
-
- dialog-close
-
-
-
-
-
diff --git a/gui/menubar.xml b/gui/menubar.xml
index 9b3892b43..fdb29be16 100644
--- a/gui/menubar.xml
+++ b/gui/menubar.xml
@@ -192,6 +192,17 @@
false
+ -
+
+ /sim/rendering/shaders/skydome
+
+ als-filter-effects
+
+ dialog-show
+ als-filters
+
+
+
-
/sim/rendering/composite-viewer-enabled