From 5981539a38d3e9db1d0e149aa9d8d89de6de3c98 Mon Sep 17 00:00:00 2001 From: fly Date: Mon, 2 Nov 2020 08:52:36 +1100 Subject: [PATCH 1/9] Autopush: Improve handeling on speedup Signed-off-by: fly --- Nasal/Autopush/autopush.nas | 3 ++- Nasal/Autopush/driver.nas | 1 + Nasal/Autopush/route.nas | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Nasal/Autopush/autopush.nas b/Nasal/Autopush/autopush.nas index 02b7f13f1..66e20b18a 100644 --- a/Nasal/Autopush/autopush.nas +++ b/Nasal/Autopush/autopush.nas @@ -85,12 +85,13 @@ var _loop = func() { } var _timer = maketimer(0.0167, func{_loop()}); +_timer.simulatedTime = 1; var _start = func() { # Else overwritten by dialog. settimer(func() { setprop("/sim/model/autopush/target-speed-km_h", 0.0) - }, 0.1); + }, 0.1, 1); _K_p = getprop("/sim/model/autopush/K_p"); _F_p = getprop("/sim/model/autopush/F_p"); _K_i = getprop("/sim/model/autopush/K_i"); diff --git a/Nasal/Autopush/driver.nas b/Nasal/Autopush/driver.nas index a8c1cbb1d..3b34debba 100644 --- a/Nasal/Autopush/driver.nas +++ b/Nasal/Autopush/driver.nas @@ -88,6 +88,7 @@ var _loop = func() { } var _timer = maketimer(0.051, func{_loop()}); +_timer.simulatedTime = 1; var _done = func() { stop(); diff --git a/Nasal/Autopush/route.nas b/Nasal/Autopush/route.nas index b67c60723..1dfd07817 100644 --- a/Nasal/Autopush/route.nas +++ b/Nasal/Autopush/route.nas @@ -89,7 +89,7 @@ var _stop = func(fail = 0) { settimer(func() { _finalize_top_view(); gui.popupTip("Done"); - }, 1.0); + }, 1.0, 1); } else { _finalize_top_view(); } From 35b432f28c8ff9839603be6bf7029440304a3f3d Mon Sep 17 00:00:00 2001 From: Erik Hofman Date: Tue, 3 Nov 2020 11:51:27 +0100 Subject: [PATCH 2/9] =?UTF-8?q?Add=20a=20K=C3=B6ppen-Geiger=20climate=20da?= =?UTF-8?q?tabase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Geodata/README | 40 ++++++++++++++++++++++++++++++++++++++ Geodata/koppen-geiger.png | Bin 0 -> 248819 bytes 2 files changed, 40 insertions(+) create mode 100644 Geodata/README create mode 100644 Geodata/koppen-geiger.png diff --git a/Geodata/README b/Geodata/README new file mode 100644 index 000000000..089e7be95 --- /dev/null +++ b/Geodata/README @@ -0,0 +1,40 @@ +Köppen_Geiger climate map of the world: +------------------------------------------------------------------------------ +Website: http://koeppen-geiger.vu-wien.ac.at/present.htm +Download: http://koeppen-geiger.vu-wien.ac.at/Rcode/Map_KG-Global.zip + +ASICII +CODE description +----------------------------------------------------- + 1 Af equatorial, fully humid + 2 Am equatorial, monsoonal + 3 As equatorial, summer dry + 4 Aw equatorial, winter dry + 5 BSh arid, steppe, hot arid + 6 BSk arid, steppe, cold arid + 7 BWh arid, desert, hot arid + 8 BWk arid, desert, cold arid + 9 Cfa warm temperature, fully humid hot summer +10 Cfb warm temperature, fully humid, warm summer +11 Cfc warm temperature, fully humid, cool summer +12 Csa warm temperature, summer dry, hot summer +13 Csb warm temperature, summer dry, warm summer +14 Csc warm temperature, summer dry, cool summer +15 Cwa warm temperature, winter dry, hot summer +16 Cwb warm temperature, winter dry, warm summer +17 Cwc warm temperature, winter dry, cool summer +18 Dfa snow, fully humid, hot summer +19 Dfb snow, fully humid, warm summer, warm summer +20 Dfc snow, fully humid, cool summer, cool summer +21 Dfd snow, fully humid, extremely continetal +22 Dsa snow, summer dry, hot summer +23 Dsb snow, summer dry, warm summer +24 Dsc snow, summer dry, cool summer +25 Dsd snow, summer dry, extremely continetal +26 Dwa snow, winter dry, hot summer +27 Dwb snow, winter dry, warm summer +28 Dwc snow, winter dry, cool summer +29 Dwd snow, winter dry, extremely continetal +30 EF polar frost +31 ET polar tundra +32 Ocean (converted to 0 in the image file) diff --git a/Geodata/koppen-geiger.png b/Geodata/koppen-geiger.png new file mode 100644 index 0000000000000000000000000000000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D48+$d;s4x51-&4Q Date: Sun, 8 Nov 2020 22:44:34 +0000 Subject: [PATCH 3/9] WS3.0: Initial commit of WS3.0 rendering --- Compositor/Effects/ws30.eff | 782 ++++++++++++++++++++++++++++++ Compositor/Shaders/ALS/ws30.frag | 278 +++++++++++ Materials/base/materials-base.xml | 27 ++ 3 files changed, 1087 insertions(+) create mode 100644 Compositor/Effects/ws30.eff create mode 100644 Compositor/Shaders/ALS/ws30.frag diff --git a/Compositor/Effects/ws30.eff b/Compositor/Effects/ws30.eff new file mode 100644 index 000000000..3471da921 --- /dev/null +++ b/Compositor/Effects/ws30.eff @@ -0,0 +1,782 @@ + + + + Effects/ws30 + + + + + 0.2 .2 0.2 1.0 + + + .8 .8 .8 1.0 + + + 0.0 0.0 0.0 1.0 + + + 0.0 0.0 0.0 1.0 + + 1.2 + + + Textures/Terrain/cropgrass1.png + 2d + linear-mipmap-linear + + repeat + repeat + + + normalized + + + Textures/Terrain/city1.png + 2d + linear-mipmap-linear + + repeat + repeat + + + normalized + + + Textures/Terrain/water.png + 2d + linear-mipmap-linear + + repeat + repeat + + + normalized + + + Textures/Terrain/snow3.png + 2d + linear-mipmap-linear + repeat + repeat + normalized + + + Textures/Terrain/void.png + 2d + linear-mipmap-linear + repeat + repeat + normalized + + + Textures/Terrain/void.png + 2d + linear-mipmap-linear + repeat + repeat + normalized + + + Textures/Terrain/rock_alt.png + 2d + linear-mipmap-linear + repeat + repeat + normalized + + + Textures/Terrain/grain_texture.png + 2d + linear-mipmap-linear + repeat + repeat + normalized + + + Textures/Terrain/void.png + 2d + linear-mipmap-linear + repeat + repeat + normalized + + false + + 0 + RenderBin + + 0 + 0.5 + 0.0 + 0.5 + 0.0 + 1.0 + 1.0 + 1.0 + 0 + false + + /environment/ground-visibility-m + + + /environment/visibility-m + + + /environment/ground-haze-thickness-m + + + /rendering/scene/scattering + + + /environment/surface/scattering + + + /environment/terminator-relative-position-m + + + /environment/mean-terrain-elevation-m + + + /rendering/scene/overcast + + + /sim/rendering/eye-altitude-m + + + /environment/snow-level-m + + + /environment/surface/snow-thickness-factor + + + /environment/surface/dust-cover-factor + + + /environment/surface/lichen-cover-factor + + + /environment/surface/wetness + + + /sim/rendering/shaders/skydome + + + /environment/fog-structure + + + /environment/cloud-self-shading + + + /environment/moonlight + + + /environment/season + + + /environment/air-pollution-norm + + + /environment/surface/delta-T-soil + + + /sim/rendering/shaders/wind-effects + + + /environment/sea/surface/wind-from-east-fps + + + /environment/sea/surface/wind-from-north-fps + + + /sim/startup/xsize + + + /sim/startup/ysize + + + /sim/current-view/pitch-offset-deg + + + /sim/current-view/heading-offset-deg + + + /sim/current-view/field-of-view + + + /sim/rendering/als-secondary-lights/use-searchlight + + + /sim/rendering/als-secondary-lights/use-landing-light + + + /sim/rendering/als-secondary-lights/use-alt-landing-light + + + /sim/rendering/als-secondary-lights/landing-light1-offset-deg + + + /sim/rendering/als-secondary-lights/landing-light2-offset-deg + + + /sim/rendering/als-secondary-lights/landing-light3-offset-deg + + + /sim/rendering/shaders/landmass + + + /sim/rendering/shaders/transition + + + /sim/rendering/als-filters/use-filtering + + + /sim/rendering/als-filters/gamma + + + /sim/rendering/als-filters/brightness + + + /sim/rendering/als-filters/grey-factor + + + /sim/rendering/als-filters/black-factor + + + /sim/rendering/als-filters/use-night-vision + + + /sim/rendering/als-filters/use-IR-vision + + + /local-weather/cloud-shadows/cloudpos-x[0] + + + /local-weather/cloud-shadows/cloudpos-y[0] + + + /local-weather/cloud-shadows/cloudpos-x[1] + + + /local-weather/cloud-shadows/cloudpos-y[1] + + + /local-weather/cloud-shadows/cloudpos-x[2] + + + /local-weather/cloud-shadows/cloudpos-y[2] + + + /local-weather/cloud-shadows/cloudpos-x[3] + + + /local-weather/cloud-shadows/cloudpos-y[3] + + + /local-weather/cloud-shadows/cloudpos-x[4] + + + /local-weather/cloud-shadows/cloudpos-y[4] + + + /local-weather/cloud-shadows/cloudpos-x[5] + + + /local-weather/cloud-shadows/cloudpos-y[5] + + + /local-weather/cloud-shadows/cloudpos-x[6] + + + /local-weather/cloud-shadows/cloudpos-y[6] + + + /local-weather/cloud-shadows/cloudpos-x[7] + + + /local-weather/cloud-shadows/cloudpos-y[7] + + + /local-weather/cloud-shadows/cloudpos-x[8] + + + /local-weather/cloud-shadows/cloudpos-y[8] + + + /local-weather/cloud-shadows/cloudpos-x[9] + + + /local-weather/cloud-shadows/cloudpos-y[9] + + + /local-weather/cloud-shadows/cloudpos-x[10] + + + /local-weather/cloud-shadows/cloudpos-y[10] + + + /local-weather/cloud-shadows/cloudpos-x[11] + + + /local-weather/cloud-shadows/cloudpos-y[11] + + + /local-weather/cloud-shadows/cloudpos-x[12] + + + /local-weather/cloud-shadows/cloudpos-y[12] + + + /local-weather/cloud-shadows/cloudpos-x[13] + + + /local-weather/cloud-shadows/cloudpos-y[13] + + + /local-weather/cloud-shadows/cloudpos-x[14] + + + /local-weather/cloud-shadows/cloudpos-y[14] + + + /local-weather/cloud-shadows/cloudpos-x[15] + + + /local-weather/cloud-shadows/cloudpos-y[15] + + + /local-weather/cloud-shadows/cloudpos-x[16] + + + /local-weather/cloud-shadows/cloudpos-y[16] + + + /local-weather/cloud-shadows/cloudpos-x[17] + + + /local-weather/cloud-shadows/cloudpos-y[17] + + + /local-weather/cloud-shadows/cloudpos-x[18] + + + /local-weather/cloud-shadows/cloudpos-y[18] + + + /local-weather/cloud-shadows/cloudpos-x[19] + + + /local-weather/cloud-shadows/cloudpos-y[19] + + + /local-weather/cloud-shadows/nearest-cloudpos-x + + + /local-weather/cloud-shadows/nearest-cloudpos-y + + + /local-weather/cloud-shadows/cloud-shadow-flag + + + + /sim/rendering/als/shadows/enabled + + + /sim/rendering/als/shadows/sun-atlas-size + + + + + + als-lighting + + + + + 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 + + + material/emissive + + + material/shininess + + ambient-and-diffuse + + + transparent + + + transparent + + smooth + back + + + render-bin/bin-number + + + render-bin/bin-name + + + + 0 + + texture[0]/image + + + texture[0]/filter + + + texture[0]/wrap-s + + + texture[0]/wrap-t + + + texture[0]/internal-format + + + + + 1 + + texture[1]/image + + + texture[1]/filter + + + texture[1]/wrap-s + + + texture[1]/wrap-t + + + texture[1]/internal-format + + + + 2 + + texture[2]/image + + + texture[2]/filter + + + texture[2]/wrap-s + + + texture[2]/wrap-t + + + texture[2]/internal-format + + + + + 3 + + texture[3]/image + + + texture[3]/filter + + + texture[3]/wrap-s + + + texture[3]/wrap-t + + + texture[3]/internal-format + + + + + Shaders/ALS/generic-base.vert + Shaders/ALS/shadows-include.vert + Shaders/ALS/ws30.frag + Shaders/ALS/hazes.frag + Shaders/ALS/noise.frag + Shaders/ALS/filters.frag + Shaders/ALS/shadows-include.frag + + + 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 + + + + cloud_self_shading + float + + cloud_self_shading + + + + moonlight + float + + moonlight + + + + air_pollution + float + + air_pollution + + + + + 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 + + + + display_xsize + int + + display_xsize + + + + display_ysize + int + + display_ysize + + + + landclass + sampler-2d + 0 + + + texture1 + sampler-2d + 1 + + + texture2 + sampler-2d + 2 + + + texture3 + sampler-2d + 3 + + + colorMode + int + 2 + + + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + + + lequal + + + + + diff --git a/Compositor/Shaders/ALS/ws30.frag b/Compositor/Shaders/ALS/ws30.frag new file mode 100644 index 000000000..f227d516a --- /dev/null +++ b/Compositor/Shaders/ALS/ws30.frag @@ -0,0 +1,278 @@ +// WS30 FRAGMENT SHADER + +// -*-C++-*- +#version 120 + +// written by Thorsten Renk, Oct 2011, based on default.frag +// Ambient term comes in gl_Color.rgb. +varying vec4 diffuse_term; +varying vec3 normal; +varying vec3 relPos; + + +uniform float fg_Fcoef; + +uniform sampler2D landclass; +uniform sampler2D texture1; +uniform sampler2D texture2; +uniform sampler2D texture3; + + +varying float yprime_alt; +varying float mie_angle; + +varying float flogz; + + +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 cloud_self_shading; + +const float EarthRadius = 5800000.0; +const float terminator_width = 200000.0; + +float alt; +float eShade; + +float fog_func (in float targ, in float alt); +vec3 get_hazeColor(in float light_arg); +vec3 filter_combined (in vec3 color) ; + +float getShadowing(); + +float luminance(vec3 color) +{ + return dot(vec3(0.212671, 0.715160, 0.072169), color); +} + + + +void main() +{ + + vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); +// this is taken from default.frag + 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 lc; + vec4 fragColor; + vec4 specular = vec4(0.0); + float intensity; + + float effective_scattering = min(scattering, cloud_self_shading); + + + vec4 light_specular = gl_LightSource[0].specular; + + // 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) { + float shadowmap = getShadowing(); + color += diffuse_term * NdotL * shadowmap; + NdotHV = max(dot(n, halfVector), 0.0); + if (gl_FrontMaterial.shininess > 0.0) + specular.rgb = (gl_FrontMaterial.specular.rgb + * light_specular.rgb + * pow(NdotHV, gl_FrontMaterial.shininess) + * shadowmap); + } + 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); + +/* + landclass = texture2D(texture, gl_TexCoord[0].st); + texel = (landclass.r > 0.148) * texture2D(texture, gl_TexCoord[3].st) + + (landclass.g < 0.02) * texture2D(texture, gl_TexCoord[2].st) + + (1 - ((landclass.r > 0.148) || (landclass.g < 0.02))) * texture2D(texture, gl_TexCoord[1].st); +*/ + lc = texture2D(landclass, gl_TexCoord[0].st); + if (lc.r > 0.148) { + // Water + texel = texture2D(texture3, gl_TexCoord[0].st); + } else if (lc.g > 0.02) { + texel = texture2D(texture1, gl_TexCoord[0].st); + } else { + texel = texture2D(texture2, gl_TexCoord[0].st); + } + + //texel = texture2D(texture, gl_TexCoord[0].st); + fragColor = color * texel + specular; + + + +// here comes the terrain haze model + + +float delta_z = hazeLayerAltitude - eye_alt; +float dist = length(relPos); + +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; + +// 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) + { + 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 + { + 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;} + + +float lightArg = (terminator-yprime_alt)/100000.0; +vec3 hazeColor = get_hazeColor(lightArg); + + + +// 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)) ); + } + +// high altitude desaturation of the haze color + +intensity = length(hazeColor); +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 +//intensity = length(hazeColor); +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(normal,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); + +// determine the right mix of transmission and haze + +fragColor.rgb = mix(hazeColor, fragColor.rgb,transmission); +} + +fragColor.rgb = filter_combined(fragColor.rgb); + +gl_FragColor = fragColor; +// logarithmic depth +gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; +} + diff --git a/Materials/base/materials-base.xml b/Materials/base/materials-base.xml index 4bdc77d43..cf1fe4cf4 100644 --- a/Materials/base/materials-base.xml +++ b/Materials/base/materials-base.xml @@ -11,6 +11,33 @@ + + ws30 + Effects/ws30 + 2000 + 2000 + 4000000.0 + + 0.93 + 0.95 + 0.93 + 1.0 + + + 0.1 + 0.12 + 0.1 + 1.0 + + 1.2 + 1 + 0.7 + 0.1 + 0.15 + 1e30 + + + From 7f66257bfb0ff1b9cd2b79e89bccf4efc2836af1 Mon Sep 17 00:00:00 2001 From: Erik Hofman Date: Mon, 9 Nov 2020 11:44:08 +0100 Subject: [PATCH 4/9] Add climate selection options to set the environment and weather based on climate data. Setting the weather is not yet implemented in the code but eventually it will be. --- Environment/environment.xml | 5 ++++ gui/dialogs/environment-settings.xml | 34 ++++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/Environment/environment.xml b/Environment/environment.xml index c04b70eb5..a48fa2bba 100644 --- a/Environment/environment.xml +++ b/Environment/environment.xml @@ -283,6 +283,11 @@ + + false + false + + clear diff --git a/gui/dialogs/environment-settings.xml b/gui/dialogs/environment-settings.xml index 5bb373790..e4d41a913 100644 --- a/gui/dialogs/environment-settings.xml +++ b/gui/dialogs/environment-settings.xml @@ -88,15 +88,45 @@ - hbox + vbox left left + + hbox + + + + climate-update + /environment/climate/weather-update + true + + dialog-apply + + + property-toggle + + + + + + climate-update + /environment/climate/environment-update + true + + dialog-apply + + + property-toggle + + + + - + metar-snow /environment/params/metar-updates-snow-level From 605f0e3c742ae4e68455a86378792ebb4e656a60 Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Thu, 12 Nov 2020 20:47:08 +0000 Subject: [PATCH 5/9] WS3.0: Add forest texture to shader Interm shader update until texture array support available. --- Compositor/Effects/ws30.eff | 53 ++++++++++++++++++++++++++++---- Compositor/Shaders/ALS/ws30.frag | 35 ++++++++++----------- 2 files changed, 63 insertions(+), 25 deletions(-) diff --git a/Compositor/Effects/ws30.eff b/Compositor/Effects/ws30.eff index 3471da921..acece4aa5 100644 --- a/Compositor/Effects/ws30.eff +++ b/Compositor/Effects/ws30.eff @@ -46,6 +46,19 @@ normalized + Textures/Terrain/forest.png + 2d + linear-mipmap-linear + + repeat + repeat + + + normalized + + Textures/Terrain/water.png 2d linear-mipmap-linear @@ -492,9 +505,8 @@ texture[0]/image - - texture[0]/filter - + nearest-mipmap-nearest + nearest-mipmap-nearest texture[0]/wrap-s @@ -504,6 +516,11 @@ texture[0]/internal-format + + max + max + max + @@ -562,6 +579,25 @@ + + 4 + + texture[4]/image + + + texture[4]/filter + + + texture[4]/wrap-s + + + texture[4]/wrap-t + + + texture[4]/internal-format + + + Shaders/ALS/generic-base.vert Shaders/ALS/shadows-include.vert @@ -732,20 +768,25 @@ 0 - texture1 + grass sampler-2d 1 - texture2 + city sampler-2d 2 - texture3 + forest sampler-2d 3 + + water + sampler-2d + 4 + colorMode int diff --git a/Compositor/Shaders/ALS/ws30.frag b/Compositor/Shaders/ALS/ws30.frag index f227d516a..c794b508c 100644 --- a/Compositor/Shaders/ALS/ws30.frag +++ b/Compositor/Shaders/ALS/ws30.frag @@ -13,9 +13,10 @@ varying vec3 relPos; uniform float fg_Fcoef; uniform sampler2D landclass; -uniform sampler2D texture1; -uniform sampler2D texture2; -uniform sampler2D texture3; +uniform sampler2D grass; +uniform sampler2D city; +uniform sampler2D forest; +uniform sampler2D water; varying float yprime_alt; @@ -64,7 +65,6 @@ void main() vec3 lightDir = gl_LightSource[0].position.xyz; vec3 halfVector = gl_LightSource[0].halfVector.xyz; vec4 texel; - vec4 lc; vec4 fragColor; vec4 specular = vec4(0.0); float intensity; @@ -96,27 +96,24 @@ void main() // is closer to what the OpenGL fixed function pipeline does. color = clamp(color, 0.0, 1.0); -/* - landclass = texture2D(texture, gl_TexCoord[0].st); - texel = (landclass.r > 0.148) * texture2D(texture, gl_TexCoord[3].st) + - (landclass.g < 0.02) * texture2D(texture, gl_TexCoord[2].st) + - (1 - ((landclass.r > 0.148) || (landclass.g < 0.02))) * texture2D(texture, gl_TexCoord[1].st); -*/ - lc = texture2D(landclass, gl_TexCoord[0].st); - if (lc.r > 0.148) { - // Water - texel = texture2D(texture3, gl_TexCoord[0].st); - } else if (lc.g > 0.02) { - texel = texture2D(texture1, gl_TexCoord[0].st); + int lc = int(texture2D(landclass, gl_TexCoord[0].st).r * 256.0 + 0.5); + + if ((lc == 1) || (lc == 2) || (lc == 4) || (lc == 5)) + { + texel = texture2D(city, gl_TexCoord[0].st); + } else if ((lc > 21) && (lc < 25)) + { + texel = texture2D(forest, gl_TexCoord[0].st); + } else if (lc > 38) + { + texel = texture2D(water, gl_TexCoord[0].st); } else { - texel = texture2D(texture2, gl_TexCoord[0].st); + texel = texture2D(grass, gl_TexCoord[0].st); } //texel = texture2D(texture, gl_TexCoord[0].st); fragColor = color * texel + specular; - - // here comes the terrain haze model From 3cace276d211ced8e5bc435cc4ec579cdfe3121c Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Sat, 14 Nov 2020 21:04:30 +0000 Subject: [PATCH 6/9] WS3.0: Add tile_level, tile_width, tile_height Add Uniforms to WS3.0 fragment shader to provide LoD information and make sampling of adjacent points in the landclass texture easier. --- Compositor/Shaders/ALS/ws30.frag | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Compositor/Shaders/ALS/ws30.frag b/Compositor/Shaders/ALS/ws30.frag index c794b508c..c6eaac854 100644 --- a/Compositor/Shaders/ALS/ws30.frag +++ b/Compositor/Shaders/ALS/ws30.frag @@ -35,6 +35,11 @@ uniform float overcast; uniform float eye_alt; uniform float cloud_self_shading; +// Passed from VPBTechnique, not the Effect +uniform int tile_level; +uniform float tile_width; +uniform float tile_height; + const float EarthRadius = 5800000.0; const float terminator_width = 200000.0; From 69c9f31ab5557fc9d5437d070bf520a0e623b6ad Mon Sep 17 00:00:00 2001 From: Erik Hofman Date: Sun, 15 Nov 2020 09:32:14 +0100 Subject: [PATCH 7/9] Show the name of the region where the clicked material is stored. --- Aircraft/ufo/ufo.nas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Aircraft/ufo/ufo.nas b/Aircraft/ufo/ufo.nas index f113a5ba4..d7f7ba9cb 100644 --- a/Aircraft/ufo/ufo.nas +++ b/Aircraft/ufo/ufo.nas @@ -439,7 +439,8 @@ var modelmgr = { if (KbdAlt.getValue() and KbdCtrl.getValue()) { # Provide information on the selected point var geod = geodinfo(me.mouse_coord.lat(), me.mouse_coord.lon()); var landclass = string.join(" ", geod[1].names); - var str = sprintf("lat:%.4f lon:%.4f alt:%.0fm class(es): %s", + var str = sprintf("%s: lat:%.4f lon:%.4f alt:%.0fm class(es): %s", + geod[1].region, me.mouse_coord.lat(), me.mouse_coord.lon(), me.mouse_coord.alt(), landclass); gui.popupTip(str, 3); From 8cb0faef604031a9ba59b151efa657187f141c99 Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Sun, 15 Nov 2020 19:33:15 +0000 Subject: [PATCH 8/9] FG1000: Enable mipmapping to Reduces aliasing artifacts. --- Aircraft/Instruments-3d/FG1000/Nasal/FG1000.nas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Aircraft/Instruments-3d/FG1000/Nasal/FG1000.nas b/Aircraft/Instruments-3d/FG1000/Nasal/FG1000.nas index 9542fa901..597d61630 100644 --- a/Aircraft/Instruments-3d/FG1000/Nasal/FG1000.nas +++ b/Aircraft/Instruments-3d/FG1000/Nasal/FG1000.nas @@ -109,7 +109,7 @@ addMFD : func(index=nil, targetcanvas=nil) { "name" : "MFD Canvas", "size" : [1024, 768], "view" : [1024, 768], - "mipmapping": 0, + "mipmapping": 1, }); } @@ -135,7 +135,7 @@ addPFD : func(index=nil, targetcanvas=nil) { "name" : "PFD Canvas", "size" : [1024, 768], "view" : [1024, 768], - "mipmapping": 0, + "mipmapping": 1, }); } From a3a8f9123ef079348aefb1f17d98c411cbfe4aac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Garc=C3=ADa=20Li=C3=B1=C3=A1n?= Date: Tue, 10 Nov 2020 01:45:54 +0100 Subject: [PATCH 9/9] Make Compositor default - Remove all Compositor Effects and Shaders. - Unify the low-spec and ALS pipelines in a single pipeline called 'Classic'. - Readd shadow mapping. - Move the WS30 Effect and fragment shader out of the Compositor-specific directories. --- Compositor/Classic/classic.xml | 88 + Compositor/Classic/common-scene.xml | 16 + .../{ALS/csm.xml => Classic/csm-pass.xml} | 8 +- Compositor/Effects/agriculture.eff | 1178 -------- Compositor/Effects/airfield.eff | 891 ------ Compositor/Effects/birdswarm.eff | 235 -- Compositor/Effects/bowwave.eff | 1094 ------- Compositor/Effects/building.eff | 407 --- Compositor/Effects/bumpspec.eff | 5 - Compositor/Effects/chrome.eff | 125 - Compositor/Effects/chute.eff | 460 --- Compositor/Effects/cityLM.eff | 35 - Compositor/Effects/cliffs.eff | 791 ----- Compositor/Effects/cloud-impostor.eff | 328 --- Compositor/Effects/cloud-models.eff | 151 - Compositor/Effects/cloud-noctilucent.eff | 196 -- Compositor/Effects/cloud-static.eff | 489 ---- Compositor/Effects/cloud.eff | 629 ---- Compositor/Effects/clouds-box.eff | 82 - Compositor/Effects/clouds-layered.eff | 74 - Compositor/Effects/clouds-thick.eff | 74 - Compositor/Effects/clouds-thin.eff | 82 - Compositor/Effects/clouds-thinlayer.eff | 74 - Compositor/Effects/crop.eff | 153 - Compositor/Effects/cropgrass.eff | 25 - Compositor/Effects/dirt-runway.eff | 928 ------ Compositor/Effects/flutter.eff | 535 ---- Compositor/Effects/forest.eff | 348 --- Compositor/Effects/glacier.eff | 348 --- Compositor/Effects/glass.eff | 694 ----- Compositor/Effects/grass.eff | 1181 -------- Compositor/Effects/herbtundra.eff | 347 --- Compositor/Effects/hud.eff | 719 ----- Compositor/Effects/landmass-nowood.eff | 8 - Compositor/Effects/landmass-scrub.eff | 16 - Compositor/Effects/landmass.eff | 578 ---- Compositor/Effects/lfeat.eff | 96 - Compositor/Effects/light-cone.eff | 4 - Compositor/Effects/light-point.eff | 4 - Compositor/Effects/light-spot.eff | 4 - Compositor/Effects/lightning.eff | 9 - Compositor/Effects/material-diffuse.eff | 11 - Compositor/Effects/material-off.eff | 11 - .../Effects/model-combined-deferred.eff | 5 - .../Effects/model-combined-transparent.eff | 114 - Compositor/Effects/model-combined.eff | 2025 ------------- Compositor/Effects/model-default.eff | 830 ------ Compositor/Effects/model-interior-display.eff | 901 ------ Compositor/Effects/model-interior.eff | 1053 ------- Compositor/Effects/model-transparent.eff | 196 -- Compositor/Effects/model-wingflex-organic.eff | 1962 ------------- Compositor/Effects/planet-aurora.eff | 279 -- Compositor/Effects/planet-cloudlayer.eff | 442 --- Compositor/Effects/planet.eff | 760 ----- Compositor/Effects/procedural-light.eff | 300 -- Compositor/Effects/rain-layer.eff | 342 --- Compositor/Effects/reflect.eff | 5 - Compositor/Effects/road-high.eff | 9 - Compositor/Effects/road-low.eff | 9 - Compositor/Effects/road-mid.eff | 9 - Compositor/Effects/road.eff | 1164 -------- Compositor/Effects/rock.eff | 791 ----- Compositor/Effects/runway-dds.eff | 11 - Compositor/Effects/runway.eff | 1588 ---------- Compositor/Effects/shadow-vol.eff | 4 - Compositor/Effects/shadow.eff | 4 - Compositor/Effects/skydome.eff | 463 --- Compositor/Effects/space-combined.eff | 963 ------- Compositor/Effects/space.eff | 15 - .../Effects/surface-lights-directional.eff | 365 --- Compositor/Effects/surface-lights.eff | 376 --- Compositor/Effects/terrain-default.eff | 2312 --------------- Compositor/Effects/terrain-overlay.eff | 1287 --------- Compositor/Effects/thrust-flame.eff | 300 -- Compositor/Effects/transition-base-dirt.eff | 17 - .../Effects/transition-base-grass-inverse.eff | 17 - .../Effects/transition-base-grass-rock.eff | 33 - Compositor/Effects/transition-base-rock.eff | 17 - Compositor/Effects/transition.eff | 373 --- .../Effects/tree-european-deciduous.eff | 8 - Compositor/Effects/tree-european-mixed.eff | 8 - Compositor/Effects/tree-forest.eff | 10 - Compositor/Effects/tree-grass.eff | 9 - Compositor/Effects/tree.eff | 2558 ----------------- Compositor/Effects/urban.eff | 2191 -------------- Compositor/Effects/water-dds.eff | 56 - Compositor/Effects/water-inland.eff | 2063 ------------- Compositor/Effects/water.eff | 2504 ---------------- Compositor/Shaders/ALS/3dcloud-detailed.frag | 90 - Compositor/Shaders/ALS/3dcloud-detailed.vert | 296 -- Compositor/Shaders/ALS/3dcloud.frag | 30 - Compositor/Shaders/ALS/3dcloud.vert | 271 -- Compositor/Shaders/ALS/agriculture.frag | 667 ----- Compositor/Shaders/ALS/airfield.frag | 530 ---- Compositor/Shaders/ALS/birds.frag | 212 -- Compositor/Shaders/ALS/birds.vert | 52 - Compositor/Shaders/ALS/bowwave.frag | 449 --- Compositor/Shaders/ALS/building-default.vert | 314 -- .../Shaders/ALS/building-model-ultra.vert | 190 -- Compositor/Shaders/ALS/building.vert | 283 -- Compositor/Shaders/ALS/chute.vert | 296 -- Compositor/Shaders/ALS/cliffs.frag | 625 ---- Compositor/Shaders/ALS/cloud-impostor.vert | 139 - Compositor/Shaders/ALS/cloud-noctilucent.vert | 148 - Compositor/Shaders/ALS/cloud-shadowfunc.frag | 156 - .../Shaders/ALS/cloud-static-detailed.frag | 65 - .../Shaders/ALS/cloud-static-detailed.vert | 146 - Compositor/Shaders/ALS/cloud-static.frag | 26 - Compositor/Shaders/ALS/cloud-static.vert | 141 - Compositor/Shaders/ALS/clustered-include.frag | 133 - Compositor/Shaders/ALS/color_temperature.frag | 51 - Compositor/Shaders/ALS/drunway.frag | 509 ---- Compositor/Shaders/ALS/filters.frag | 146 - Compositor/Shaders/ALS/filters.vert | 11 - Compositor/Shaders/ALS/flutter.vert | 315 -- Compositor/Shaders/ALS/generic-base.vert | 254 -- Compositor/Shaders/ALS/glass.frag | 260 -- Compositor/Shaders/ALS/glass.vert | 143 - Compositor/Shaders/ALS/grass.frag | 180 -- Compositor/Shaders/ALS/grass.geom | 74 - Compositor/Shaders/ALS/grass.vert | 17 - Compositor/Shaders/ALS/hazes.frag | 103 - Compositor/Shaders/ALS/hud.frag | 294 -- Compositor/Shaders/ALS/hud.vert | 144 - Compositor/Shaders/ALS/light.frag | 237 -- Compositor/Shaders/ALS/light.vert | 90 - Compositor/Shaders/ALS/lightspot.frag | 108 - Compositor/Shaders/ALS/model-base.frag | 333 --- .../Shaders/ALS/model-interior-base.frag | 188 -- .../Shaders/ALS/model-interior-detailed.frag | 248 -- .../Shaders/ALS/model-interior-detailed.vert | 308 -- .../Shaders/ALS/model-interior-display.frag | 368 --- Compositor/Shaders/ALS/model-transparent.frag | 51 - Compositor/Shaders/ALS/model-transparent.vert | 65 - Compositor/Shaders/ALS/model-ultra.frag | 691 ----- Compositor/Shaders/ALS/model-ultra.vert | 123 - .../Shaders/ALS/model-wingflex-organic.vert | 172 -- Compositor/Shaders/ALS/noise.frag | 293 -- Compositor/Shaders/ALS/planet-aurora.frag | 77 - Compositor/Shaders/ALS/planet-aurora.vert | 32 - Compositor/Shaders/ALS/planet-cloudlayer.frag | 186 -- Compositor/Shaders/ALS/planet-high.frag | 193 -- Compositor/Shaders/ALS/planet.frag | 151 - Compositor/Shaders/ALS/planet.vert | 73 - Compositor/Shaders/ALS/rain-layer.frag | 71 - Compositor/Shaders/ALS/rain-layer.vert | 139 - Compositor/Shaders/ALS/road-ultra.frag | 873 ------ Compositor/Shaders/ALS/rock.frag | 684 ----- Compositor/Shaders/ALS/runway.frag | 537 ---- Compositor/Shaders/ALS/secondary_lights.frag | 102 - Compositor/Shaders/ALS/skydome.frag | 385 --- Compositor/Shaders/ALS/skydome.vert | 301 -- Compositor/Shaders/ALS/space-base.frag | 365 --- Compositor/Shaders/ALS/space-base.vert | 269 -- Compositor/Shaders/ALS/space-ultra.frag | 683 ----- Compositor/Shaders/ALS/space-ultra.vert | 118 - Compositor/Shaders/ALS/surface-light.frag | 183 -- Compositor/Shaders/ALS/surface-light.vert | 45 - Compositor/Shaders/ALS/terrain-base.frag | 255 -- Compositor/Shaders/ALS/terrain-detailed.frag | 511 ---- Compositor/Shaders/ALS/terrain-detailed.vert | 311 -- Compositor/Shaders/ALS/terrain-overlay.frag | 176 -- Compositor/Shaders/ALS/terrain-overlay.geom | 64 - Compositor/Shaders/ALS/terrain-ultra.frag | 672 ----- Compositor/Shaders/ALS/terrain-ultra.vert | 303 -- .../Shaders/ALS/terrain-writedepth.frag | 12 - .../Shaders/ALS/terrain-writedepth.vert | 10 - Compositor/Shaders/ALS/thrustflame.frag | 148 - Compositor/Shaders/ALS/thrustflame.vert | 25 - Compositor/Shaders/ALS/tree-shadow.frag | 390 --- Compositor/Shaders/ALS/tree-shadow.vert | 365 --- Compositor/Shaders/ALS/tree.frag | 370 --- Compositor/Shaders/ALS/tree.vert | 280 -- Compositor/Shaders/ALS/urban.frag | 610 ---- Compositor/Shaders/ALS/urban.vert | 291 -- Compositor/Shaders/ALS/wake.vert | 233 -- Compositor/Shaders/ALS/water-base.frag | 565 ---- Compositor/Shaders/ALS/water-high.frag | 748 ----- Compositor/Shaders/ALS/water.vert | 299 -- Compositor/Shaders/Default/3dcloud.frag | 17 - Compositor/Shaders/Default/3dcloud.vert | 90 - Compositor/Shaders/Default/bowwave.frag | 217 -- .../Shaders/Default/building-default.vert | 135 - .../Shaders/Default/building-ubershader.vert | 126 - Compositor/Shaders/Default/cloud-static.frag | 14 - Compositor/Shaders/Default/cloud-static.vert | 55 - Compositor/Shaders/Default/clouds-box.frag | 13 - Compositor/Shaders/Default/clouds-box.vert | 72 - .../Shaders/Default/clouds-layered.frag | 13 - .../Shaders/Default/clouds-layered.vert | 63 - Compositor/Shaders/Default/clouds-thick.frag | 13 - Compositor/Shaders/Default/clouds-thick.vert | 63 - Compositor/Shaders/Default/clouds-thin.frag | 13 - Compositor/Shaders/Default/clouds-thin.vert | 72 - .../Shaders/Default/clouds-thinlayer.frag | 13 - .../Shaders/Default/clouds-thinlayer.vert | 63 - Compositor/Shaders/Default/crop.frag | 79 - Compositor/Shaders/Default/crop.vert | 24 - Compositor/Shaders/Default/default.frag | 57 - Compositor/Shaders/Default/default.vert | 61 - Compositor/Shaders/Default/flutter.vert | 143 - Compositor/Shaders/Default/forest.frag | 193 -- Compositor/Shaders/Default/forest.vert | 34 - Compositor/Shaders/Default/include_fog.frag | 18 - Compositor/Shaders/Default/include_fog.vert | 12 - Compositor/Shaders/Default/landmass-g.vert | 59 - Compositor/Shaders/Default/landmass.frag | 152 - Compositor/Shaders/Default/landmass.geom | 124 - Compositor/Shaders/Default/landmass.vert | 37 - Compositor/Shaders/Default/rain-layer.frag | 12 - Compositor/Shaders/Default/rain-layer.vert | 56 - .../Shaders/Default/reflect-bump-spec.frag | 141 - .../Shaders/Default/reflect-bump-spec.vert | 71 - Compositor/Shaders/Default/runway.frag | 132 - .../Shaders/Default/terrain-nocolor.frag | 26 - Compositor/Shaders/Default/transition.frag | 171 -- Compositor/Shaders/Default/transition.vert | 25 - Compositor/Shaders/Default/tree.frag | 22 - Compositor/Shaders/Default/tree.vert | 52 - Compositor/Shaders/Default/trivial.frag | 12 - Compositor/Shaders/Default/trivial.vert | 18 - .../Shaders/Default/trivial_transparent.frag | 12 - Compositor/Shaders/Default/ubershader.frag | 287 -- Compositor/Shaders/Default/ubershader.vert | 67 - Compositor/Shaders/Default/urban.frag | 255 -- Compositor/Shaders/Default/urban.vert | 36 - Compositor/Shaders/Default/wake.vert | 70 - Compositor/Shaders/Default/water-orig.frag | 93 - Compositor/Shaders/Default/water-orig.vert | 17 - Compositor/Shaders/Default/water.frag | 222 -- Compositor/Shaders/Default/water.vert | 112 - Compositor/Shaders/Default/water_sine.frag | 391 --- Compositor/als.xml | 125 - Compositor/default.xml | 2 +- Compositor/low-spec.xml | 27 - .../Fallback/classic-shadow.eff | 6 +- Effects/Fallback/legacy-shadow.eff | 19 + Effects/agriculture.eff | 29 +- Effects/airfield.eff | 31 +- Effects/ambient.eff | 94 - Effects/bloom-blur-1.eff | 10 - Effects/bloom-blur-2.eff | 10 - Effects/bloom-combine.eff | 34 - Effects/blur.eff | 37 - Effects/chute.eff | 23 + Effects/cliffs.eff | 10 +- Effects/crop.eff | 29 +- Effects/default-pipeline.xml | 428 --- Effects/dirt-runway.eff | 33 +- Effects/display.eff | 394 --- Effects/flutter.eff | 48 +- Effects/fog.eff | 78 - Effects/forest.eff | 27 +- Effects/glacier.eff | 27 +- Effects/grass.eff | 49 +- Effects/herbtundra.eff | 27 +- Effects/landmass.eff | 8 - Effects/light-point.eff | 107 +- Effects/light-spot.eff | 128 +- Effects/model-combined-deferred.eff | 606 +--- Effects/model-combined-transparent.eff | 577 ---- Effects/model-combined.eff | 63 +- Effects/model-default.eff | 126 +- Effects/model-wingflex.eff | 69 +- Effects/road.eff | 24 +- Effects/rock.eff | 23 + Effects/runway.eff | 374 +-- Effects/schemes.xml | 4 +- Effects/shadow-vol.eff | 359 +-- Effects/shadow.eff | 261 +- Effects/ssao-blur-1.eff | 10 - Effects/ssao-blur-2.eff | 10 - Effects/ssao.eff | 84 - Effects/sunlight.eff | 272 -- Effects/terrain-default.eff | 170 +- Effects/terrain-overlay.eff | 48 +- Effects/test.eff | 91 - Effects/transition.eff | 334 +-- Effects/tree.eff | 46 - Effects/urban.eff | 476 +-- Effects/water-inland.eff | 391 --- Effects/water.eff | 861 ------ {Compositor/Effects => Effects}/ws30.eff | 18 +- Shaders/agriculture-ALS.frag | 8 +- Shaders/airfield-ALS.frag | 8 +- Shaders/ambient.frag | 22 - Shaders/bloom-combine.frag | 12 - Shaders/blur.frag | 18 - Shaders/building-deferred-gbuffer.vert | 91 - Shaders/building-model-ALS-ultra.vert | 6 +- Shaders/building-ubershader.vert | 6 +- Shaders/chute-ALS.vert | 2 + Shaders/cinema.frag | 96 - Shaders/cliffs-ALS.frag | 8 +- Shaders/clustered-include.frag | 243 ++ Shaders/crop.frag | 4 +- Shaders/crop.vert | 6 +- Shaders/default.frag | 10 +- Shaders/default.vert | 3 + Shaders/deferred-gbuffer.frag | 25 - Shaders/deferred-gbuffer.vert | 16 - Shaders/deferred-tree.frag | 21 - Shaders/deferred-tree.vert | 35 - Shaders/display.frag | 45 - Shaders/drunway-ALS.frag | 7 +- Shaders/flutter-ALS.vert | 4 +- Shaders/flutter.vert | 4 +- Shaders/fog.frag | 28 - Shaders/fog.vert | 8 - Shaders/forest.frag | 4 +- Shaders/forest.vert | 3 + Shaders/fullscreen.vert | 5 - Shaders/gbuffer-encode.frag | 25 - Shaders/gbuffer-functions.frag | 70 - Shaders/generic-ALS-base.vert | 2 + Shaders/grass-ALS.frag | 6 +- Shaders/grass-ALS.geom | 21 +- Shaders/light-point.frag | 71 - Shaders/light-spot.frag | 86 - Shaders/light-spot.vert | 7 - Shaders/model-ALS-base.frag | 8 +- Shaders/model-ALS-ultra.frag | 6 +- Shaders/model-ALS-ultra.vert | 4 + Shaders/model-ALS-wingflex.vert | 10 +- Shaders/road-ALS-ultra.frag | 8 +- Shaders/rock-ALS.frag | 8 +- Shaders/runway-ALS.frag | 8 +- Shaders/runway-gbuffer.frag | 112 - Shaders/runway-gbuffer.vert | 71 - Shaders/runway.frag | 9 +- Shaders/shadow-ALS.frag | 20 - Shaders/shadow-ALS.vert | 77 - Shaders/shadow-vol-ALS.vert | 161 -- .../ALS => Shaders}/shadows-include.frag | 20 +- .../ALS => Shaders}/shadows-include.vert | 22 +- Shaders/ssao.frag | 64 - Shaders/ssao.vert | 8 - Shaders/sunlight-nofiltering.frag | 91 - Shaders/sunlight-noshadow.frag | 43 - Shaders/sunlight.frag | 107 - Shaders/sunlight.vert | 10 - Shaders/terrain-ALS-base.frag | 10 +- Shaders/terrain-ALS-detailed.frag | 8 +- Shaders/terrain-ALS-detailed.vert | 7 +- Shaders/terrain-ALS-ultra.frag | 7 +- Shaders/terrain-ALS-ultra.vert | 4 +- Shaders/terrain-overlay-ALS.frag | 4 +- Shaders/terrain-overlay-ALS.geom | 15 +- Shaders/transition-gbuffer.frag | 163 -- Shaders/transition-gbuffer.vert | 21 - Shaders/transition.frag | 4 +- Shaders/transition.vert | 6 +- Shaders/ubershader-gbuffer.frag | 246 -- Shaders/ubershader.frag | 7 +- Shaders/ubershader.vert | 11 +- Shaders/urban-ALS.frag | 4 +- Shaders/urban-ALS.vert | 4 +- Shaders/urban-gbuffer.frag | 227 -- Shaders/urban-gbuffer.vert | 31 - Shaders/urban.frag | 3 + Shaders/urban.vert | 3 + Shaders/water-gbuffer.frag | 212 -- Shaders/water-gbuffer.vert | 123 - Shaders/water_sine-gbuffer.frag | 394 --- {Compositor/Shaders/ALS => Shaders}/ws30.frag | 7 - defaults.xml | 100 +- 366 files changed, 1424 insertions(+), 79001 deletions(-) create mode 100644 Compositor/Classic/classic.xml create mode 100644 Compositor/Classic/common-scene.xml rename Compositor/{ALS/csm.xml => Classic/csm-pass.xml} (64%) delete mode 100644 Compositor/Effects/agriculture.eff delete mode 100644 Compositor/Effects/airfield.eff delete mode 100644 Compositor/Effects/birdswarm.eff delete mode 100644 Compositor/Effects/bowwave.eff delete mode 100644 Compositor/Effects/building.eff delete mode 100644 Compositor/Effects/bumpspec.eff delete mode 100644 Compositor/Effects/chrome.eff delete mode 100644 Compositor/Effects/chute.eff delete mode 100644 Compositor/Effects/cityLM.eff delete mode 100644 Compositor/Effects/cliffs.eff delete mode 100644 Compositor/Effects/cloud-impostor.eff delete mode 100644 Compositor/Effects/cloud-models.eff delete mode 100644 Compositor/Effects/cloud-noctilucent.eff delete mode 100644 Compositor/Effects/cloud-static.eff delete mode 100644 Compositor/Effects/cloud.eff delete mode 100644 Compositor/Effects/clouds-box.eff delete mode 100644 Compositor/Effects/clouds-layered.eff delete mode 100644 Compositor/Effects/clouds-thick.eff delete mode 100644 Compositor/Effects/clouds-thin.eff delete mode 100644 Compositor/Effects/clouds-thinlayer.eff delete mode 100644 Compositor/Effects/crop.eff delete mode 100644 Compositor/Effects/cropgrass.eff delete mode 100644 Compositor/Effects/dirt-runway.eff delete mode 100644 Compositor/Effects/flutter.eff delete mode 100644 Compositor/Effects/forest.eff delete mode 100644 Compositor/Effects/glacier.eff delete mode 100644 Compositor/Effects/glass.eff delete mode 100644 Compositor/Effects/grass.eff delete mode 100644 Compositor/Effects/herbtundra.eff delete mode 100644 Compositor/Effects/hud.eff delete mode 100644 Compositor/Effects/landmass-nowood.eff delete mode 100644 Compositor/Effects/landmass-scrub.eff delete mode 100644 Compositor/Effects/landmass.eff delete mode 100644 Compositor/Effects/lfeat.eff delete mode 100644 Compositor/Effects/light-cone.eff delete mode 100644 Compositor/Effects/light-point.eff delete mode 100644 Compositor/Effects/light-spot.eff delete mode 100644 Compositor/Effects/lightning.eff delete mode 100644 Compositor/Effects/material-diffuse.eff delete mode 100644 Compositor/Effects/material-off.eff delete mode 100644 Compositor/Effects/model-combined-deferred.eff delete mode 100644 Compositor/Effects/model-combined-transparent.eff delete mode 100644 Compositor/Effects/model-combined.eff delete mode 100644 Compositor/Effects/model-default.eff delete mode 100644 Compositor/Effects/model-interior-display.eff delete mode 100644 Compositor/Effects/model-interior.eff delete mode 100644 Compositor/Effects/model-transparent.eff delete mode 100644 Compositor/Effects/model-wingflex-organic.eff delete mode 100644 Compositor/Effects/planet-aurora.eff delete mode 100644 Compositor/Effects/planet-cloudlayer.eff delete mode 100644 Compositor/Effects/planet.eff delete mode 100644 Compositor/Effects/procedural-light.eff delete mode 100644 Compositor/Effects/rain-layer.eff delete mode 100644 Compositor/Effects/reflect.eff delete mode 100644 Compositor/Effects/road-high.eff delete mode 100644 Compositor/Effects/road-low.eff delete mode 100644 Compositor/Effects/road-mid.eff delete mode 100644 Compositor/Effects/road.eff delete mode 100644 Compositor/Effects/rock.eff delete mode 100644 Compositor/Effects/runway-dds.eff delete mode 100644 Compositor/Effects/runway.eff delete mode 100644 Compositor/Effects/shadow-vol.eff delete mode 100644 Compositor/Effects/shadow.eff delete mode 100644 Compositor/Effects/skydome.eff delete mode 100644 Compositor/Effects/space-combined.eff delete mode 100644 Compositor/Effects/space.eff delete mode 100644 Compositor/Effects/surface-lights-directional.eff delete mode 100644 Compositor/Effects/surface-lights.eff delete mode 100644 Compositor/Effects/terrain-default.eff delete mode 100644 Compositor/Effects/terrain-overlay.eff delete mode 100644 Compositor/Effects/thrust-flame.eff delete mode 100644 Compositor/Effects/transition-base-dirt.eff delete mode 100644 Compositor/Effects/transition-base-grass-inverse.eff delete mode 100644 Compositor/Effects/transition-base-grass-rock.eff delete mode 100644 Compositor/Effects/transition-base-rock.eff delete mode 100644 Compositor/Effects/transition.eff delete mode 100644 Compositor/Effects/tree-european-deciduous.eff delete mode 100644 Compositor/Effects/tree-european-mixed.eff delete mode 100644 Compositor/Effects/tree-forest.eff delete mode 100644 Compositor/Effects/tree-grass.eff delete mode 100644 Compositor/Effects/tree.eff delete mode 100644 Compositor/Effects/urban.eff delete mode 100644 Compositor/Effects/water-dds.eff delete mode 100644 Compositor/Effects/water-inland.eff delete mode 100644 Compositor/Effects/water.eff delete mode 100644 Compositor/Shaders/ALS/3dcloud-detailed.frag delete mode 100644 Compositor/Shaders/ALS/3dcloud-detailed.vert delete mode 100644 Compositor/Shaders/ALS/3dcloud.frag delete mode 100644 Compositor/Shaders/ALS/3dcloud.vert delete mode 100644 Compositor/Shaders/ALS/agriculture.frag delete mode 100644 Compositor/Shaders/ALS/airfield.frag delete mode 100644 Compositor/Shaders/ALS/birds.frag delete mode 100644 Compositor/Shaders/ALS/birds.vert delete mode 100644 Compositor/Shaders/ALS/bowwave.frag delete mode 100644 Compositor/Shaders/ALS/building-default.vert delete mode 100644 Compositor/Shaders/ALS/building-model-ultra.vert delete mode 100644 Compositor/Shaders/ALS/building.vert delete mode 100644 Compositor/Shaders/ALS/chute.vert delete mode 100644 Compositor/Shaders/ALS/cliffs.frag delete mode 100644 Compositor/Shaders/ALS/cloud-impostor.vert delete mode 100644 Compositor/Shaders/ALS/cloud-noctilucent.vert delete mode 100644 Compositor/Shaders/ALS/cloud-shadowfunc.frag delete mode 100644 Compositor/Shaders/ALS/cloud-static-detailed.frag delete mode 100644 Compositor/Shaders/ALS/cloud-static-detailed.vert delete mode 100644 Compositor/Shaders/ALS/cloud-static.frag delete mode 100644 Compositor/Shaders/ALS/cloud-static.vert delete mode 100644 Compositor/Shaders/ALS/clustered-include.frag delete mode 100755 Compositor/Shaders/ALS/color_temperature.frag delete mode 100644 Compositor/Shaders/ALS/drunway.frag delete mode 100644 Compositor/Shaders/ALS/filters.frag delete mode 100644 Compositor/Shaders/ALS/filters.vert delete mode 100644 Compositor/Shaders/ALS/flutter.vert delete mode 100644 Compositor/Shaders/ALS/generic-base.vert delete mode 100644 Compositor/Shaders/ALS/glass.frag delete mode 100644 Compositor/Shaders/ALS/glass.vert delete mode 100755 Compositor/Shaders/ALS/grass.frag delete mode 100755 Compositor/Shaders/ALS/grass.geom delete mode 100755 Compositor/Shaders/ALS/grass.vert delete mode 100644 Compositor/Shaders/ALS/hazes.frag delete mode 100644 Compositor/Shaders/ALS/hud.frag delete mode 100644 Compositor/Shaders/ALS/hud.vert delete mode 100644 Compositor/Shaders/ALS/light.frag delete mode 100644 Compositor/Shaders/ALS/light.vert delete mode 100644 Compositor/Shaders/ALS/lightspot.frag delete mode 100644 Compositor/Shaders/ALS/model-base.frag delete mode 100644 Compositor/Shaders/ALS/model-interior-base.frag delete mode 100644 Compositor/Shaders/ALS/model-interior-detailed.frag delete mode 100644 Compositor/Shaders/ALS/model-interior-detailed.vert delete mode 100644 Compositor/Shaders/ALS/model-interior-display.frag delete mode 100644 Compositor/Shaders/ALS/model-transparent.frag delete mode 100644 Compositor/Shaders/ALS/model-transparent.vert delete mode 100644 Compositor/Shaders/ALS/model-ultra.frag delete mode 100644 Compositor/Shaders/ALS/model-ultra.vert delete mode 100644 Compositor/Shaders/ALS/model-wingflex-organic.vert delete mode 100644 Compositor/Shaders/ALS/noise.frag delete mode 100644 Compositor/Shaders/ALS/planet-aurora.frag delete mode 100644 Compositor/Shaders/ALS/planet-aurora.vert delete mode 100644 Compositor/Shaders/ALS/planet-cloudlayer.frag delete mode 100644 Compositor/Shaders/ALS/planet-high.frag delete mode 100644 Compositor/Shaders/ALS/planet.frag delete mode 100644 Compositor/Shaders/ALS/planet.vert delete mode 100644 Compositor/Shaders/ALS/rain-layer.frag delete mode 100644 Compositor/Shaders/ALS/rain-layer.vert delete mode 100644 Compositor/Shaders/ALS/road-ultra.frag delete mode 100644 Compositor/Shaders/ALS/rock.frag delete mode 100644 Compositor/Shaders/ALS/runway.frag delete mode 100644 Compositor/Shaders/ALS/secondary_lights.frag delete mode 100644 Compositor/Shaders/ALS/skydome.frag delete mode 100644 Compositor/Shaders/ALS/skydome.vert delete mode 100644 Compositor/Shaders/ALS/space-base.frag delete mode 100644 Compositor/Shaders/ALS/space-base.vert delete mode 100644 Compositor/Shaders/ALS/space-ultra.frag delete mode 100644 Compositor/Shaders/ALS/space-ultra.vert delete mode 100644 Compositor/Shaders/ALS/surface-light.frag delete mode 100644 Compositor/Shaders/ALS/surface-light.vert delete mode 100644 Compositor/Shaders/ALS/terrain-base.frag delete mode 100644 Compositor/Shaders/ALS/terrain-detailed.frag delete mode 100644 Compositor/Shaders/ALS/terrain-detailed.vert delete mode 100644 Compositor/Shaders/ALS/terrain-overlay.frag delete mode 100644 Compositor/Shaders/ALS/terrain-overlay.geom delete mode 100644 Compositor/Shaders/ALS/terrain-ultra.frag delete mode 100644 Compositor/Shaders/ALS/terrain-ultra.vert delete mode 100644 Compositor/Shaders/ALS/terrain-writedepth.frag delete mode 100644 Compositor/Shaders/ALS/terrain-writedepth.vert delete mode 100644 Compositor/Shaders/ALS/thrustflame.frag delete mode 100644 Compositor/Shaders/ALS/thrustflame.vert delete mode 100644 Compositor/Shaders/ALS/tree-shadow.frag delete mode 100644 Compositor/Shaders/ALS/tree-shadow.vert delete mode 100644 Compositor/Shaders/ALS/tree.frag delete mode 100644 Compositor/Shaders/ALS/tree.vert delete mode 100644 Compositor/Shaders/ALS/urban.frag delete mode 100644 Compositor/Shaders/ALS/urban.vert delete mode 100644 Compositor/Shaders/ALS/wake.vert delete mode 100644 Compositor/Shaders/ALS/water-base.frag delete mode 100644 Compositor/Shaders/ALS/water-high.frag delete mode 100644 Compositor/Shaders/ALS/water.vert delete mode 100644 Compositor/Shaders/Default/3dcloud.frag delete mode 100644 Compositor/Shaders/Default/3dcloud.vert delete mode 100644 Compositor/Shaders/Default/bowwave.frag delete mode 100644 Compositor/Shaders/Default/building-default.vert delete mode 100644 Compositor/Shaders/Default/building-ubershader.vert delete mode 100644 Compositor/Shaders/Default/cloud-static.frag delete mode 100644 Compositor/Shaders/Default/cloud-static.vert delete mode 100644 Compositor/Shaders/Default/clouds-box.frag delete mode 100644 Compositor/Shaders/Default/clouds-box.vert delete mode 100644 Compositor/Shaders/Default/clouds-layered.frag delete mode 100644 Compositor/Shaders/Default/clouds-layered.vert delete mode 100644 Compositor/Shaders/Default/clouds-thick.frag delete mode 100644 Compositor/Shaders/Default/clouds-thick.vert delete mode 100644 Compositor/Shaders/Default/clouds-thin.frag delete mode 100644 Compositor/Shaders/Default/clouds-thin.vert delete mode 100644 Compositor/Shaders/Default/clouds-thinlayer.frag delete mode 100644 Compositor/Shaders/Default/clouds-thinlayer.vert delete mode 100644 Compositor/Shaders/Default/crop.frag delete mode 100644 Compositor/Shaders/Default/crop.vert delete mode 100644 Compositor/Shaders/Default/default.frag delete mode 100644 Compositor/Shaders/Default/default.vert delete mode 100644 Compositor/Shaders/Default/flutter.vert delete mode 100644 Compositor/Shaders/Default/forest.frag delete mode 100644 Compositor/Shaders/Default/forest.vert delete mode 100644 Compositor/Shaders/Default/include_fog.frag delete mode 100644 Compositor/Shaders/Default/include_fog.vert delete mode 100644 Compositor/Shaders/Default/landmass-g.vert delete mode 100644 Compositor/Shaders/Default/landmass.frag delete mode 100644 Compositor/Shaders/Default/landmass.geom delete mode 100644 Compositor/Shaders/Default/landmass.vert delete mode 100644 Compositor/Shaders/Default/rain-layer.frag delete mode 100644 Compositor/Shaders/Default/rain-layer.vert delete mode 100644 Compositor/Shaders/Default/reflect-bump-spec.frag delete mode 100644 Compositor/Shaders/Default/reflect-bump-spec.vert delete mode 100644 Compositor/Shaders/Default/runway.frag delete mode 100644 Compositor/Shaders/Default/terrain-nocolor.frag delete mode 100644 Compositor/Shaders/Default/transition.frag delete mode 100644 Compositor/Shaders/Default/transition.vert delete mode 100644 Compositor/Shaders/Default/tree.frag delete mode 100644 Compositor/Shaders/Default/tree.vert delete mode 100644 Compositor/Shaders/Default/trivial.frag delete mode 100644 Compositor/Shaders/Default/trivial.vert delete mode 100644 Compositor/Shaders/Default/trivial_transparent.frag delete mode 100644 Compositor/Shaders/Default/ubershader.frag delete mode 100644 Compositor/Shaders/Default/ubershader.vert delete mode 100644 Compositor/Shaders/Default/urban.frag delete mode 100644 Compositor/Shaders/Default/urban.vert delete mode 100644 Compositor/Shaders/Default/wake.vert delete mode 100644 Compositor/Shaders/Default/water-orig.frag delete mode 100644 Compositor/Shaders/Default/water-orig.vert delete mode 100644 Compositor/Shaders/Default/water.frag delete mode 100644 Compositor/Shaders/Default/water.vert delete mode 100644 Compositor/Shaders/Default/water_sine.frag delete mode 100644 Compositor/als.xml delete mode 100644 Compositor/low-spec.xml rename Compositor/Effects/ALS/shadow-pass.eff => Effects/Fallback/classic-shadow.eff (79%) create mode 100644 Effects/Fallback/legacy-shadow.eff delete mode 100644 Effects/ambient.eff delete mode 100644 Effects/bloom-blur-1.eff delete mode 100644 Effects/bloom-blur-2.eff delete mode 100644 Effects/bloom-combine.eff delete mode 100644 Effects/blur.eff delete mode 100644 Effects/default-pipeline.xml delete mode 100644 Effects/display.eff delete mode 100644 Effects/fog.eff mode change 100755 => 100644 Effects/grass.eff delete mode 100644 Effects/ssao-blur-1.eff delete mode 100644 Effects/ssao-blur-2.eff delete mode 100644 Effects/ssao.eff delete mode 100644 Effects/sunlight.eff delete mode 100644 Effects/test.eff rename {Compositor/Effects => Effects}/ws30.eff (97%) delete mode 100644 Shaders/ambient.frag delete mode 100644 Shaders/bloom-combine.frag delete mode 100644 Shaders/blur.frag delete mode 100644 Shaders/building-deferred-gbuffer.vert delete mode 100644 Shaders/cinema.frag create mode 100644 Shaders/clustered-include.frag delete mode 100644 Shaders/deferred-gbuffer.frag delete mode 100644 Shaders/deferred-gbuffer.vert delete mode 100644 Shaders/deferred-tree.frag delete mode 100644 Shaders/deferred-tree.vert delete mode 100644 Shaders/display.frag delete mode 100644 Shaders/fog.frag delete mode 100644 Shaders/fog.vert delete mode 100644 Shaders/fullscreen.vert delete mode 100644 Shaders/gbuffer-encode.frag delete mode 100644 Shaders/gbuffer-functions.frag delete mode 100644 Shaders/light-point.frag delete mode 100644 Shaders/light-spot.frag delete mode 100644 Shaders/light-spot.vert delete mode 100644 Shaders/runway-gbuffer.frag delete mode 100644 Shaders/runway-gbuffer.vert delete mode 100644 Shaders/shadow-ALS.frag delete mode 100644 Shaders/shadow-ALS.vert delete mode 100644 Shaders/shadow-vol-ALS.vert rename {Compositor/Shaders/ALS => Shaders}/shadows-include.frag (87%) rename {Compositor/Shaders/ALS => Shaders}/shadows-include.vert (59%) delete mode 100644 Shaders/ssao.frag delete mode 100644 Shaders/ssao.vert delete mode 100644 Shaders/sunlight-nofiltering.frag delete mode 100644 Shaders/sunlight-noshadow.frag delete mode 100644 Shaders/sunlight.frag delete mode 100644 Shaders/sunlight.vert delete mode 100644 Shaders/transition-gbuffer.frag delete mode 100644 Shaders/transition-gbuffer.vert delete mode 100644 Shaders/ubershader-gbuffer.frag delete mode 100644 Shaders/urban-gbuffer.frag delete mode 100644 Shaders/urban-gbuffer.vert delete mode 100644 Shaders/water-gbuffer.frag delete mode 100644 Shaders/water-gbuffer.vert delete mode 100644 Shaders/water_sine-gbuffer.frag rename {Compositor/Shaders/ALS => Shaders}/ws30.frag (98%) diff --git a/Compositor/Classic/classic.xml b/Compositor/Classic/classic.xml new file mode 100644 index 000000000..db92d28a7 --- /dev/null +++ b/Compositor/Classic/classic.xml @@ -0,0 +1,88 @@ + + + + + Classic + + + sun-shadowmap-atlas + 2d + /sim/rendering/shadows/sun-atlas-size + /sim/rendering/shadows/sun-atlas-size + depth24 + clamp-to-border + clamp-to-border + clamp-to-border + linear + linear + 1.0 1.0 1.0 1.0 + true + + /sim/rendering/shadows/enabled + + + + + csm0 + 0.1 + 3.0 + + 0.0 + 0.0 + 0.5 + 0.5 + + + + csm1 + 3.0 + 50.0 + + 0.5 + 0.0 + 0.5 + 0.5 + + + + csm2 + 50.0 + 150.0 + + 0.0 + 0.5 + 0.5 + 0.5 + + + + csm3 + 150.0 + 1500.0 + + 0.5 + 0.5 + 0.5 + 0.5 + + + + + far + 100.0 + + + near + 0xfff7ff + + depth + 100.0 + + diff --git a/Compositor/Classic/common-scene.xml b/Compositor/Classic/common-scene.xml new file mode 100644 index 000000000..e5941b7e8 --- /dev/null +++ b/Compositor/Classic/common-scene.xml @@ -0,0 +1,16 @@ + + + + scene + csm0 + csm1 + csm2 + csm3 + + sun-shadowmap-atlas + 10 + + /sim/rendering/shadows/enabled + + + diff --git a/Compositor/ALS/csm.xml b/Compositor/Classic/csm-pass.xml similarity index 64% rename from Compositor/ALS/csm.xml rename to Compositor/Classic/csm-pass.xml index 5e8473269..0b37b40fb 100644 --- a/Compositor/ALS/csm.xml +++ b/Compositor/Classic/csm-pass.xml @@ -1,13 +1,13 @@ - shadow-map - FGLightSource - als-shadow + csm + classic-shadow 0x000004 + false - /sim/rendering/als/shadows/enabled + /sim/rendering/shadows/enabled sun-shadowmap-atlas diff --git a/Compositor/Effects/agriculture.eff b/Compositor/Effects/agriculture.eff deleted file mode 100644 index b07fddb72..000000000 --- a/Compositor/Effects/agriculture.eff +++ /dev/null @@ -1,1178 +0,0 @@ - - - Effects/agriculture - Effects/crop - - - - 0.2 .2 0.2 1.0 - - - .8 .8 .8 1.0 - - - 0.0 0.0 0.0 1.0 - - - 0.0 0.0 0.0 1.0 - - 1.2 - - - Textures/Terrain/unknown.png - 2d - linear-mipmap-linear - - repeat - repeat - - - normalized - - - Textures/Terrain/void.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Terrain/void.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Terrain/rock_alt.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Terrain/grain_texture.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - false - - 0 - RenderBin - - 0 - 0.5 - 0.5 - 1000.0 - 0 - 2000.0 - 0.3 - 0.0 - 0.0 - 0.0 - 1.0 - false - - /environment/ground-visibility-m - - - /environment/visibility-m - - - /environment/ground-haze-thickness-m - - - /rendering/scene/scattering - - - /environment/surface/scattering - - - /environment/terminator-relative-position-m - - - /environment/mean-terrain-elevation-m - - - /rendering/scene/overcast - - - /sim/rendering/eye-altitude-m - - - /environment/snow-level-m - - - /environment/surface/snow-thickness-factor - - - /environment/surface/dust-cover-factor - - - /environment/surface/lichen-cover-factor - - - /environment/surface/wetness - - - /sim/rendering/shaders/skydome - - - /environment/fog-structure - - - /environment/cloud-self-shading - - - /environment/moonlight - - - /environment/season - - - /sim/rendering/shaders/wind-effects - - - /environment/sea/surface/wind-from-east-fps - - - /environment/sea/surface/wind-from-north-fps - - - /sim/rendering/shaders/landmass - - - /sim/rendering/shaders/transition - - - /local-weather/cloud-shadows/cloudpos-x[0] - - - /local-weather/cloud-shadows/cloudpos-y[0] - - - /local-weather/cloud-shadows/cloudpos-x[1] - - - /local-weather/cloud-shadows/cloudpos-y[1] - - - /local-weather/cloud-shadows/cloudpos-x[2] - - - /local-weather/cloud-shadows/cloudpos-y[2] - - - /local-weather/cloud-shadows/cloudpos-x[3] - - - /local-weather/cloud-shadows/cloudpos-y[3] - - - /local-weather/cloud-shadows/cloudpos-x[4] - - - /local-weather/cloud-shadows/cloudpos-y[4] - - - /local-weather/cloud-shadows/cloudpos-x[5] - - - /local-weather/cloud-shadows/cloudpos-y[5] - - - /local-weather/cloud-shadows/cloudpos-x[6] - - - /local-weather/cloud-shadows/cloudpos-y[6] - - - /local-weather/cloud-shadows/cloudpos-x[7] - - - /local-weather/cloud-shadows/cloudpos-y[7] - - - /local-weather/cloud-shadows/cloudpos-x[8] - - - /local-weather/cloud-shadows/cloudpos-y[8] - - - /local-weather/cloud-shadows/cloudpos-x[9] - - - /local-weather/cloud-shadows/cloudpos-y[9] - - - /local-weather/cloud-shadows/cloudpos-x[10] - - - /local-weather/cloud-shadows/cloudpos-y[10] - - - /local-weather/cloud-shadows/cloudpos-x[11] - - - /local-weather/cloud-shadows/cloudpos-y[11] - - - /local-weather/cloud-shadows/cloudpos-x[12] - - - /local-weather/cloud-shadows/cloudpos-y[12] - - - /local-weather/cloud-shadows/cloudpos-x[13] - - - /local-weather/cloud-shadows/cloudpos-y[13] - - - /local-weather/cloud-shadows/cloudpos-x[14] - - - /local-weather/cloud-shadows/cloudpos-y[14] - - - /local-weather/cloud-shadows/cloudpos-x[15] - - - /local-weather/cloud-shadows/cloudpos-y[15] - - - /local-weather/cloud-shadows/cloudpos-x[16] - - - /local-weather/cloud-shadows/cloudpos-y[16] - - - /local-weather/cloud-shadows/cloudpos-x[17] - - - /local-weather/cloud-shadows/cloudpos-y[17] - - - /local-weather/cloud-shadows/cloudpos-x[18] - - - /local-weather/cloud-shadows/cloudpos-y[18] - - - /local-weather/cloud-shadows/cloudpos-x[19] - - - /local-weather/cloud-shadows/cloudpos-y[19] - - - /local-weather/cloud-shadows/cloud-shadow-flag - - - - - als-lighting - - - - - 6.0 - /sim/rendering/shaders/landmass - - - 6.0 - /sim/rendering/shaders/transition - - - 1.0 - /sim/rendering/shaders/crop - - - - - 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 - - - material/emissive - - - material/shininess - - 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[13]/image - - - texture[13]/type - - - texture[13]/filter - - - texture[13]/wrap-s - - - texture[13]/wrap-t - - - texture[13]/internal-format - - - - 4 - - texture[14]/type - - - texture[14]/image - - - texture[14]/filter - - - texture[14]/wrap-s - - - texture[14]/wrap-t - - - texture[14]/internal-format - - - - 5 - - texture[16]/type - - - texture[16]/image - - - texture[16]/filter - - - texture[16]/wrap-s - - - texture[16]/wrap-t - - - texture[16]/internal-format - - - - Shaders/ALS/terrain-ultra.vert - Shaders/ALS/filters.vert - Shaders/ALS/shadows-include.vert - Shaders/ALS/agriculture.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/noise.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/filters.frag - Shaders/ALS/shadows-include.frag - - - grain_strength - float - - grain_strength - - - - intrinsic_wetness - float - - intrinsic_wetness - - - - overlay_fraction - float - - overlay_fraction - - - - overlay_scale - float - - overlay_scale - - - - rotation_scale - float - - rotation_scale - - - - distortion_factor - float - - distortion_factor - - - - uv_xoffset - float - - uv_xoffset - - - - uv_yoffset - float - - uv_yoffset - - - - dust_resistance - float - - dust_resistance - - - - 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 - - - - eye_lat - float - - eye_lat - - - - eye_lon - float - - eye_lon - - - - snowlevel - float - - snow_level - - - - snow_thickness_factor - float - - snow_thickness_factor - - - - dust_cover_factor - float - - dust_cover_factor - - - - lichen_cover_factor - float - - lichen_cover_factor - - - - wetness - float - - wetness - - - - fogstructure - float - - fogstructure - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - season - float - - season - - - - 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 - - - - WindE - float - - windE - - - - WindN - float - - windN - - - - quality_level - int - - quality_level - - - - tquality_level - int - - tquality_level - - - - wind_effects - int - - wind_effects - - - - cloud_shadow_flag - int - - cloud_shadow_flag - - - - rotation_flag - int - - rotation_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 - - - - raise_vertex - bool - - raise_vertex - - - - texture - sampler-2d - 0 - - - mix_texture - sampler-2d - 5 - - - grain_texture - sampler-2d - 4 - - - gradient_texture - sampler-2d - 2 - - - colorMode - int - 2 - - - - - shadow_tex - sampler-2d - 10 - - - shadows_enabled - bool - - shadows_enabled - - - - sun_atlas_size - int - - sun_atlas_size - - - - - lequal - - - - diff --git a/Compositor/Effects/airfield.eff b/Compositor/Effects/airfield.eff deleted file mode 100644 index 1ea18f283..000000000 --- a/Compositor/Effects/airfield.eff +++ /dev/null @@ -1,891 +0,0 @@ - - - Effects/airfield - Effects/terrain-default - - - Textures/Terrain/airport_grass2.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Terrain/void.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Terrain/void.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - 5.0 - 4.0 - 4.0 - 0 - 0 - 1 - 1.0 - 0.0 - 1.0 - - - als-lighting - - - - - 2.0 - /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 - - - material/emissive - - - material/shininess - - ambient-and-diffuse - - - transparent - - smooth - back - - -1 - RenderBin - - - Shaders/ALS/terrain-writedepth.vert - Shaders/ALS/terrain-writedepth.frag - - 0 0 0 0 - - - true - - - material/ambient - - - material/diffuse - - - material/specular - - - material/emissive - - - material/shininess - - ambient-and-diffuse - - - transparent - - - transparent - - smooth - back - - - render-bin/bin-number - - - render-bin/bin-name - - - - 0 - - texture[13]/image - - - texture[13]/type - - - texture[13]/filter - - - texture[13]/wrap-s - - - texture[13]/wrap-t - - - texture[13]/internal-format - - - - 1 - - texture[14]/image - - - texture[14]/type - - - texture[14]/filter - - - texture[14]/wrap-s - - - texture[14]/wrap-t - - - texture[14]/internal-format - - - - 2 - - texture[15]/image - - - texture[15]/type - - - texture[15]/filter - - - texture[15]/wrap-s - - - texture[15]/wrap-t - - - texture[15]/internal-format - - - - Shaders/ALS/terrain-ultra.vert - Shaders/ALS/filters.vert - Shaders/ALS/shadows-include.vert - Shaders/ALS/airfield.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/noise.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/filters.frag - Shaders/ALS/shadows-include.frag - - - 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 - - - - snow_thickness_factor - float - - snow_thickness_factor - - - - dust_cover_factor - float - - dust_cover_factor - - - - wetness - float - - wetness - - - - fogstructure - float - - fogstructure - - - - grit_alpha - float - - grit_alpha - - - - overlay_bias - float - - overlay_bias - - - - overlay_alpha - float - - overlay_alpha - - - - base_layer_magnification - float - - base_layer_magnification - - - - overlay_layer_magnification - float - - overlay_layer_magnification - - - - grain_layer_magnification - float - - grain_layer_magnification - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - air_pollution - float - - air_pollution - - - - season - float - - season - - - - - 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 - - - - quality_level - int - - quality_level - - - - tquality_level - int - - tquality_level - - - - use_overlay - int - - use_overlay - - - - use_grain - int - - use_grain - - - - use_color_overlay - int - - use_color_overlay - - - - 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 - - - - raise_vertex - bool - - raise_vertex - - - - texture - sampler-2d - 0 - - - overlay_texture - sampler-2d - 1 - - - grain_texture - sampler-2d - 2 - - - colorMode - int - 2 - - - - - shadow_tex - sampler-2d - 10 - - - shadows_enabled - bool - - shadows_enabled - - - - sun_atlas_size - int - - sun_atlas_size - - - - - lequal - false - - - - diff --git a/Compositor/Effects/birdswarm.eff b/Compositor/Effects/birdswarm.eff deleted file mode 100644 index 7cb079038..000000000 --- a/Compositor/Effects/birdswarm.eff +++ /dev/null @@ -1,235 +0,0 @@ - - - Effects/birdswarm - - - Models/Effects/Birds/birds_in_flight.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - 0.9 - 0.8 - 0.82 - 0.7 - 0.3 - 0.25 - - /environment/ground-visibility-m - - - /environment/visibility-m - - - /environment/ground-haze-thickness-m - - - /environment/mean-terrain-elevation-m - - - /sim/rendering/eye-altitude-m - - - /environment/terminator-relative-position-m - - - /rendering/scene/scattering - - - - als-lighting - - - - - 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 - - - 111 - DepthSortedBin - - - 0 - - texture[0]/image - - - texture[0]/type - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - texture[0]/internal-format - - - - false - - false - - Shaders/ALS/birds.vert - Shaders/ALS/birds.frag - Shaders/ALS/noise.frag - Shaders/ALS/hazes.frag - - - color_base_r - float - - color_base_r - - - - color_base_g - float - - color_base_g - - - - color_base_b - float - - color_base_b - - - - color_alt_r - float - - color_alt_r - - - - color_alt_g - float - - color_alt_g - - - - color_alt_b - float - - color_alt_b - - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - scattering - float - - scattering - - - - eye_alt - float - - eye_alt - - - - terminator - float - - terminator - - - - texture - sampler-2d - 0 - - - texture - sampler-2d - 0 - - - - diff --git a/Compositor/Effects/bowwave.eff b/Compositor/Effects/bowwave.eff deleted file mode 100644 index 86a0b49e0..000000000 --- a/Compositor/Effects/bowwave.eff +++ /dev/null @@ -1,1094 +0,0 @@ - - - Effects/bowwave - Effects/model-default - - - /Textures/Water/water-reflection.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - /Textures/Water/perlin-noise-nm.dds - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - /Textures/Water/waves-ver10-dudv.dds - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - /Textures/Water/water-reflection-grey.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - /Textures/Water/sea_foam.dds - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - /Textures/Water/bowwave3.dds - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - /Textures/Water/bowwave_normal.dds - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - /rendering/scene/saturation - - - /environment/config/enabled - - - /rendering/scene/overcast - - - /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 - - - /environment/sea/surface/wind-from-east-fps - - - /environment/sea/surface/wind-from-north-fps - - - /environment/Vinson/spd-kt - - - /environment/Vinson/hdg-deg - - smooth - transparent - true - - 6 - DepthSortedBin - - - - /environment/ground-visibility-m - - - /environment/visibility-m - - - /environment/ground-haze-thickness-m - - - /rendering/scene/scattering - - - /environment/surface/scattering - - - /environment/terminator-relative-position-m - - - /environment/mean-terrain-elevation-m - - - /rendering/scene/overcast - - - /sim/rendering/eye-altitude-m - - - /environment/cloud-self-shading - - - /environment/moonlight - - - /sim/rendering/shaders/skydome - - - /sim/rendering/shaders/landmass - - - - /environment/sea/color_r - - - /environment/sea/color_g - - - /environment/sea/color_b - - - - - - - - /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/Default/water-orig.vert - Shaders/Default/water-orig.frag - - - texture - sampler-3d - 0 - - - - - - - /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/Default/wake.vert - Shaders/Default/include_fog.frag - Shaders/Default/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 - - - - - - - als-lighting - - - /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/ALS/wake.vert - Shaders/ALS/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 - - - - 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 - - - - ground_scattering - float - - ground_scattering - - - - terminator - float - - terminator - - - - terrain_alt - float - - terrain_alt - - - - overcast - float - - overcast - - - - eye_alt - float - - eye_alt - - - - cloud_self_shading - float - - cloud_self_shading - - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - - sea_r - float - - sea_r - - - - sea_g - float - - sea_g - - - - sea_b - float - - sea_b - - - - quality_level - int - - quality_level - - - - - - diff --git a/Compositor/Effects/building.eff b/Compositor/Effects/building.eff deleted file mode 100644 index 5ddeec3e7..000000000 --- a/Compositor/Effects/building.eff +++ /dev/null @@ -1,407 +0,0 @@ - - - Effects/building - Effects/model-combined-deferred - - - 2d - Textures/buildings.png - linear-mipmap-linear - repeat - clamp - normalized - - - 1 - 0 - 1.0 - - Textures/buildings-normalmap_orig.png - 2d - linear-mipmap-linear - repeat - clamp - normalized - - - - Textures/buildings-lightmap.png - 2d - linear-mipmap-linear - clamp - clamp - normalized - - 1 - 0 - - /sim/time/sun-angle-rad - - 0.3 0.3 0.3 - - - 1 - 1 - -0.15 - 0 - 0.0 - 0.0 - 0.0 - - cubemap - - Aircraft/Generic/Effects/CubeMaps/buildings/N.png - Aircraft/Generic/Effects/CubeMaps/buildings/S.png - Aircraft/Generic/Effects/CubeMaps/buildings/W.png - Aircraft/Generic/Effects/CubeMaps/buildings/E.png - Aircraft/Generic/Effects/CubeMaps/buildings/U.png - Aircraft/Generic/Effects/CubeMaps/buildings/D.png - - - - 0.0 - 0 - 0.0 0.0 0.0 - 0.0 - - 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 - - - 0 - - 0 - 0 - 0 - - flat - back - opaque - - /environment/ground-visibility-m - /environment/visibility-m - /environment/ground-haze-thickness-m - /rendering/scene/scattering - /environment/surface/scattering - /environment/terminator-relative-position-m - /sim/rendering/shaders/skydome - /environment/mean-terrain-elevation-m - /rendering/scene/overcast - /sim/rendering/eye-altitude-m - /environment/snow-level-m - /environment/surface/dust-cover-factor - /sim/rendering/shaders/skydome - /environment/fog-structure - /environment/surface/delta-T-structure - - 1 - - - - - - - 4 - - texture[3]/image - - - texture[3]/type - - - texture[3]/filter - - - texture[3]/wrap-s - - - texture[3]/wrap-t - - - texture[3]/internal-format - - - - Shaders/ALS/building-model-ultra.vert - - instancePosition - 10 - - - instanceScale - 11 - - - attrib1 - 12 - - - attrib2 - 13 - - - - - - - - - - Shaders/ALS/building-default.vert - Shaders/ALS/terrain-base.frag - Shaders/ALS/hazes.frag - Shaders/ALS/filters.frag - Shaders/ALS/noise.frag - - 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/Default/building-ubershader.vert - - instancePosition - 10 - - - instanceScale - 11 - - - attrib1 - 12 - - - attrib2 - 13 - - - - - - - - - - vertex-program-two-side - - - Shaders/Default/building-default.vert - Shaders/Default/include_fog.frag - - Shaders/Default/default.frag - - instancePosition - 10 - - - instanceScale - 11 - - - attrib1 - 12 - - - attrib2 - 13 - - - - - - - - - true - - - material/active - - - material/ambient - - - material/diffuse - - - material/specular - - - material/emissive - - - material/shininess - - off - - - 2 - RenderBin - - - - 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 - - - - - vertex-program-two-side - - - Shaders/Default/building-default.vert - Shaders/Default/include_fog.frag - - Shaders/Default/default.frag - - instancePosition - 10 - - - instanceScale - 11 - - - attrib1 - 12 - - - attrib2 - 13 - - - - fogType - int - - fogtype - - - - texture - sampler-2d - 0 - - - dataBuffer - sampler-1d - 1 - - - colorMode - int - - material/color-mode-uniform - - - - - - diff --git a/Compositor/Effects/bumpspec.eff b/Compositor/Effects/bumpspec.eff deleted file mode 100644 index 79c6c3293..000000000 --- a/Compositor/Effects/bumpspec.eff +++ /dev/null @@ -1,5 +0,0 @@ - - - Effects/bumpspec - Effects/model-default - diff --git a/Compositor/Effects/chrome.eff b/Compositor/Effects/chrome.eff deleted file mode 100644 index 8a7776411..000000000 --- a/Compositor/Effects/chrome.eff +++ /dev/null @@ -1,125 +0,0 @@ - - - Effects/chrome - - - transparent - - /rendering/scene/chrome-light - - - - false - - 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 - - - modulate - constant - src-color - texture1 - src-color - chrome-light - - - - 1 - chrome-texture - linear-mipmap-linear - repeat - repeat - - interpolate - texture0 - src-color - previous - src-color - texture0 - src-alpha - - replace - texture1 - src-alpha - - - sphere-map - - - - - - als-lighting - - false - - 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 - - - modulate - constant - src-color - texture1 - src-color - chrome-light - - - - 1 - chrome-texture - linear-mipmap-linear - repeat - repeat - - interpolate - texture0 - src-color - previous - src-color - texture0 - src-alpha - - replace - texture1 - src-alpha - - - sphere-map - - - - - diff --git a/Compositor/Effects/chute.eff b/Compositor/Effects/chute.eff deleted file mode 100644 index a3e6480d6..000000000 --- a/Compositor/Effects/chute.eff +++ /dev/null @@ -1,460 +0,0 @@ - - - Effects/chute - Effects/model-default - - 1.0 - 0.0 - 0.0 - 0.0 - - - - als-lighting - - - - - 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 - - - 10 - DepthSortedBin - - - rendering-hint - - - - 0 - - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - vertex-program-two-side - - - Shaders/ALS/chute.vert - Shaders/ALS/model-base.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - ground_scattering - float - - ground_scattering - - - - terminator - float - - terminator - - - - terrain_alt - float - - terrain_alt - - - - overcast - float - - overcast - - - - eye_alt - float - - eye_alt - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - air_pollution - float - - air_pollution - - - - chute_force - float - - chute_force - - - - chute_fold - float - - chute_fold - - - - chute_bend - float - - chute_bend - - - - chute_projection_z - float - - chute_projection_z - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - 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 - - - - geo_light_r - float - - geo_light_r - - - - geo_light_g - float - - geo_light_g - - - - geo_light_b - float - - geo_light_b - - - - geo_light_x - float - - geo_light_x - - - - geo_light_y - float - - geo_light_y - - - - geo_light_z - float - - geo_light_z - - - - geo_light_radius - float - - geo_light_radius - - - - geo_ambience - float - - geo_ambience - - - - texture - sampler-2d - 0 - - - colorMode - int - - material/color-mode-uniform - - - - use_searchlight - int - - use_searchlight - - - - use_landing_light - int - - use_landing_light - - - - use_alt_landing_light - int - - use_alt_landing_light - - - - use_geo_light - int - - use_geo_light - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - quality_level - int - - quality_level - - - - tquality_level - int - - tquality_level - - - - - diff --git a/Compositor/Effects/cityLM.eff b/Compositor/Effects/cityLM.eff deleted file mode 100644 index 7ed569c00..000000000 --- a/Compositor/Effects/cityLM.eff +++ /dev/null @@ -1,35 +0,0 @@ - - - Effects/cityLM - Effects/model-combined-deferred - - - 1 - 1 - - /Textures/osm2city/atlas_facades_LM.png - repeat - repeat - - - /environment/lightmap-factor - - 1. 0.88 0.6 - - /scenery/osm2city/lightmap-factor - - - 0.564 0.409 0.172 - 0 - 0 - 1 - 1 - - - diff --git a/Compositor/Effects/cliffs.eff b/Compositor/Effects/cliffs.eff deleted file mode 100644 index f890f5265..000000000 --- a/Compositor/Effects/cliffs.eff +++ /dev/null @@ -1,791 +0,0 @@ - - - Effects/cliffs - Effects/terrain-default - - - 0.71 0.49 0.40 - 0.42 0.38 0.37 - 0.4 - 0.0 - 1.0 - 0.6 - 7.0 - 0.8 - 1.0 - 0 - - - - - - - als-lighting - - - - - 6.0 - /sim/rendering/shaders/landmass - - - 6.0 - /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 - - - material/emissive - - - material/shininess - - ambient-and-diffuse - - - transparent - - - transparent - - smooth - back - - - render-bin/bin-number - - - render-bin/bin-name - - - - Shaders/ALS/terrain-ultra.vert - Shaders/ALS/filters.vert - Shaders/ALS/cliffs.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/noise.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/filters.frag - - - intrinsic_wetness - float - - intrinsic_wetness - - - - slopeline_strength - float - - slopeline_strength - - - - rock_strata - int - - rock_strata - - - - transition_model - float - - transition_model - - - - overlay_bias - float - - overlay-bias - - - - crack_depth - float - - crack-depth - - - - crack_pattern_stretch - float - - crack-pattern-stretch - - - - grain_fade_power - float - - grain-fade-power - - - - rock_brightness - float - - rock-brightness - - - - dust_resistance - float - - dust_resistance - - - - 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 - - - - eye_lat - float - - eye_lat - - - - eye_lon - float - - eye_lon - - - - snowlevel - float - - snow_level - - - - snow_thickness_factor - float - - snow_thickness_factor - - - - dust_cover_factor - float - - dust_cover_factor - - - - lichen_cover_factor - float - - lichen_cover_factor - - - - wetness - float - - wetness - - - - fogstructure - float - - fogstructure - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - contrast - float - - contrast - - - - overlay_alpha - float - - overlay-alpha - - - - base_color - float-vec3 - - base-color - - - - overlay_color - float-vec3 - - overlay-color - - - - 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 - - - - 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 - - - - wind_effects - int - - wind_effects - - - - cloud_shadow_flag - int - - cloud_shadow_flag - - - - colorMode - int - 2 - - - - lequal - - - - - diff --git a/Compositor/Effects/cloud-impostor.eff b/Compositor/Effects/cloud-impostor.eff deleted file mode 100644 index fc8953ae5..000000000 --- a/Compositor/Effects/cloud-impostor.eff +++ /dev/null @@ -1,328 +0,0 @@ - - - Effects/cloud-impostor - - - - - /sim/rendering/clouds3d-vis-range - - - /environment/terminator-relative-position-m - - - /sim/rendering/eye-altitude-m - - - /environment/cloud-self-shading - - - /environment/moonlight - - - /environment/air-pollution-norm - - - /environment/visibility-m - - - /sim/rendering/als-filters/use-filtering - - - /sim/rendering/als-filters/gamma - - - /sim/rendering/als-filters/brightness - - - /environment/surface/delta-T-cloud - - - /sim/rendering/als-filters/grey-factor - - - /sim/rendering/als-filters/black-factor - - - /sim/rendering/als-filters/use-night-vision - - - /sim/rendering/als-filters/use-IR-vision - - - /sim/startup/xsize - - - /sim/startup/ysize - - - - - - /sim/rendering/clouds3d-enable - - 1.0 - - - - - - - true - - 0.5 0.5 0.5 1.0 - 0.5 0.5 0.5 1.0 - off - - - greater - 0.01 - - smooth - - src-alpha - one-minus-src-alpha - - - false - - - 9 - DepthSortedBin - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - Shaders/Default/cloud-static.vert - Shaders/Default/cloud-static.frag - - - baseTexture - sampler-2d - 0 - - - terminator - float - - terminator - - - - altitude - float - - altitude - - - true - - - - als-lighting - - - /sim/rendering/clouds3d-enable - - 1.0 - - - - - - - true - - 0.5 0.5 0.5 1.0 - 0.5 0.5 0.5 1.0 - off - - - greater - 0.01 - - smooth - - src-alpha - one-minus-src-alpha - - - false - - - 9 - DepthSortedBin - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - Shaders/ALS/cloud-impostor.vert - Shaders/ALS/filters.vert - Shaders/ALS/cloud-static.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - - - baseTexture - sampler-2d - 0 - - - range - float - - range - - - - terminator - float - - terminator - - - - altitude - float - - altitude - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - air_pollution - float - - air_pollution - - - - visibility - float - - visibility - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - true - - - diff --git a/Compositor/Effects/cloud-models.eff b/Compositor/Effects/cloud-models.eff deleted file mode 100644 index f24edb0f6..000000000 --- a/Compositor/Effects/cloud-models.eff +++ /dev/null @@ -1,151 +0,0 @@ - - - Effects/cloud-models - - - white - - - - - - - - - - - - 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]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - modulate - - - - - diff --git a/Compositor/Effects/cloud-noctilucent.eff b/Compositor/Effects/cloud-noctilucent.eff deleted file mode 100644 index ab9194c41..000000000 --- a/Compositor/Effects/cloud-noctilucent.eff +++ /dev/null @@ -1,196 +0,0 @@ - - - Effects/cloud-noctilucent - - - - - /environment/terminator-relative-position-m - - - /sim/rendering/eye-altitude-m - - - /environment/cloud-self-shading - - - /environment/moonlight - - - - - - /sim/rendering/clouds3d-enable - - 1.0 - - - - - - - true - - 0.5 0.5 0.5 1.0 - 0.5 0.5 0.5 1.0 - off - - - greater - 0.01 - - smooth - - src-alpha - one-minus-src-alpha - - - false - - - 9 - DepthSortedBin - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - Shaders/Default/cloud-static.vert - Shaders/Default/cloud-static.frag - - - baseTexture - sampler-2d - 0 - - - terminator - float - - terminator - - - - altitude - float - - altitude - - - true - - - - als-lighting - - - /sim/rendering/clouds3d-enable - - 1.0 - - - - - - - true - - 0.5 0.5 0.5 1.0 - 0.5 0.5 0.5 1.0 - off - - - greater - 0.01 - - smooth - - src-alpha - one-minus-src-alpha - - - false - - - 9 - DepthSortedBin - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - Shaders/ALS/cloud-noctilucent.vert - Shaders/ALS/filters.vert - Shaders/ALS/cloud-static.frag - - - baseTexture - sampler-2d - 0 - - - terminator - float - - terminator - - - - altitude - float - - altitude - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - true - - - diff --git a/Compositor/Effects/cloud-static.eff b/Compositor/Effects/cloud-static.eff deleted file mode 100644 index a0cda73b9..000000000 --- a/Compositor/Effects/cloud-static.eff +++ /dev/null @@ -1,489 +0,0 @@ - - - Effects/cloud-static - - - - - /environment/terminator-relative-position-m - - - /sim/rendering/eye-altitude-m - - - /environment/cloud-self-shading - - - /environment/moonlight - - - /environment/scattering-phenomena/ring-factor - - - /environment/scattering-phenomena/rainbow-factor - - - /sim/rendering/als-filters/use-filtering - - - /sim/rendering/als-filters/gamma - - - /sim/rendering/als-filters/brightness - - - /environment/surface/delta-T-cloud - - - /sim/rendering/als-filters/grey-factor - - - /sim/rendering/als-filters/black-factor - - - /sim/rendering/als-filters/use-night-vision - - - /sim/rendering/als-filters/use-IR-vision - - - /sim/startup/xsize - - - /sim/startup/ysize - - - - - - /sim/rendering/clouds3d-enable - - 1.0 - - - - - - - true - - 0.5 0.5 0.5 1.0 - 0.5 0.5 0.5 1.0 - off - - - greater - 0.01 - - smooth - - src-alpha - one-minus-src-alpha - - - false - - - 9 - DepthSortedBin - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - Shaders/Default/cloud-static.vert - Shaders/Default/cloud-static.frag - - - baseTexture - sampler-2d - 0 - - - terminator - float - - terminator - - - - altitude - float - - altitude - - - true - - - - als-lighting - - - /sim/rendering/clouds3d-enable - - 1.0 - - - - 1.0 - /sim/rendering/shaders/clouds - - - - - - true - - 0.5 0.5 0.5 1.0 - 0.5 0.5 0.5 1.0 - off - - - greater - 0.01 - - smooth - - src-alpha - one-minus-src-alpha - - - false - - - 9 - DepthSortedBin - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - Shaders/ALS/cloud-static-detailed.vert - Shaders/ALS/cloud-static-detailed.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - - - baseTexture - sampler-2d - 0 - - - terminator - float - - terminator - - - - altitude - float - - altitude - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - ring_factor - float - - ring-factor - - - - rainbow_factor - float - - rainbow-factor - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - true - - - - als-lighting - - - /sim/rendering/clouds3d-enable - - 1.0 - - - - - - - true - - 0.5 0.5 0.5 1.0 - 0.5 0.5 0.5 1.0 - off - - - greater - 0.01 - - smooth - - src-alpha - one-minus-src-alpha - - - false - - - 9 - DepthSortedBin - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - Shaders/ALS/cloud-static.vert - Shaders/ALS/filters.vert - Shaders/ALS/cloud-static.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - - - baseTexture - sampler-2d - 0 - - - terminator - float - - terminator - - - - altitude - float - - altitude - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - true - - - diff --git a/Compositor/Effects/cloud.eff b/Compositor/Effects/cloud.eff deleted file mode 100644 index 91409c1e5..000000000 --- a/Compositor/Effects/cloud.eff +++ /dev/null @@ -1,629 +0,0 @@ - - - Effects/cloud - - - - - /sim/rendering/clouds3d-vis-range - - - /sim/rendering/clouds3d-detail-range - - - /rendering/scene/scattering - - - /environment/terminator-relative-position-m - - - /sim/rendering/eye-altitude-m - - - /environment/cloud-self-shading - - - /environment/moonlight - - - /environment/air-pollution-norm - - - /environment/visibility-m - - - /environment/lightning/flash - - - /environment/lightning/lightning-pos-x - - - /environment/lightning/lightning-pos-y - - - /environment/lightning/lightning-range - - - /sim/rendering/als-filters/use-filtering - - - /sim/rendering/als-filters/gamma - - - /sim/rendering/als-filters/brightness - - - /environment/surface/delta-T-cloud - - - /sim/rendering/als-filters/grey-factor - - - /sim/rendering/als-filters/black-factor - - - /sim/rendering/als-filters/use-night-vision - - - /sim/rendering/als-filters/use-IR-vision - - - /sim/startup/xsize - - - /sim/startup/ysize - - - - - - 1.0 - - - - - - true - - 0.5 0.5 0.5 1.0 - 0.5 0.5 0.5 1.0 - off - - - greater - 0.01 - - smooth - - src-alpha - one-minus-src-alpha - - - false - - - 10 - DepthSortedBin - - - 0 - 2d - - texture[0]/image - - clamp - clamp - - - Shaders/Default/3dcloud.vert - Shaders/Default/3dcloud.frag - - usrAttr1 - 10 - - - usrAttr2 - 11 - - - - baseTexture - sampler-2d - 0 - - - range - float - - range - - - - detail_range - float - - detail - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - altitude - float - - altitude - - - - - - - als-lighting - - - - 1.0 - - - - 1.0 - /sim/rendering/shaders/clouds - - - - - - true - - 0.5 0.5 0.5 1.0 - 0.5 0.5 0.5 1.0 - off - - - greater - 0.01 - - smooth - - src-alpha - one-minus-src-alpha - - - false - - - 10 - DepthSortedBin - - - 0 - 2d - - texture[0]/image - - clamp - clamp - - - Shaders/ALS/3dcloud-detailed.vert - Shaders/ALS/3dcloud-detailed.frag - Shaders/ALS/filters.frag - Shaders/ALS/noise.frag - - usrAttr1 - 10 - - - usrAttr2 - 11 - - - - baseTexture - sampler-2d - 0 - - - range - float - - range - - - - detail_range - float - - detail - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - altitude - float - - altitude - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - air_pollution - float - - air_pollution - - - - visibility - float - - visibility - - - - flash - float - - flash - - - - lightning_pos_x - float - - lightning-pos-x - - - - lightning_pos_y - float - - lightning-pos-y - - - - lightning_range - float - - lightning-range - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - - - - als-lighting - - - - 1.0 - - - - - - - true - - 0.5 0.5 0.5 1.0 - 0.5 0.5 0.5 1.0 - off - - - greater - 0.01 - - smooth - - src-alpha - one-minus-src-alpha - - - false - - - 10 - DepthSortedBin - - - 0 - 2d - - texture[0]/image - - clamp - clamp - - - Shaders/ALS/3dcloud.vert - Shaders/ALS/filters.vert - Shaders/ALS/3dcloud.frag - Shaders/ALS/filters.frag - Shaders/ALS/noise.frag - - usrAttr1 - 10 - - - usrAttr2 - 11 - - - - baseTexture - sampler-2d - 0 - - - range - float - - range - - - - detail_range - float - - detail - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - altitude - float - - altitude - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - air_pollution - float - - air_pollution - - - - visibility - float - - visibility - - - - flash - float - - flash - - - - lightning_pos_x - float - - lightning-pos-x - - - - lightning_pos_y - float - - lightning-pos-y - - - - lightning_range - float - - lightning-range - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - - - diff --git a/Compositor/Effects/clouds-box.eff b/Compositor/Effects/clouds-box.eff deleted file mode 100644 index 47d0af162..000000000 --- a/Compositor/Effects/clouds-box.eff +++ /dev/null @@ -1,82 +0,0 @@ - - - Effects/clouds-thin - - - - - - - - /sim/rendering/shaders/quality-level - - 1.0 - - - - - - - true - - 0.5 0.5 0.5 1.0 - 0.5 0.5 0.5 1.0 - off - - - greater - 0.01 - - smooth - - src-alpha - one-minus-src-alpha - - - false - - - 10 - DepthSortedBin - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - Shaders/Default/clouds-box.vert - Shaders/Default/clouds-box.frag - - - - baseTexture - sampler-2d - 0 - - false - - - diff --git a/Compositor/Effects/clouds-layered.eff b/Compositor/Effects/clouds-layered.eff deleted file mode 100644 index 208f2ffe9..000000000 --- a/Compositor/Effects/clouds-layered.eff +++ /dev/null @@ -1,74 +0,0 @@ - - - Effects/clouds-layered - - - - - - - - /sim/rendering/shaders/quality-level - - 1.0 - - - - - - - true - - 0.5 0.5 0.5 1.0 - 0.5 0.5 0.5 1.0 - off - - - greater - 0.01 - - smooth - - src-alpha - one-minus-src-alpha - - - false - - - 10 - DepthSortedBin - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - Shaders/Default/clouds-layered.vert - Shaders/Default/clouds-layered.frag - - - baseTexture - sampler-2d - 0 - - true - - - diff --git a/Compositor/Effects/clouds-thick.eff b/Compositor/Effects/clouds-thick.eff deleted file mode 100644 index 0a0abda6a..000000000 --- a/Compositor/Effects/clouds-thick.eff +++ /dev/null @@ -1,74 +0,0 @@ - - - Effects/clouds-thick - - - - - - - - /sim/rendering/shaders/quality-level - - 1.0 - - - - - - - true - - 0.5 0.5 0.5 1.0 - 0.5 0.5 0.5 1.0 - off - - - greater - 0.01 - - smooth - - src-alpha - one-minus-src-alpha - - - false - - - 10 - DepthSortedBin - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - Shaders/Default/clouds-thick.vert - Shaders/Default/clouds-thick.frag - - - baseTexture - sampler-2d - 0 - - false - - - diff --git a/Compositor/Effects/clouds-thin.eff b/Compositor/Effects/clouds-thin.eff deleted file mode 100644 index 08d1f2351..000000000 --- a/Compositor/Effects/clouds-thin.eff +++ /dev/null @@ -1,82 +0,0 @@ - - - Effects/clouds-thin - - - - - - - - /sim/rendering/shaders/quality-level - - 1.0 - - - - - - - true - - 0.5 0.5 0.5 1.0 - 0.5 0.5 0.5 1.0 - off - - - greater - 0.01 - - smooth - - src-alpha - one-minus-src-alpha - - - false - - - 10 - DepthSortedBin - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - Shaders/Default/clouds-thin.vert - Shaders/Default/clouds-thin.frag - - - - baseTexture - sampler-2d - 0 - - false - - - diff --git a/Compositor/Effects/clouds-thinlayer.eff b/Compositor/Effects/clouds-thinlayer.eff deleted file mode 100644 index 4f79ab762..000000000 --- a/Compositor/Effects/clouds-thinlayer.eff +++ /dev/null @@ -1,74 +0,0 @@ - - - Effects/clouds-layered - - - - - - - - /sim/rendering/shaders/quality-level - - 1.0 - - - - - - - true - - 0.5 0.5 0.5 1.0 - 0.5 0.5 0.5 1.0 - off - - - greater - 0.01 - - smooth - - src-alpha - one-minus-src-alpha - - - false - - - 10 - DepthSortedBin - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - Shaders/Default/clouds-thinlayer.vert - Shaders/Default/clouds-thinlayer.frag - - - baseTexture - sampler-2d - 0 - - true - - - diff --git a/Compositor/Effects/crop.eff b/Compositor/Effects/crop.eff deleted file mode 100644 index 9a351f308..000000000 --- a/Compositor/Effects/crop.eff +++ /dev/null @@ -1,153 +0,0 @@ - - - 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/rembrandt/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/Default/crop.vert - Shaders/Default/include_fog.frag - Shaders/Default/crop.frag - - - NoiseTex - sampler-3d - 0 - - - SampleTex - sampler-2d - 1 - - - ColorsTex - sampler-1d - 2 - - - snowlevel - float - - snow-level - - - - - diff --git a/Compositor/Effects/cropgrass.eff b/Compositor/Effects/cropgrass.eff deleted file mode 100644 index 04390c172..000000000 --- a/Compositor/Effects/cropgrass.eff +++ /dev/null @@ -1,25 +0,0 @@ - - - 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/Compositor/Effects/dirt-runway.eff b/Compositor/Effects/dirt-runway.eff deleted file mode 100644 index 099c2c679..000000000 --- a/Compositor/Effects/dirt-runway.eff +++ /dev/null @@ -1,928 +0,0 @@ - - - Effects/dirt-runway - Effects/runway - - - Textures/Terrain/sand_hires_ochre.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Terrain/airport_grass2.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Terrain/grain_texture.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - 0.5 - 0.5 - 0.0 - 0.0 - 0.0 - 0.5 - 0.2 - 1.0 - 1 - 0.3 - 100.0 - 30.0 - 30.0 - 1.0 - - - als-lighting - - - - - 4.0 - /sim/rendering/shaders/landmass - - - 3.0 - /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 - - - material/emissive - - - material/shininess - - ambient-and-diffuse - - - transparent - - - transparent - - smooth - back - - - render-bin/bin-number - - - render-bin/bin-name - - - - 0 - - texture[16]/type - - - texture[16]/image - - - texture[16]/filter - - - texture[16]/wrap-s - - - texture[16]/wrap-t - - - texture[16]/internal-format - - - - 4 - - texture[4]/type - - - texture[4]/image - - - texture[4]/filter - - - texture[4]/wrap-s - - - texture[4]/wrap-t - - - texture[4]/internal-format - - - - 5 - - texture[17]/type - - - texture[17]/image - - - texture[17]/filter - - - texture[17]/wrap-s - - - texture[17]/wrap-t - - - texture[17]/internal-format - - - - 6 - - texture[18]/type - - - texture[18]/image - - - texture[18]/filter - - - texture[18]/wrap-s - - - texture[18]/wrap-t - - - texture[18]/internal-format - - - - 7 - - texture[11]/type - - - texture[11]/image - - - texture[11]/filter - - - texture[11]/wrap-s - - - texture[11]/wrap-t - - - texture[11]/internal-format - - - - Shaders/ALS/terrain-ultra.vert - Shaders/ALS/filters.vert - Shaders/ALS/drunway.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/noise.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/filters.frag - - - 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 - - - - snow_thickness_factor - float - - snow_thickness_factor - - - - dust_cover_factor - float - - dust_cover_factor - - - - lichen_cover_factor - float - - lichen_cover_factor - - - - size_base - float - - size_base - - - - size_overlay - float - - size_overlay - - - - size_grain - float - - size_grain - - - - grain_strength - float - - grain_strength - - - - strength_05m - float - - strength_05m - - - - strength_1m - float - - strength_1m - - - - strength_2m - float - - strength_2m - - - - strength_5m - float - - strength_5m - - - - strength_10m - float - - strength_10m - - - - filter_transition - float - - filter_transition - - - - filter_threshold - float - - filter_threshold - - - - relief_strength - float - - relief_strength - - - - bias_center_strength - float - - bias_center_strength - - - - 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_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - 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 - - - - bias_center - int - - bias_center - - - - quality_level - int - - quality_level - - - - tquality_level - int - - tquality_level - - - - 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 - - - - raise_vertex - bool - - raise_vertex - - - - texture - sampler-2d - 0 - - - NormalTex - sampler-2d - 4 - - - mix_texture - sampler-2d - 5 - - - grain_texture - sampler-2d - 6 - - - detail_texture - sampler-2d - 7 - - - colorMode - int - 2 - - - - lequal - - - - - diff --git a/Compositor/Effects/flutter.eff b/Compositor/Effects/flutter.eff deleted file mode 100644 index 3a5e2d0ea..000000000 --- a/Compositor/Effects/flutter.eff +++ /dev/null @@ -1,535 +0,0 @@ - - - Effects/flutter - Effects/model-default - - true - - 1 - - - smooth - - 0.0 - 0.08 - - /environment/sea/surface/wind-from-east-fps - - - /environment/sea/surface/wind-from-north-fps - - 0.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/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/Default/flutter.vert - Shaders/Default/include_fog.frag - Shaders/Default/default.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 - - - - - - - als-lighting - - - - - 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/ALS/flutter.vert - Shaders/ALS/terrain-base.frag - Shaders/ALS/hazes.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.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 - - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - - - diff --git a/Compositor/Effects/forest.eff b/Compositor/Effects/forest.eff deleted file mode 100644 index 4d3203d10..000000000 --- a/Compositor/Effects/forest.eff +++ /dev/null @@ -1,348 +0,0 @@ - - - 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/rembrandt/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/Default/forest.vert - Shaders/Default/include_fog.frag - Shaders/Default/forest.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 - - - - - - diff --git a/Compositor/Effects/glacier.eff b/Compositor/Effects/glacier.eff deleted file mode 100644 index c7afffdd6..000000000 --- a/Compositor/Effects/glacier.eff +++ /dev/null @@ -1,348 +0,0 @@ - - - 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 - - 0.0 - /sim/rendering/rembrandt/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 - - - - 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/Default/forest.vert - Shaders/Default/include_fog.frag - Shaders/Default/forest.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 - - - - - - diff --git a/Compositor/Effects/glass.eff b/Compositor/Effects/glass.eff deleted file mode 100644 index 7bb63adf0..000000000 --- a/Compositor/Effects/glass.eff +++ /dev/null @@ -1,694 +0,0 @@ - - - Effects/glass - Effects/model-default - - - Aircraft/Generic/Effects/window_frost.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - - white - - - - 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 - - - - - 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 - - - 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 - - /environment/aircraft-effects/splash-vector-x - - - /environment/aircraft-effects/splash-vector-y - - - /environment/aircraft-effects/splash-vector-z - - - /environment/rain-norm - - - /environment/aircraft-effects/ground-splash-norm - - - /environment/aircraft-effects/frost-level - - 0 - - /environment/aircraft-effects/fog-level - - - /environment/aircraft-effects/use-wipers - - - /environment/aircraft-effects/use-overlay - - - /environment/aircraft-effects/overlay-alpha - - 0.5 - 0 - 1.0 - 0 - 0 - 0 - 1.0 - 1.0 1.0 1.0 - 1.0 - 1.0 1.0 1.0 - 1.0 - 1.0 1.0 1.0 - 1.0 - 1.0 1.0 1.0 - - - - - - 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 - - - - - - als-lighting - - - - - 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 - - - rendering-hint - - - 111 - DepthSortedBin - - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - texture[0]/internal-format - - - - 1 - - texture[1]/type - - - texture[1]/image - - - texture[1]/filter - - - texture[1]/wrap-s - - - texture[1]/wrap-t - - - texture[1]/internal-format - - - - 2 - - 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]/images - - - - 4 - - texture[4]/type - - - texture[4]/images - - - - vertex-program-two-side - - - Shaders/ALS/glass.vert - Shaders/ALS/glass.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - - - tint - float-vec4 - - glass-tint - - - - overlay_color - float-vec3 - - overlay-color - - - - 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] - - - - splash_x - float - - splash-x - - - - splash_y - float - - splash-y - - - - splash_z - float - - splash-z - - - - rain_norm - float - - rnorm - - - - ground_splash_norm - float - - gsnorm - - - - frost_level - float - - frost-level - - - - fog_level - float - - fog-level - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - ground_scattering - float - - ground_scattering - - - - terminator - float - - terminator - - - - overcast - float - - overcast - - - - hazeLayerAltitude - float - - lthickness - - - - eye_alt - float - - eye_alt - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - air_pollution - float - - air_pollution - - - - reflection_strength - float - - reflection-strength - - - - overlay_alpha - float - - overlay-alpha - - - - overlay_glare - float - - overlay-glare - - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - texture - sampler-2d - 0 - - - frost_texture - sampler-2d - 1 - - - func_texture - sampler-2d - 2 - - - cube_texture - sampler-cube - 3 - - - cube_light_texture - sampler-cube - 4 - - - use_reflection - int - - use-reflection - - - - use_mask - int - - use-mask - - - - use_wipers - int - - use-wipers - - - - use_overlay - int - - use-overlay - - - - use_reflection_lightmap - int - - use-reflection-lightmap - - - - lightmap_multi - int - - lightmap-multi - - - - adaptive_mapping - int - - surface-mapping-scheme - - - - colorMode - int - - material/color-mode-uniform - - - - - diff --git a/Compositor/Effects/grass.eff b/Compositor/Effects/grass.eff deleted file mode 100644 index ba97f835d..000000000 --- a/Compositor/Effects/grass.eff +++ /dev/null @@ -1,1181 +0,0 @@ - - - Effects/grass - Effects/airfield - - - Textures/Terrain/airport-grass-autumn.png - 2d - nearest-mipmap-nearest - nearest - repeat - repeat - normalized - - 0.3 - 1.0 - 2 - 0 - 0.0 - - /environment/sea/surface/wind-from-east-fps - - - /environment/sea/surface/wind-from-north-fps - - - /environment/aircraft-effects/wash-x - - - /environment/aircraft-effects/wash-y - - - /environment/aircraft-effects/wash-strength - - - - als-lighting - - - - 2.0 - /sim/rendering/shaders/transition - - - 1.0 - /sim/rendering/shaders/vegetation-effects - - - 0.0 - /sim/rendering/rembrandt/enabled - - - - 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 - - - material/emissive - - - material/shininess - - ambient-and-diffuse - - - transparent - - smooth - back - - -1 - RenderBin - - - Shaders/ALS/terrain-writedepth.vert - Shaders/ALS/terrain-writedepth.frag - - 0 0 0 0 - - - true - - - material/ambient - - - material/diffuse - - - material/specular - - - material/emissive - - - material/shininess - - ambient-and-diffuse - - - transparent - - - transparent - - smooth - back - - - render-bin/bin-number - - - render-bin/bin-name - - - - 0 - - texture[13]/image - - - texture[13]/type - - - texture[13]/filter - - - texture[13]/wrap-s - - - texture[13]/wrap-t - - - texture[13]/internal-format - - - - 1 - - texture[14]/image - - - texture[14]/type - - - texture[14]/filter - - - texture[14]/wrap-s - - - texture[14]/wrap-t - - - texture[14]/internal-format - - - - 2 - - texture[15]/image - - - texture[15]/type - - - texture[15]/filter - - - texture[15]/wrap-s - - - texture[15]/wrap-t - - - texture[15]/internal-format - - - - Shaders/ALS/terrain-ultra.vert - Shaders/ALS/filters.vert - Shaders/ALS/shadows-include.vert - Shaders/ALS/airfield.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/noise.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/filters.frag - Shaders/ALS/shadows-include.frag - - - 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 - - - - snow_thickness_factor - float - - snow_thickness_factor - - - - dust_cover_factor - float - - dust_cover_factor - - - - wetness - float - - wetness - - - - fogstructure - float - - fogstructure - - - - grit_alpha - float - - grit_alpha - - - - overlay_bias - float - - overlay_bias - - - - overlay_alpha - float - - overlay_alpha - - - - base_layer_magnification - float - - base_layer_magnification - - - - overlay_layer_magnification - float - - overlay_layer_magnification - - - - grain_layer_magnification - float - - grain_layer_magnification - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - air_pollution - float - - air_pollution - - - - season - float - - season - - - - - 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 - - - - quality_level - int - - quality_level - - - - tquality_level - int - - tquality_level - - - - use_overlay - int - - use_overlay - - - - use_grain - int - - use_grain - - - - use_color_overlay - int - - use_color_overlay - - - - 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 - - - - raise_vertex - bool - - raise_vertex - - - - texture - sampler-2d - 0 - - - overlay_texture - sampler-2d - 1 - - - grain_texture - sampler-2d - 2 - - - colorMode - int - 2 - - - - - shadow_tex - sampler-2d - 10 - - - shadows_enabled - bool - - shadows_enabled - - - - sun_atlas_size - int - - sun_atlas_size - - - - - lequal - false - - - - true - - - material/ambient - - - material/diffuse - - - material/specular - - - material/emissive - - - material/shininess - - ambient-and-diffuse - - - transparent - - smooth - back - - - - - render-bin/bin-number - - - render-bin/bin-name - - - - 8 - - texture[20]/type - - - texture[20]/image - - - texture[20]/filter - - - texture[20]/mag-filter - - - texture[20]/wrap-s - - - texture[20]/wrap-t - - - texture[20]/internal-format - - - - Shaders/ALS/grass.vert - Shaders/ALS/grass.geom - Shaders/ALS/grass.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - Shaders/ALS/shadows-include.frag - 96 - triangles - triangle-strip - - - colorTex - sampler-2d - 8 - - - visibility - float - - visibility - - - - scattering - float - - scattering - - - - wind_x - float - - windE - - - - wind_y - float - - windN - - - - wash_x - float - - wash-x - - - - wash_y - float - - wash-y - - - - wash_strength - float - - wash-strength - - - - overlay_bias - float - - overlay_bias - - - - max_height - float - - max_grass_height - - - - grass_density - float - - grass_density - - - - grass_modulate_height_min - float - - grass_modulate_height_min - - - - season - float - - season - - - - grass_modulate_by_overlay - int - - grass_modulate_by_overlay - - - - grass_groups - int - - grass_groups - - - - - 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 - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - wind_effects - int - - wind_effects - - - - - shadow_tex - sampler-2d - 10 - - - shadows_enabled - bool - - shadows_enabled - - - - sun_atlas_size - int - - sun_atlas_size - - - - - true - src-alpha - one-minus-src-alpha - - - false - - - - diff --git a/Compositor/Effects/herbtundra.eff b/Compositor/Effects/herbtundra.eff deleted file mode 100644 index 1b3367dc1..000000000 --- a/Compositor/Effects/herbtundra.eff +++ /dev/null @@ -1,347 +0,0 @@ - - - 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 - - 0.0 - /sim/rendering/rembrandt/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 - - - - 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/Default/forest.vert - Shaders/Default/include_fog.frag - Shaders/Default/forest.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 - - - - - - diff --git a/Compositor/Effects/hud.eff b/Compositor/Effects/hud.eff deleted file mode 100644 index 06d39ed85..000000000 --- a/Compositor/Effects/hud.eff +++ /dev/null @@ -1,719 +0,0 @@ - - - Effects/hud - Effects/model-default - - - Aircraft/Generic/Effects/window_frost.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - - Aircraft/Generic/Effects/hud-glass.rgb - 2d - 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 - - - - - 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 - - - 0.95 1.0 0.95 1.0 - 0.8 1.0 0.9 - - /environment/aircraft-effects/splash-vector-x - - - /environment/aircraft-effects/splash-vector-y - - - /environment/aircraft-effects/splash-vector-z - - - /environment/rain-norm - - - /environment/aircraft-effects/ground-splash-norm - - - /environment/aircraft-effects/frost-level - - 0 - - /environment/aircraft-effects/fog-level - - - /environment/aircraft-effects/use-wipers - - 1 - 0.35 - 0.4 - 0 - 1.0 - 1 - 0 - 0 - 1.0 - 1.0 1.0 1.0 - 1.0 - 1.0 1.0 1.0 - 1.0 - 1.0 1.0 1.0 - 1.0 - 1.0 1.0 1.0 - 0.0006 - 2.5 - 1.0 - - - - - - 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 - - - - - - als-lighting - - - - - 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 - - - rendering-hint - - - 111 - DepthSortedBin - - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - texture[0]/internal-format - - - - 1 - - texture[1]/type - - - texture[1]/image - - - texture[1]/filter - - - texture[1]/wrap-s - - - texture[1]/wrap-t - - - texture[1]/internal-format - - - - 2 - - 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]/images - - - - 4 - - texture[4]/type - - - texture[4]/images - - - - vertex-program-two-side - - - Shaders/ALS/hud.vert - Shaders/ALS/hud.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - - - tint - float-vec4 - - glass-tint - - - - overlay_color - float-vec3 - - overlay-color - - - - 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] - - - - splash_x - float - - splash-x - - - - splash_y - float - - splash-y - - - - splash_z - float - - splash-z - - - - rain_norm - float - - rnorm - - - - ground_splash_norm - float - - gsnorm - - - - frost_level - float - - frost-level - - - - fog_level - float - - fog-level - - - - sample_res - float - - sample-res - - - - sample_far - float - - sample-far - - - - hud_brightness - float - - hud-brightness - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - ground_scattering - float - - ground_scattering - - - - terminator - float - - terminator - - - - overcast - float - - overcast - - - - hazeLayerAltitude - float - - lthickness - - - - eye_alt - float - - eye_alt - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - air_pollution - float - - air_pollution - - - - reflection_strength - float - - reflection-strength - - - - overlay_alpha - float - - overlay-alpha - - - - overlay_glare - float - - overlay-glare - - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - texture - sampler-2d - 0 - - - frost_texture - sampler-2d - 1 - - - func_texture - sampler-2d - 2 - - - cube_texture - sampler-cube - 3 - - - cube_light_texture - sampler-cube - 4 - - - use_reflection - int - - use-reflection - - - - use_mask - int - - use-mask - - - - use_wipers - int - - use-wipers - - - - use_overlay - int - - use-overlay - - - - use_reflection_lightmap - int - - use-reflection-lightmap - - - - lightmap_multi - int - - lightmap-multi - - - - adaptive_mapping - int - - surface-mapping-scheme - - - - colorMode - int - - material/color-mode-uniform - - - - - diff --git a/Compositor/Effects/landmass-nowood.eff b/Compositor/Effects/landmass-nowood.eff deleted file mode 100644 index cd8b228a0..000000000 --- a/Compositor/Effects/landmass-nowood.eff +++ /dev/null @@ -1,8 +0,0 @@ - - - Effects/landmass-nowood - Effects/landmass - - 0.0 - - diff --git a/Compositor/Effects/landmass-scrub.eff b/Compositor/Effects/landmass-scrub.eff deleted file mode 100644 index 0557590db..000000000 --- a/Compositor/Effects/landmass-scrub.eff +++ /dev/null @@ -1,16 +0,0 @@ - - - Effects/landmass-scrub - Effects/landmass - - - Textures/Terrain/shrubcover-relief.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - 1.0 - - diff --git a/Compositor/Effects/landmass.eff b/Compositor/Effects/landmass.eff deleted file mode 100644 index 2a83b5190..000000000 --- a/Compositor/Effects/landmass.eff +++ /dev/null @@ -1,578 +0,0 @@ - - - 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 - - 4.0 - /sim/rendering/shaders/landmass - - - 0.0 - /sim/rendering/rembrandt/enabled - - - - 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/Default/landmass-g.vert - Shaders/Default/landmass.geom - Shaders/Default/include_fog.frag - Shaders/Default/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/rembrandt/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/Default/landmass.vert - Shaders/Default/include_fog.frag - Shaders/Default/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 - - - - - - diff --git a/Compositor/Effects/lfeat.eff b/Compositor/Effects/lfeat.eff deleted file mode 100644 index 239c15e92..000000000 --- a/Compositor/Effects/lfeat.eff +++ /dev/null @@ -1,96 +0,0 @@ - - - Effects/lfeat - Effects/runway - - - - 1.0 1.0 1.0 1.0 - - - 1.0 1.0 1.0 1.0 - - - 1.0 1.0 1.0 1.0 - - - 0.0 0.0 0.0 1.0 - - 1.2 - - true - true - - - als-lighting - - - false - - - - true - - false - - - - material/ambient - - - material/diffuse - - - material/specular - - - material/emissive - - - material/shininess - - ambient-and-diffuse - - - transparent - - - transparent - - smooth - back - - 7 - DepthSortedBin - - - 0 - - texture[0]/image - - - texture[0]/type - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - texture[0]/internal-format - - - modulate - - - - -0.5 - -2.0 - - - - diff --git a/Compositor/Effects/light-cone.eff b/Compositor/Effects/light-cone.eff deleted file mode 100644 index 08b152aa6..000000000 --- a/Compositor/Effects/light-cone.eff +++ /dev/null @@ -1,4 +0,0 @@ - - - Effects/light-cone - diff --git a/Compositor/Effects/light-point.eff b/Compositor/Effects/light-point.eff deleted file mode 100644 index ff33d0dbf..000000000 --- a/Compositor/Effects/light-point.eff +++ /dev/null @@ -1,4 +0,0 @@ - - - Effects/light-point - diff --git a/Compositor/Effects/light-spot.eff b/Compositor/Effects/light-spot.eff deleted file mode 100644 index 0d1739ec6..000000000 --- a/Compositor/Effects/light-spot.eff +++ /dev/null @@ -1,4 +0,0 @@ - - - Effects/light-spot - diff --git a/Compositor/Effects/lightning.eff b/Compositor/Effects/lightning.eff deleted file mode 100644 index 6e966e362..000000000 --- a/Compositor/Effects/lightning.eff +++ /dev/null @@ -1,9 +0,0 @@ - - - - Effects/lightning - Effects/rain-layer - - 1 - - diff --git a/Compositor/Effects/material-diffuse.eff b/Compositor/Effects/material-diffuse.eff deleted file mode 100644 index ab3c32e02..000000000 --- a/Compositor/Effects/material-diffuse.eff +++ /dev/null @@ -1,11 +0,0 @@ - - - Effects/material-diffuse - - - 1 - - - - Effects/model-default - diff --git a/Compositor/Effects/material-off.eff b/Compositor/Effects/material-off.eff deleted file mode 100644 index 4b52522ab..000000000 --- a/Compositor/Effects/material-off.eff +++ /dev/null @@ -1,11 +0,0 @@ - - - Effects/material-off - - - 0 - - - - Effects/model-default - diff --git a/Compositor/Effects/model-combined-deferred.eff b/Compositor/Effects/model-combined-deferred.eff deleted file mode 100644 index b6f18c375..000000000 --- a/Compositor/Effects/model-combined-deferred.eff +++ /dev/null @@ -1,5 +0,0 @@ - - - Effects/model-combined-deferred - Effects/model-combined - diff --git a/Compositor/Effects/model-combined-transparent.eff b/Compositor/Effects/model-combined-transparent.eff deleted file mode 100644 index c2ae01ceb..000000000 --- a/Compositor/Effects/model-combined-transparent.eff +++ /dev/null @@ -1,114 +0,0 @@ - - - - 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/Compositor/Effects/model-combined.eff b/Compositor/Effects/model-combined.eff deleted file mode 100644 index 5562e23b5..000000000 --- a/Compositor/Effects/model-combined.eff +++ /dev/null @@ -1,2025 +0,0 @@ - - - - Effects/model-combined - Effects/model-default - - - - - 0 - 0 - 1.0 - - Aircraft/Generic/Effects/null_bumpspec.png - 2d - linear-mipmap-linear - clamp - clamp - normalized - - - 0 - 0 - 1.0 - 1.0 1.0 1.0 - 1.0 - 1.0 1.0 1.0 - 1.0 - 1.0 1.0 1.0 - 1.0 - 1.0 1.0 1.0 - 0 - 0.0 - - Aircraft/Generic/Effects/greymap.png - 2d - linear-mipmap-linear - clamp - clamp - normalized - - - 0 - 0.0 - 0 - 0.0 - 1 - 0 - - Aircraft/Generic/Effects/ReflectMaps/reflectmap.png - 2d - linear-mipmap-linear - clamp - clamp - 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 - - - - - 0.1 - - Aircraft/Generic/Effects/Gradients.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - 0.01 - 0.25 - - - 0 - 10 - - Textures/Terrain/void.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - - 0 - 0 - - 0 - 0 - 0.0 0.0 0.0 - 0.0 - 0.0 0.0 0.0 - 0.0 - 0.0 0.0 0.0 - 0.0 - 0 - 1.0 - - 0.05 - opaque - false - - 1 - RenderBin - - - smooth - - orientation/model/heading-deg - - - orientation/model/pitch-deg - - - orientation/model/roll-deg - - - position/model/longitude-deg - - - position/model/latitude-deg - - - - /environment/ground-visibility-m - - - /environment/visibility-m - - - /environment/ground-haze-thickness-m - - - /rendering/scene/scattering - - - /environment/terminator-relative-position-m - - - /sim/rendering/shaders/skydome - - - /environment/surface/wetness - - - /environment/rain-norm - - - /environment/snow-level-m - - - /environment/surface/snow-thickness-factor - - - /local-weather/cloud-shadows/cloudpos-x[0] - - - /local-weather/cloud-shadows/cloudpos-y[0] - - - /local-weather/cloud-shadows/cloudpos-x[1] - - - /local-weather/cloud-shadows/cloudpos-y[1] - - - /local-weather/cloud-shadows/cloudpos-x[2] - - - /local-weather/cloud-shadows/cloudpos-y[2] - - - /local-weather/cloud-shadows/cloudpos-x[3] - - - /local-weather/cloud-shadows/cloudpos-y[3] - - - /local-weather/cloud-shadows/cloudpos-x[4] - - - /local-weather/cloud-shadows/cloudpos-y[4] - - - /local-weather/cloud-shadows/cloudpos-x[5] - - - /local-weather/cloud-shadows/cloudpos-y[5] - - - /local-weather/cloud-shadows/cloudpos-x[6] - - - /local-weather/cloud-shadows/cloudpos-y[6] - - - /local-weather/cloud-shadows/cloudpos-x[7] - - - /local-weather/cloud-shadows/cloudpos-y[7] - - - /local-weather/cloud-shadows/cloudpos-x[8] - - - /local-weather/cloud-shadows/cloudpos-y[8] - - - /local-weather/cloud-shadows/cloudpos-x[9] - - - /local-weather/cloud-shadows/cloudpos-y[9] - - - /local-weather/cloud-shadows/cloudpos-x[10] - - - /local-weather/cloud-shadows/cloudpos-y[10] - - - /local-weather/cloud-shadows/cloudpos-x[11] - - - /local-weather/cloud-shadows/cloudpos-y[11] - - - /local-weather/cloud-shadows/cloudpos-x[12] - - - /local-weather/cloud-shadows/cloudpos-y[12] - - - /local-weather/cloud-shadows/cloudpos-x[13] - - - /local-weather/cloud-shadows/cloudpos-y[13] - - - /local-weather/cloud-shadows/cloudpos-x[14] - - - /local-weather/cloud-shadows/cloudpos-y[14] - - - /local-weather/cloud-shadows/cloudpos-x[15] - - - /local-weather/cloud-shadows/cloudpos-y[15] - - - /local-weather/cloud-shadows/cloudpos-x[16] - - - /local-weather/cloud-shadows/cloudpos-y[16] - - - /local-weather/cloud-shadows/cloudpos-x[17] - - - /local-weather/cloud-shadows/cloudpos-y[17] - - - /local-weather/cloud-shadows/cloudpos-x[18] - - - /local-weather/cloud-shadows/cloudpos-y[18] - - - /local-weather/cloud-shadows/cloudpos-x[19] - - - /local-weather/cloud-shadows/cloudpos-y[19] - - - /local-weather/cloud-shadows/cloud-shadow-flag - - - /sim/rendering/rembrandt/enabled - - 0 - - - - - - - - /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/Default/ubershader.vert - Shaders/Default/include_fog.frag - Shaders/Default/ubershader.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 - - - - - rembrandt_enabled - int - - rembrandt - - - - - - als-lighting - - - /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 - - - - - 7 - - texture[7]/image - - - texture[7]/type - - - texture[7]/filter - - - texture[7]/wrap-s - - - texture[7]/wrap-t - - - texture[7]/internal-format - - - - vertex-program-two-side - - - Shaders/ALS/model-ultra.vert - Shaders/ALS/shadows-include.vert - Shaders/ALS/model-ultra.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - Shaders/ALS/shadows-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 - - - GrainTex - sampler-2d - 7 - - - - - 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] - - - - darkmap_factor - float - - darkmap-factor - - - - - refl_enabled - int - - reflection-enabled - - - - - refl_correction - float - - reflection-correction - - - - - refl_fresnel_factor - float - - reflection-fresnel-factor - - - - - refl_map - int - - reflect-map-enabled - - - - - refl_type - int - - reflection-type - - - - - 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] - - - - dirt_modulates_reflection - int - - dirt-modulates-reflection - - - - dirt_reflection_factor - float - - dirt-reflection-factor - - - - - grain_texture_enabled - int - - grain-texture-enabled - - - - grain_magnification - float - - grain-magnification - - - - - rain_enabled - int - - rain-enabled - - - - snow_enabled - int - - snow-enabled - - - - snowlevel - float - - snow_level - - - - snow_thickness_factor - float - - snow_thickness_factor - - - - - amb_correction - float - - ambient-correction - - - - hdg - float - - model-hdg - - - - pitch - float - - model-pitch - - - - roll - float - - model-roll - - - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - ground_scattering - float - - ground_scattering - - - - terminator - float - - terminator - - - - terrain_alt - float - - terrain_alt - - - - overcast - float - - overcast - - - - eye_alt - float - - eye_alt - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - air_pollution - float - - air_pollution - - - - rain_norm - float - - rnorm - - - - wetness - float - - wetness - - - - 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_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - 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 - - - - darkmap_enabled - int - - darkmap-enabled - - - - building_flag - int - - building-flag - - - - - rembrandt_enabled - int - - rembrandt - - - - - shadow_tex - sampler-2d - 10 - - - shadows_enabled - bool - - shadows_enabled - - - - sun_atlas_size - int - - sun_atlas_size - - - - - - diff --git a/Compositor/Effects/model-default.eff b/Compositor/Effects/model-default.eff deleted file mode 100644 index 72e1c2abc..000000000 --- a/Compositor/Effects/model-default.eff +++ /dev/null @@ -1,830 +0,0 @@ - - - Effects/model-default - - - - white - - false - - 1 - - - 0 - - - /environment/ground-visibility-m - - - /environment/visibility-m - - - /environment/ground-haze-thickness-m - - - /rendering/scene/scattering - - - /environment/surface/scattering - - - /environment/terminator-relative-position-m - - - /environment/mean-terrain-elevation-m - - - /rendering/scene/overcast - - - /sim/rendering/eye-altitude-m - - - /environment/cloud-self-shading - - - /environment/moonlight - - - /sim/rendering/shaders/skydome - - - /environment/air-pollution-norm - - - /sim/rendering/als-filters/use-filtering - - - /sim/rendering/als-filters/gamma - - - /sim/rendering/als-filters/brightness - - - /environment/surface/delta-T-structure - - - /sim/rendering/als-filters/grey-factor - - - /sim/rendering/als-filters/black-factor - - - /sim/rendering/als-filters/use-night-vision - - - /sim/rendering/als-filters/use-IR-vision - - - /sim/startup/xsize - - - /sim/startup/ysize - - - /sim/current-view/pitch-offset-deg - - - /sim/current-view/heading-offset-deg - - - /sim/current-view/field-of-view - - - /sim/rendering/als-secondary-lights/use-searchlight - - - /sim/rendering/als-secondary-lights/use-landing-light - - - /sim/rendering/als-secondary-lights/use-alt-landing-light - - - /sim/rendering/als-secondary-lights/landing-light1-offset-deg - - - /sim/rendering/als-secondary-lights/landing-light2-offset-deg - - - /sim/rendering/als-secondary-lights/landing-light3-offset-deg - - 0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - /sim/rendering/shaders/landmass - - - /sim/rendering/shaders/transition - - - - - /sim/rendering/als/shadows/enabled - - - /sim/rendering/als/shadows/sun-atlas-size - - - - - - - /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 - - - - - vertex-program-two-side - - - - - Shaders/Default/default.vert - Shaders/Default/include_fog.frag - - Shaders/Default/default.frag - - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - fogType - int - - fogtype - - - - - texture - sampler-2d - 0 - - - colorMode - int - - material/color-mode-uniform - - - - - - - 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 - - - - - - - als-lighting - - - - - 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 - - - - - vertex-program-two-side - - - Shaders/ALS/generic-base.vert - Shaders/ALS/shadows-include.vert - Shaders/ALS/model-base.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - Shaders/ALS/shadows-include.frag - Shaders/ALS/clustered-include.frag - - PointLightBlock - 5 - - - SpotLightBlock - 6 - - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - ground_scattering - float - - ground_scattering - - - - terminator - float - - terminator - - - - terrain_alt - float - - terrain_alt - - - - overcast - float - - overcast - - - - eye_alt - float - - eye_alt - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - air_pollution - float - - air_pollution - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - 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 - - - - geo_light_r - float - - geo_light_r - - - - geo_light_g - float - - geo_light_g - - - - geo_light_b - float - - geo_light_b - - - - geo_light_x - float - - geo_light_x - - - - geo_light_y - float - - geo_light_y - - - - geo_light_z - float - - geo_light_z - - - - geo_light_radius - float - - geo_light_radius - - - - geo_ambience - float - - geo_ambience - - - - texture - sampler-2d - 0 - - - colorMode - int - - material/color-mode-uniform - - - - use_searchlight - int - - use_searchlight - - - - use_landing_light - int - - use_landing_light - - - - use_alt_landing_light - int - - use_alt_landing_light - - - - use_geo_light - int - - use_geo_light - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - quality_level - int - - quality_level - - - - tquality_level - int - - tquality_level - - - - - shadow_tex - sampler-2d - 10 - - - shadows_enabled - bool - - shadows_enabled - - - - sun_atlas_size - int - - sun_atlas_size - - - - - - diff --git a/Compositor/Effects/model-interior-display.eff b/Compositor/Effects/model-interior-display.eff deleted file mode 100644 index 17085e4c0..000000000 --- a/Compositor/Effects/model-interior-display.eff +++ /dev/null @@ -1,901 +0,0 @@ - - - Effects/model-interior-display - Effects/model-interior - - - 2d - linear-mipmap-linear - clamp - clamp - normalized - Aircraft/Generic/Effects/dust-effect-overlay.png - - 0.0007 - 3.0 - 1.0 - - - - - - als-lighting - - - - 2.0 - /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]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - 3 - - texture[3]/type - - - texture[3]/image - - - texture[3]/filter - - - texture[3]/wrap-s - - - texture[3]/wrap-t - - - - 4 - - texture[4]/type - - - texture[4]/images - - - - 5 - - texture[5]/type - - - texture[5]/image - - - texture[5]/filter - - - texture[5]/wrap-s - - - texture[5]/wrap-t - - - - 7 - - texture[7]/type - - - texture[7]/image - - - texture[7]/filter - - - texture[7]/wrap-s - - - texture[7]/wrap-t - - - - vertex-program-two-side - - - Shaders/ALS/model-interior-detailed.vert - Shaders/ALS/model-interior-display.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - ground_scattering - float - - ground_scattering - - - - terminator - float - - terminator - - - - terrain_alt - float - - terrain_alt - - - - overcast - float - - overcast - - - - eye_alt - float - - eye_alt - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - offset_vec - float-vec3 - - opacity-cube-center - - - - scale_vec - float-vec3 - - opacity-cube-scale - - - - angle - float - - opacity-cube-angle - - - - tag_color - float-vec3 - - implicit-lightmap-tag-color - - - - emit_color - float-vec3 - - implicit-lightmap-emit-color - - - - light_filter_one - float-vec3 - - light-filter-one - - - - light_filter_two - float-vec3 - - light-filter-two - - - - light_radius - float - - light-radius - - - - threshold_low - float - - implicit-lightmap-threshold-low - - - - threshold_high - float - - implicit-lightmap-threshold-high - - - - emit_intensity - float - - implicit-lightmap-intensity - - - - view_pitch_offset - float - - view_pitch_offset - - - - view_heading_offset - float - - view_heading_offset - - - - field_of_view - float - - view_fov - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - 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] - - - - grain_magnification - float - - grain-magnification - - - - irradiance_map_strength - float - - irradiance-map-strength - - - - ra_irradiance_map_strength - float - - ra-irradiance-map-strength - - - - residual_ambience_r - float - - residual-ambience-r - - - - residual_ambience_g - float - - residual-ambience-g - - - - residual_ambience_b - float - - residual-ambience-b - - - - sample_res - float - - sample-res - - - - dirt_factor - float - - dirt-factor - - - - contrast - float - - contrast - - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - texture - sampler-2d - 0 - - - lightmap_texture - sampler-2d - 3 - - - cube_texture - sampler-cube - 4 - - - dust_texture - sampler-2d - 5 - - - grain_texture - sampler-2d - 7 - - - colorMode - int - - material/color-mode-uniform - - - - quality_level - int - - quality_level - - - - tquality_level - int - - tquality_level - - - - implicit_lightmap_enabled - int - - implicit-lightmap-enabled - - - - use_flashlight - int - - use-flashlight - - - - lightmap_enabled - int - - lightmap-enabled - - - - lightmap_multi - int - - lightmap-multi - - - - irradiance_map_type - int - - irradiance-map-type - - - - ra_irradiance_map_type - int - - ra-irradiance-map-type - - - - grain_texture_enabled - int - - grain-texture-enabled - - - - - diff --git a/Compositor/Effects/model-interior.eff b/Compositor/Effects/model-interior.eff deleted file mode 100644 index 338b38498..000000000 --- a/Compositor/Effects/model-interior.eff +++ /dev/null @@ -1,1053 +0,0 @@ - - - Effects/model-interior - Effects/model-default - - - Aircraft/Generic/Effects/greymap.png - 2d - linear-mipmap-linear - clamp - clamp - normalized - - - cubemap - - Aircraft/Generic/Effects/CubeMaps/real.fair-sky/fair-sky_px.png - Aircraft/Generic/Effects/CubeMaps/real.fair-sky/fair-sky_nx.png - Aircraft/Generic/Effects/CubeMaps/real.fair-sky/fair-sky_py.png - Aircraft/Generic/Effects/CubeMaps/real.fair-sky/fair-sky_nx.png - Aircraft/Generic/Effects/CubeMaps/real.fair-sky/fair-sky_pz.png - Aircraft/Generic/Effects/CubeMaps/real.fair-sky/fair-sky_nz.png - - - - Textures/Terrain/void.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - 0.0 0.0 0.0 - 1.0 1.0 1.0 - 0.0 - 0 - 1.0 1.0 1.0 - 0.5 - 1.5 - 1.0 1.0 1.0 - 0.0 - 0.5 0.5 0.5 - 0.9 0.2 0.2 - 9.6 - - /sim/rendering/als-secondary-lights/use-flashlight - - 0 - 0 - 1.0 - 1.0 1.0 1.0 - 1.0 - 1.0 1.0 1.0 - 1.0 - 1.0 1.0 1.0 - 1.0 - 1.0 1.0 1.0 - 0 - 10.0 - 0 - 0.0 - 0.0 - 0.0 - 0.0 - 0 - 0.0 - - - als-lighting - - - - 2.0 - /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]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - 3 - - texture[3]/type - - - texture[3]/image - - - texture[3]/filter - - - texture[3]/wrap-s - - - texture[3]/wrap-t - - - - 4 - - texture[4]/type - - - texture[4]/images - - - - 7 - - texture[7]/type - - - texture[7]/image - - - texture[7]/filter - - - texture[7]/wrap-s - - - texture[7]/wrap-t - - - - vertex-program-two-side - - - Shaders/ALS/model-interior-detailed.vert - Shaders/ALS/model-interior-detailed.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - ground_scattering - float - - ground_scattering - - - - terminator - float - - terminator - - - - terrain_alt - float - - terrain_alt - - - - overcast - float - - overcast - - - - eye_alt - float - - eye_alt - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - offset_vec - float-vec3 - - opacity-cube-center - - - - scale_vec - float-vec3 - - opacity-cube-scale - - - - angle - float - - opacity-cube-angle - - - - tag_color - float-vec3 - - implicit-lightmap-tag-color - - - - emit_color - float-vec3 - - implicit-lightmap-emit-color - - - - light_filter_one - float-vec3 - - light-filter-one - - - - light_filter_two - float-vec3 - - light-filter-two - - - - light_radius - float - - light-radius - - - - threshold_low - float - - implicit-lightmap-threshold-low - - - - threshold_high - float - - implicit-lightmap-threshold-high - - - - emit_intensity - float - - implicit-lightmap-intensity - - - - view_pitch_offset - float - - view_pitch_offset - - - - view_heading_offset - float - - view_heading_offset - - - - field_of_view - float - - view_fov - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - 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] - - - - grain_magnification - float - - grain-magnification - - - - irradiance_map_strength - float - - irradiance-map-strength - - - - ra_irradiance_map_strength - float - - ra-irradiance-map-strength - - - - residual_ambience_r - float - - residual-ambience-r - - - - residual_ambience_g - float - - residual-ambience-g - - - - residual_ambience_b - float - - residual-ambience-b - - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - texture - sampler-2d - 0 - - - lightmap_texture - sampler-2d - 3 - - - cube_texture - sampler-cube - 4 - - - grain_texture - sampler-2d - 7 - - - colorMode - int - - material/color-mode-uniform - - - - quality_level - int - - quality_level - - - - tquality_level - int - - tquality_level - - - - implicit_lightmap_enabled - int - - implicit-lightmap-enabled - - - - use_flashlight - int - - use-flashlight - - - - lightmap_enabled - int - - lightmap-enabled - - - - lightmap_multi - int - - lightmap-multi - - - - irradiance_map_type - int - - irradiance-map-type - - - - ra_irradiance_map_type - int - - ra-irradiance-map-type - - - - grain_texture_enabled - int - - grain-texture-enabled - - - - - - als-lighting - - - - - 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 - - - - 4 - - texture[4]/type - - - texture[4]/images - - - - vertex-program-two-side - - - Shaders/ALS/shadows-include.vert - Shaders/ALS/generic-base.vert - Shaders/ALS/model-interior-base.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - ground_scattering - float - - ground_scattering - - - - terminator - float - - terminator - - - - terrain_alt - float - - terrain_alt - - - - overcast - float - - overcast - - - - eye_alt - float - - eye_alt - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - offset_vec - float-vec3 - - opacity-cube-center - - - - scale_vec - float-vec3 - - opacity-cube-scale - - - - angle - float - - opacity-cube-angle - - - - tag_color - float-vec3 - - implicit-lightmap-tag-color - - - - emit_color - float-vec3 - - implicit-lightmap-emit-color - - - - light_filter_one - float-vec3 - - light-filter-one - - - - light_filter_two - float-vec3 - - light-filter-two - - - - light_radius - float - - light-radius - - - - threshold_low - float - - implicit-lightmap-threshold-low - - - - threshold_high - float - - implicit-lightmap-threshold-high - - - - emit_intensity - float - - implicit-lightmap-intensity - - - - view_pitch_offset - float - - view_pitch_offset - - - - view_heading_offset - float - - view_heading_offset - - - - field_of_view - float - - view_fov - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - texture - sampler-2d - 0 - - - cube_texture - sampler-cube - 4 - - - colorMode - int - - material/color-mode-uniform - - - - quality_level - int - - quality_level - - - - tquality_level - int - - tquality_level - - - - implicit_lightmap_enabled - int - - implicit-lightmap-enabled - - - - use_flashlight - int - - use-flashlight - - - - - diff --git a/Compositor/Effects/model-transparent.eff b/Compositor/Effects/model-transparent.eff deleted file mode 100644 index 21784e500..000000000 --- a/Compositor/Effects/model-transparent.eff +++ /dev/null @@ -1,196 +0,0 @@ - - - Effects/model-transparent - - - - white - - false - - 1 - - - - - - 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 - - - - - - - als-lighting - - 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 - - - - vertex-program-two-side - - - Shaders/ALS/model-transparent.vert - Shaders/ALS/model-transparent.frag - - - texture - sampler-2d - 0 - - - colorMode - int - - material/color-mode-uniform - - - - - diff --git a/Compositor/Effects/model-wingflex-organic.eff b/Compositor/Effects/model-wingflex-organic.eff deleted file mode 100644 index f0e1344f5..000000000 --- a/Compositor/Effects/model-wingflex-organic.eff +++ /dev/null @@ -1,1962 +0,0 @@ - - - Effects/model-wingflex-organic - Effects/model-default - - - - - 0 - 0 - 1.0 - - Aircraft/Generic/Effects/null_bumpspec.png - 2d - linear-mipmap-linear - clamp - clamp - normalized - - - 0 - 0 - 1.0 - 1.0 1.0 1.0 - 1.0 - 1.0 1.0 1.0 - 1.0 - 1.0 1.0 1.0 - 1.0 - 1.0 1.0 1.0 - 0 - 0.0 - - Aircraft/Generic/Effects/greymap.png - 2d - linear-mipmap-linear - clamp - clamp - normalized - - - 0 - 0.0 - 0 - 0 - - Aircraft/Generic/Effects/ReflectMaps/reflectmap.png - 2d - linear-mipmap-linear - clamp - clamp - 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 - - - - - 0.1 - - Aircraft/Generic/Effects/Gradients.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - 0.01 - 0.25 - - - 0 - 10 - - Textures/Terrain/void.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - - 0 - - 0 - 0 - 0.0 0.0 0.0 - 0.0 - 0.0 0.0 0.0 - 0.0 - 0.0 0.0 0.0 - 0.0 - - 0.05 - opaque - false - - 1 - RenderBin - - - smooth - - orientation/model/heading-deg - - - orientation/model/pitch-deg - - - orientation/model/roll-deg - - - position/model/longitude-deg - - - position/model/latitude-deg - - - - /environment/ground-visibility-m - - - /environment/visibility-m - - - /environment/ground-haze-thickness-m - - - /rendering/scene/scattering - - - /environment/terminator-relative-position-m - - - /sim/rendering/shaders/skydome - - - /environment/surface/wetness - - - /environment/rain-norm - - 0.0 - 0.0 - 0.0 - - /local-weather/cloud-shadows/cloudpos-x[0] - - - /local-weather/cloud-shadows/cloudpos-y[0] - - - /local-weather/cloud-shadows/cloudpos-x[1] - - - /local-weather/cloud-shadows/cloudpos-y[1] - - - /local-weather/cloud-shadows/cloudpos-x[2] - - - /local-weather/cloud-shadows/cloudpos-y[2] - - - /local-weather/cloud-shadows/cloudpos-x[3] - - - /local-weather/cloud-shadows/cloudpos-y[3] - - - /local-weather/cloud-shadows/cloudpos-x[4] - - - /local-weather/cloud-shadows/cloudpos-y[4] - - - /local-weather/cloud-shadows/cloudpos-x[5] - - - /local-weather/cloud-shadows/cloudpos-y[5] - - - /local-weather/cloud-shadows/cloudpos-x[6] - - - /local-weather/cloud-shadows/cloudpos-y[6] - - - /local-weather/cloud-shadows/cloudpos-x[7] - - - /local-weather/cloud-shadows/cloudpos-y[7] - - - /local-weather/cloud-shadows/cloudpos-x[8] - - - /local-weather/cloud-shadows/cloudpos-y[8] - - - /local-weather/cloud-shadows/cloudpos-x[9] - - - /local-weather/cloud-shadows/cloudpos-y[9] - - - /local-weather/cloud-shadows/cloudpos-x[10] - - - /local-weather/cloud-shadows/cloudpos-y[10] - - - /local-weather/cloud-shadows/cloudpos-x[11] - - - /local-weather/cloud-shadows/cloudpos-y[11] - - - /local-weather/cloud-shadows/cloudpos-x[12] - - - /local-weather/cloud-shadows/cloudpos-y[12] - - - /local-weather/cloud-shadows/cloudpos-x[13] - - - /local-weather/cloud-shadows/cloudpos-y[13] - - - /local-weather/cloud-shadows/cloudpos-x[14] - - - /local-weather/cloud-shadows/cloudpos-y[14] - - - /local-weather/cloud-shadows/cloudpos-x[15] - - - /local-weather/cloud-shadows/cloudpos-y[15] - - - /local-weather/cloud-shadows/cloudpos-x[16] - - - /local-weather/cloud-shadows/cloudpos-y[16] - - - /local-weather/cloud-shadows/cloudpos-x[17] - - - /local-weather/cloud-shadows/cloudpos-y[17] - - - /local-weather/cloud-shadows/cloudpos-x[18] - - - /local-weather/cloud-shadows/cloudpos-y[18] - - - /local-weather/cloud-shadows/cloudpos-x[19] - - - /local-weather/cloud-shadows/cloudpos-y[19] - - - /local-weather/cloud-shadows/cloud-shadow-flag - - - /sim/rendering/rembrandt/enabled - - 0 - - - - - - - - /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/Default/ubershader.vert - Shaders/Default/include_fog.frag - Shaders/Default/ubershader.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 - - - - - rembrandt_enabled - int - - rembrandt - - - - - - als-lighting - - - /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 - - - - - 7 - - texture[7]/image - - - texture[7]/type - - - texture[7]/filter - - - texture[7]/wrap-s - - - texture[7]/wrap-t - - - texture[7]/internal-format - - - - vertex-program-two-side - - - Shaders/ALS/model-wingflex-organic.vert - Shaders/ALS/model-ultra.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.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 - - - GrainTex - sampler-2d - 7 - - - wingflex_alpha - float - - wingflex-alpha - - - - wingflex_trailing_alpha - float - - wingflex-trailing-alpha - - - - wingsweep_factor - float - - wingsweep-factor - - - - - - 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] - - - - darkmap_factor - float - - darkmap-factor - - - - - 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] - - - - - grain_texture_enabled - int - - grain-texture-enabled - - - - grain_magnification - float - - grain-magnification - - - - - rain_enabled - int - - rain-enabled - - - - - amb_correction - float - - ambient-correction - - - - hdg - float - - model-hdg - - - - pitch - float - - model-pitch - - - - roll - float - - model-roll - - - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - ground_scattering - float - - ground_scattering - - - - terminator - float - - terminator - - - - terrain_alt - float - - terrain_alt - - - - overcast - float - - overcast - - - - eye_alt - float - - eye_alt - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - air_pollution - float - - air_pollution - - - - rain_norm - float - - rnorm - - - - wetness - float - - wetness - - - - 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_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - 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 - - - - darkmap_enabled - int - - darkmap-enabled - - - - building_flag - int - - building-flag - - - - - rembrandt_enabled - int - - rembrandt - - - - - diff --git a/Compositor/Effects/planet-aurora.eff b/Compositor/Effects/planet-aurora.eff deleted file mode 100644 index 88b85f015..000000000 --- a/Compositor/Effects/planet-aurora.eff +++ /dev/null @@ -1,279 +0,0 @@ - - - Effects/aurora - - - white - - true - - 1 - - - - /environment/aurora/strength - - - /environment/aurora/ray-factor - - - /environment/aurora/upper-alt-factor - - - /environment/aurora/penetration-factor - - - /environment/aurora/patchiness - - - /environment/aurora/afterglow - - - /sim/rendering/als-filters/use-filtering - - - /sim/rendering/als-filters/gamma - - - /sim/rendering/als-filters/brightness - - - /environment/surface/delta-T-cloud - - - /sim/rendering/als-filters/grey-factor - - - /sim/rendering/als-filters/black-factor - - - /sim/rendering/als-filters/use-night-vision - - - /sim/rendering/als-filters/use-IR-vision - - - /sim/startup/xsize - - - /sim/startup/ysize - - 0.0 - - - als-lighting - - - - 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 - - - - src-alpha - one-minus-src-alpha - - - shade-model - - - - rendering-hint - - - false - - - 111 - DepthSortedBin - - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - vertex-program-two-side - - - Shaders/ALS/planet-aurora.vert - Shaders/ALS/planet-aurora.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - - - texture - sampler-2d - 0 - - - strength - float - - strength - - - - ray_factor - float - - ray_factor - - - - upper_alt_factor - float - - upper_alt_factor - - - - penetration_factor - float - - penetration_factor - - - - patchiness - float - - patchiness - - - - afterglow - float - - afterglow - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - arc_id - float - - arc_id - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - - diff --git a/Compositor/Effects/planet-cloudlayer.eff b/Compositor/Effects/planet-cloudlayer.eff deleted file mode 100644 index fc98be6db..000000000 --- a/Compositor/Effects/planet-cloudlayer.eff +++ /dev/null @@ -1,442 +0,0 @@ - - - Effects/planet-cloudlayer - - - white - - - Models/Astro/cloud_structure.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - false - - 1 - - - - /environment/visibility-m - - - /earthview/overlay-texture-flag - - - /earthview/cloud-normal-flag - - - /earthview/shade-effect - - - /earthview/cloudcover-bias - - - /sim/time/sun-angle-rad - - - /environment/moonlight - - - /environment/air-pollution-norm - - - /earthview/roi-x1 - - - /earthview/roi-y1 - - - /earthview/lightning - - - /sim/rendering/als-filters/use-filtering - - - /sim/rendering/als-filters/gamma - - - /sim/rendering/als-filters/brightness - - - /environment/surface/delta-T-cloud - - - /sim/rendering/als-filters/grey-factor - - - /sim/rendering/als-filters/black-factor - - - /sim/rendering/als-filters/use-night-vision - - - /sim/rendering/als-filters/use-IR-vision - - - /sim/startup/xsize - - - /sim/startup/ysize - - - - 15 - 6 - - - - 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]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - modulate - - - - - - - als-lighting - - - - 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 - - - - src-alpha - one-minus-src-alpha - - smooth - - cull-face - - transparent - - 110 - DepthSortedBin - - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - 1 - - texture[1]/image - - - texture[1]/type - - - texture[1]/filter - - - texture[1]/wrap-s - - - texture[1]/wrap-t - - - texture[1]/internal-format - - - - Shaders/ALS/planet.vert - Shaders/ALS/planet-cloudlayer.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - - tangent - 6 - - - normal - 15 - - - - texture - sampler-2d - 0 - - - structure_texture - sampler-2d - 1 - - - use_overlay - bool - - use-overlay-textures - - - - use_cloud_normals - bool - - use-cloud-normals - - - - colorMode - int - - material/color-mode-uniform - - - - visibility - float - - visibility - - - - shade_effect - float - - shade-effect - - - - cloudcover_bias - float - - cloudcover-bias - - - - air_pollution - float - - air_pollution - - - - sun_angle - float - - sun-angle - - - - moonlight - float - - moonlight - - - - lightning - float - - lightning - - - - roi_x1 - float - - roi_x1 - - - - roi_y1 - float - - roi_y1 - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - - diff --git a/Compositor/Effects/planet.eff b/Compositor/Effects/planet.eff deleted file mode 100644 index c983ce20b..000000000 --- a/Compositor/Effects/planet.eff +++ /dev/null @@ -1,760 +0,0 @@ - - - Effects/planet - - - white - - - Textures/Terrain/void.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Terrain/grain_texture.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Terrain/void.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - false - - 1 - - - - /environment/visibility-m - - - /environment/air-pollution-norm - - - /earthview/cloudsphere-flag - - - /earthview/cloud-shadow-flag - - - /earthview/overlay-texture-flag - - - /sim/time/sun-angle-rad - - - /environment/moonlight - - - /sim/rendering/als-filters/use-filtering - - - /sim/rendering/als-filters/gamma - - - /sim/rendering/als-filters/brightness - - - /environment/surface/delta-T-cloud - - - /sim/rendering/als-filters/grey-factor - - - /sim/rendering/als-filters/black-factor - - - /sim/rendering/als-filters/use-night-vision - - - /sim/rendering/als-filters/use-IR-vision - - - /sim/startup/xsize - - - /sim/startup/ysize - - - - 15 - 6 - - - - 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]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - modulate - - - - - - - als-lighting - - - - - 2.0 - - - - GL_ARB_shader_objects - GL_ARB_shading_language_100 - GL_ARB_vertex_shader - GL_ARB_fragment_shader - - - /earthview/normal-flag - - - - true - - - material/active - - - material/ambient - - - material/diffuse - - - material/specular - - - material/emissive - - - material/shininess - - - material/color-mode - - - - transparent - - - false - - - 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]/image - - - texture[1]/type - - - texture[1]/filter - - - texture[1]/wrap-s - - - texture[1]/wrap-t - - - texture[1]/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 - - - - Shaders/ALS/planet.vert - Shaders/ALS/planet-high.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - - tangent - 6 - - - normal - 15 - - - - texture - sampler-2d - 0 - - - shadowtex - sampler-2d - 1 - - - grain_texture - sampler-2d - 2 - - - normal_texture - sampler-2d - 3 - - - colorMode - int - - material/color-mode-uniform - - - - visibility - float - - visibility - - - - moonlight - float - - moonlight - - - - air_pollution - float - - air_pollution - - - - sun_angle - float - - sun-angle - - - - use_clouds - bool - - use-clouds - - - - use_overlay - bool - - use-overlay-textures - - - - use_cloud_shadows - bool - - use-cloud-shadows - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - - - als-lighting - - - - 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 - - - - transparent - - - false - - - 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]/image - - - texture[1]/type - - - texture[1]/filter - - - texture[1]/wrap-s - - - texture[1]/wrap-t - - - texture[1]/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 - - - - Shaders/ALS/planet.vert - Shaders/ALS/planet.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - - tangent - 6 - - - normal - 15 - - - - texture - sampler-2d - 0 - - - shadowtex - sampler-2d - 1 - - - grain_texture - sampler-2d - 2 - - - colorMode - int - - material/color-mode-uniform - - - - visibility - float - - visibility - - - - air_pollution - float - - air_pollution - - - - sun_angle - float - - sun-angle - - - - use_clouds - bool - - use-clouds - - - - use_overlay - bool - - use-overlay-textures - - - - use_cloud_shadows - bool - - use-cloud-shadows - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - - diff --git a/Compositor/Effects/procedural-light.eff b/Compositor/Effects/procedural-light.eff deleted file mode 100644 index 3f4cef61f..000000000 --- a/Compositor/Effects/procedural-light.eff +++ /dev/null @@ -1,300 +0,0 @@ - - - Effects/procedural-light - - - white - - 1.0 - 0.0 - 0.0 - 1.0 - 1.0 - 1.0 - 1.0 - -1.0 - 0.0 - 0.0 - false - false - 0.2 - 0.4 - 0.7 - 0.5 - - /environment/ground-visibility-m - - - /environment/visibility-m - - - /environment/ground-haze-thickness-m - - - /environment/mean-terrain-elevation-m - - - /sim/rendering/eye-altitude-m - - - /environment/terminator-relative-position-m - - - - als-lighting - - - - - 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 - - - 111 - DepthSortedBin - - - - 0 - - texture[0]/active - - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - texture[0]/internal-format - - - - false - - false - - Shaders/ALS/light.vert - Shaders/ALS/light.frag - Shaders/ALS/noise.frag - Shaders/ALS/hazes.frag - - - light_color_base_r - float - - light_color_base_r - - - - light_color_base_g - float - - light_color_base_g - - - - light_color_base_b - float - - light_color_base_b - - - - light_color_center_r - float - - light_color_center_r - - - - light_color_center_g - float - - light_color_center_g - - - - light_color_center_b - float - - light_color_center_b - - - - intensity_scale - float - - intensity_scale - - - - pointing_x - float - - pointing_x - - - - pointing_y - float - - pointing_y - - - - pointing_z - float - - pointing_z - - - - inner_angle - float - - inner_angle - - - - outer_angle - float - - outer_angle - - - - zero_angle - float - - zero_angle - - - - outer_gain - float - - outer_gain - - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - eye_alt - float - - eye_alt - - - - terminator - float - - terminator - - - - texture - sampler-2d - 0 - - - is_directional - bool - - is_directional - - - - is_strobe - bool - - is_strobe - - - - - diff --git a/Compositor/Effects/rain-layer.eff b/Compositor/Effects/rain-layer.eff deleted file mode 100644 index 1e00aeb16..000000000 --- a/Compositor/Effects/rain-layer.eff +++ /dev/null @@ -1,342 +0,0 @@ - - - Effects/rain-layer - - - - - /sim/rendering/clouds3d-vis-range - - - /rendering/scene/scattering - - - /environment/terminator-relative-position-m - - - /environment/lightning/flash - - - /environment/lightning/lightning-pos-x - - - /environment/lightning/lightning-pos-y - - - /environment/lightning/lightning-range - - 0 - - /sim/rendering/als-filters/use-filtering - - - /sim/rendering/als-filters/gamma - - - /sim/rendering/als-filters/brightness - - - /environment/surface/delta-T-cloud - - - /sim/rendering/als-filters/grey-factor - - - /sim/rendering/als-filters/black-factor - - - /sim/rendering/als-filters/use-night-vision - - - /sim/rendering/als-filters/use-IR-vision - - - /sim/startup/xsize - - - /sim/startup/ysize - - - - - - /sim/rendering/clouds3d-enable - - 1.0 - - - - - - - true - - 0.5 0.5 0.5 1.0 - 0.5 0.5 0.5 1.0 - off - - - greater - 0.01 - - smooth - - src-alpha - one-minus-src-alpha - - - false - - - 9 - DepthSortedBin - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - Shaders/Default/rain-layer.vert - Shaders/Default/rain-layer.frag - - - baseTexture - sampler-2d - 0 - - - range - float - - range - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - true - - - - als-lighting - - - /sim/rendering/clouds3d-enable - - 1.0 - - - - - - - true - - 0.5 0.5 0.5 1.0 - 0.5 0.5 0.5 1.0 - off - - - greater - 0.01 - - smooth - - src-alpha - one-minus-src-alpha - - - false - - - 9 - DepthSortedBin - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - Shaders/ALS/rain-layer.vert - Shaders/ALS/rain-layer.frag - Shaders/ALS/filters.frag - Shaders/ALS/noise.frag - - - baseTexture - sampler-2d - 0 - - - range - float - - range - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - flash - float - - flash - - - - lightning_pos_x - float - - lightning-pos-x - - - - lightning_pos_y - float - - lightning-pos-y - - - - lightning_range - float - - lightning-range - - - - is_lightning - bool - - is-lightning - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - - - diff --git a/Compositor/Effects/reflect.eff b/Compositor/Effects/reflect.eff deleted file mode 100644 index 591069e1e..000000000 --- a/Compositor/Effects/reflect.eff +++ /dev/null @@ -1,5 +0,0 @@ - - - Effects/reflect - Effects/model-default - diff --git a/Compositor/Effects/road-high.eff b/Compositor/Effects/road-high.eff deleted file mode 100644 index 4552c4ad3..000000000 --- a/Compositor/Effects/road-high.eff +++ /dev/null @@ -1,9 +0,0 @@ - - - Effects/road-high - Effects/road - - 1.2 - 3.0 - - diff --git a/Compositor/Effects/road-low.eff b/Compositor/Effects/road-low.eff deleted file mode 100644 index 4039bec1e..000000000 --- a/Compositor/Effects/road-low.eff +++ /dev/null @@ -1,9 +0,0 @@ - - - Effects/road-low - Effects/road - - 0.3 - 0.2 - - diff --git a/Compositor/Effects/road-mid.eff b/Compositor/Effects/road-mid.eff deleted file mode 100644 index 511078705..000000000 --- a/Compositor/Effects/road-mid.eff +++ /dev/null @@ -1,9 +0,0 @@ - - - Effects/road-mid - Effects/road - - 0.8 - 0.25 - - diff --git a/Compositor/Effects/road.eff b/Compositor/Effects/road.eff deleted file mode 100644 index f26061bf3..000000000 --- a/Compositor/Effects/road.eff +++ /dev/null @@ -1,1164 +0,0 @@ - - - - Effects/road - Effects/model-combined-deferred - - - Textures/Terrain/grain_texture.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Cars/cars.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Cars/cars-metadata.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - 0 - 50 - 1 - 0 - 0.941 0.682 0.086 - - /environment/snow-level-m - - - /environment/surface/snow-thickness-factor - - - /sim/rendering/osm/road-traffic-enabled - - - /sim/rendering/osm/road-traffic-density - - - /sim/rendering/osm/road-traffic-direction - - - /sim/rendering/osm/road-traffic-daily-variation - - - /environment/lightmap-factor - - - - 6 - 7 - - - als-lighting - - - /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 - - texture[9]/image - - - texture[9]/type - - - texture[9]/filter - - - texture[9]/wrap-s - - - texture[9]/wrap-t - - - texture[9]/internal-format - - - - - 2 - - texture[2]/image - - - texture[2]/type - - - texture[2]/filter - - - texture[2]/wrap-s - - - texture[2]/wrap-t - - - texture[2]/internal-format - - - - - 4 - - texture[4]/image - - - texture[4]/type - - - texture[4]/filter - - - texture[4]/wrap-s - - - texture[4]/wrap-t - - - texture[4]/internal-format - - - - - 3 - - texture[8]/image - - - texture[8]/type - - - texture[8]/filter - - - texture[8]/wrap-s - - - texture[8]/wrap-t - - - texture[8]/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 - - - - - 7 - - texture[7]/image - - - texture[7]/type - - - texture[7]/filter - - - texture[7]/wrap-s - - - texture[7]/wrap-t - - - texture[7]/internal-format - - - - vertex-program-two-side - - - Shaders/ALS/model-ultra.vert - Shaders/ALS/road-ultra.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - - tangent - 6 - - - binormal - 7 - - - - BaseTex - sampler-2d - 0 - - - CarMetaTex - sampler-2d - 1 - - - NormalTex - sampler-2d - 2 - - - CarTex - sampler-2d - 3 - - - ReflMapTex - sampler-2d - 4 - - - Environment - sampler-cube - 5 - - - ReflGradientsTex - sampler-2d - 6 - - - GrainTex - sampler-2d - 7 - - - - - nmap_enabled - int - - normalmap-enabled - - - - - nmap_dds - int - - normalmap-dds - - - - nmap_tile - float - - normalmap-tiling - - - - - refl_enabled - int - - reflection-enabled - - - - - refl_correction - float - - reflection-correction - - - - - refl_fresnel_factor - float - - reflection-fresnel-factor - - - - - refl_map - int - - reflect-map-enabled - - - - - refl_type - int - - reflection-type - - - - - 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] - - - - - road_traffic_enabled - int - - road-traffic-enabled - - - - road_traffic_density - float - - road-traffic-density - - - - road_traffic_variation - float - - road-traffic-variation - - - - road_traffic_direction - int - - road-traffic-direction - - - - - streetlight_color - float-vec3 - - lightmap-color - - - - streetlight_factor - float - - road-light-factor - - - - - grain_texture_enabled - int - - grain-texture-enabled - - - - grain_magnification - float - - grain-magnification - - - - - rain_enabled - int - - rain-enabled - - - - snowlevel - float - - snow_level - - - - snow_thickness_factor - float - - snow_thickness_factor - - - - - amb_correction - float - - ambient-correction - - - - hdg - float - - model-hdg - - - - pitch - float - - model-pitch - - - - roll - float - - model-roll - - - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - ground_scattering - float - - ground_scattering - - - - terminator - float - - terminator - - - - terrain_alt - float - - terrain_alt - - - - overcast - float - - overcast - - - - eye_alt - float - - eye_alt - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - air_pollution - float - - air_pollution - - - - rain_norm - float - - rnorm - - - - wetness - float - - wetness - - - - 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_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - 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 - - - - - diff --git a/Compositor/Effects/rock.eff b/Compositor/Effects/rock.eff deleted file mode 100644 index f21507865..000000000 --- a/Compositor/Effects/rock.eff +++ /dev/null @@ -1,791 +0,0 @@ - - - Effects/rock - Effects/terrain-default - - - 0.9 0.95 0.94 - 0.9 0.95 0.94 - 0.4 - 0.0 - 1.0 - 0.6 - 7.0 - 1.0 - 1.0 - 0 - - - - - - - als-lighting - - - - - 6.0 - /sim/rendering/shaders/landmass - - - 6.0 - /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 - - - material/emissive - - - material/shininess - - ambient-and-diffuse - - - transparent - - - transparent - - smooth - back - - - render-bin/bin-number - - - render-bin/bin-name - - - - Shaders/ALS/terrain-ultra.vert - Shaders/ALS/filters.vert - Shaders/ALS/rock.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/noise.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/filters.frag - - - intrinsic_wetness - float - - intrinsic_wetness - - - - slopeline_strength - float - - slopeline_strength - - - - rock_strata - int - - rock_strata - - - - transition_model - float - - transition_model - - - - overlay_bias - float - - overlay-bias - - - - crack_depth - float - - crack-depth - - - - crack_pattern_stretch - float - - crack-pattern-stretch - - - - grain_fade_power - float - - grain-fade-power - - - - rock_brightness - float - - rock-brightness - - - - dust_resistance - float - - dust_resistance - - - - 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 - - - - eye_lat - float - - eye_lat - - - - eye_lon - float - - eye_lon - - - - snowlevel - float - - snow_level - - - - snow_thickness_factor - float - - snow_thickness_factor - - - - dust_cover_factor - float - - dust_cover_factor - - - - lichen_cover_factor - float - - lichen_cover_factor - - - - wetness - float - - wetness - - - - fogstructure - float - - fogstructure - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - contrast - float - - contrast - - - - overlay_alpha - float - - overlay-alpha - - - - base_color - float-vec3 - - base-color - - - - overlay_color - float-vec3 - - overlay-color - - - - 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 - - - - 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 - - - - wind_effects - int - - wind_effects - - - - cloud_shadow_flag - int - - cloud_shadow_flag - - - - colorMode - int - 2 - - - - lequal - - - - - diff --git a/Compositor/Effects/runway-dds.eff b/Compositor/Effects/runway-dds.eff deleted file mode 100644 index 257e9e29d..000000000 --- a/Compositor/Effects/runway-dds.eff +++ /dev/null @@ -1,11 +0,0 @@ - - - Effects/runway-dds - Effects/runway - - - Textures/Runway/rwy-normalmap.dds - - 1.0 - - diff --git a/Compositor/Effects/runway.eff b/Compositor/Effects/runway.eff deleted file mode 100644 index 3d2eaa7be..000000000 --- a/Compositor/Effects/runway.eff +++ /dev/null @@ -1,1588 +0,0 @@ - - - Effects/runway - Effects/terrain-default - - - Textures/Runway/rwy-normalmap.png - linear-mipmap-linear - repeat - repeat - normalized - 2d - - - 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 - - - - 2d - Aircraft/Generic/Effects/Rainbow.png - linear-mipmap-linear - repeat - repeat - normalized - - - 2d - Aircraft/Generic/Effects/FresnelLookUp.png - linear-mipmap-linear - repeat - repeat - normalized - - - 2d - Textures/Runway/rwy-reflect.png - linear-mipmap-linear - repeat - repeat - normalized - - transparent - smooth - 0.01 - 0.01 - 0.15 - -0.15 - 0.0 - false - back - - /environment/rain-norm - - - - /environment/ground-visibility-m - - - /environment/visibility-m - - - /environment/ground-haze-thickness-m - - - /rendering/scene/scattering - - - /environment/surface/scattering - - - /environment/terminator-relative-position-m - - - /environment/mean-terrain-elevation-m - - - /rendering/scene/overcast - - - /sim/rendering/eye-altitude-m - - - /environment/snow-level-m - - - /environment/surface/dust-cover-factor - - - /environment/surface/lichen-cover-factor - - - /environment/surface/snow-thickness-factor - - - /environment/surface/wetness - - 1.0 - - /sim/rendering/als-secondary-lights/num-lightspots - - - /sim/rendering/als-secondary-lights/lightspot/eyerel-x-m - - - /sim/rendering/als-secondary-lights/lightspot/eyerel-y-m - - - /sim/rendering/als-secondary-lights/lightspot/eyerel-z-m - - - /sim/rendering/als-secondary-lights/lightspot/stretch - - - /sim/rendering/als-secondary-lights/lightspot/dir - - - /sim/rendering/als-secondary-lights/lightspot/size - - - /sim/rendering/als-secondary-lights/lightspot/lightspot-r - - - /sim/rendering/als-secondary-lights/lightspot/lightspot-g - - - /sim/rendering/als-secondary-lights/lightspot/lightspot-b - - - /sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[1] - - - /sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[1] - - - /sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[1] - - - /sim/rendering/als-secondary-lights/lightspot/stretch[1] - - - /sim/rendering/als-secondary-lights/lightspot/dir[1] - - - /sim/rendering/als-secondary-lights/lightspot/size[1] - - - /sim/rendering/als-secondary-lights/lightspot/lightspot-r[1] - - - /sim/rendering/als-secondary-lights/lightspot/lightspot-g[1] - - - /sim/rendering/als-secondary-lights/lightspot/lightspot-b[1] - - - /sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[2] - - - /sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[2] - - - /sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[2] - - - /sim/rendering/als-secondary-lights/lightspot/size[2] - - - /sim/rendering/als-secondary-lights/lightspot/lightspot-r[2] - - - /sim/rendering/als-secondary-lights/lightspot/lightspot-g[2] - - - /sim/rendering/als-secondary-lights/lightspot/lightspot-b[2] - - - /sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[3] - - - /sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[3] - - - /sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[3] - - - /sim/rendering/als-secondary-lights/lightspot/size[3] - - - /sim/rendering/als-secondary-lights/lightspot/lightspot-r[3] - - - /sim/rendering/als-secondary-lights/lightspot/lightspot-g[3] - - - /sim/rendering/als-secondary-lights/lightspot/lightspot-b[3] - - - /sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[4] - - - /sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[4] - - - /sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[4] - - - /sim/rendering/als-secondary-lights/lightspot/size[4] - - - /sim/rendering/als-secondary-lights/lightspot/lightspot-r[4] - - - /sim/rendering/als-secondary-lights/lightspot/lightspot-g[4] - - - /sim/rendering/als-secondary-lights/lightspot/lightspot-b[4] - - - /sim/rendering/shaders/skydome - - - /environment/fog-structure - - - /environment/cloud-self-shading - - - /environment/moonlight - - - /environment/surface/delta-T-rock - - - /sim/rendering/shaders/landmass - - - /sim/rendering/shaders/transition - - false - 0 - - - - 6 - 7 - - - - - /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/Default/reflect-bump-spec.vert - Shaders/Default/include_fog.frag - Shaders/Default/runway.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 - - - - - - als-lighting - - - - - 4.0 - /sim/rendering/shaders/landmass - - - 3.0 - /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 - - - material/emissive - - - material/shininess - - 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 - - - - 4 - - texture[4]/type - - - texture[4]/image - - - texture[4]/filter - - - texture[4]/wrap-s - - - texture[4]/wrap-t - - - texture[4]/internal-format - - - - Shaders/ALS/terrain-ultra.vert - Shaders/ALS/filters.vert - Shaders/ALS/shadows-include.vert - Shaders/ALS/runway.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/noise.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/filters.frag - Shaders/ALS/lightspot.frag - Shaders/ALS/shadows-include.frag - - - 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 - - - - snow_thickness_factor - float - - snow_thickness_factor - - - - dust_cover_factor - float - - dust_cover_factor - - - - lichen_cover_factor - float - - lichen_cover_factor - - - - wetness - float - - wetness - - - - rain_norm - float - - rnorm - - - - fogstructure - float - - fogstructure - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - uvstretch - float - - uvstretch - - - - 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 - - - - eyerel_x1 - float - - eyerel_x1 - - - - eyerel_y1 - float - - eyerel_y1 - - - - eyerel_z1 - float - - eyerel_z1 - - - - lightspot_project1 - float - - lightspot_project1 - - - - lightspot_dir1 - float - - lightspot_dir1 - - - - lightspot_size1 - float - - lightspot_size1 - - - - lightspot_r1 - float - - lightspot_r1 - - - - lightspot_g1 - float - - lightspot_g1 - - - - lightspot_b1 - float - - lightspot_b1 - - - - eyerel_x2 - float - - eyerel_x2 - - - - eyerel_y2 - float - - eyerel_y2 - - - - eyerel_z2 - float - - eyerel_z2 - - - - lightspot_project2 - float - - lightspot_project2 - - - - lightspot_dir2 - float - - lightspot_dir2 - - - - lightspot_size2 - float - - lightspot_size2 - - - - lightspot_r2 - float - - lightspot_r2 - - - - lightspot_g2 - float - - lightspot_g2 - - - - lightspot_b2 - float - - lightspot_b2 - - - - eyerel_x3 - float - - eyerel_x3 - - - - eyerel_y3 - float - - eyerel_y3 - - - - eyerel_z3 - float - - eyerel_z3 - - - - lightspot_size3 - float - - lightspot_size3 - - - - lightspot_r3 - float - - lightspot_r3 - - - - lightspot_g3 - float - - lightspot_g3 - - - - lightspot_b3 - float - - lightspot_b3 - - - - eyerel_x4 - float - - eyerel_x4 - - - - eyerel_y4 - float - - eyerel_y4 - - - - eyerel_z4 - float - - eyerel_z4 - - - - lightspot_size4 - float - - lightspot_size4 - - - - lightspot_r4 - float - - lightspot_r4 - - - - lightspot_g4 - float - - lightspot_g4 - - - - lightspot_b4 - float - - lightspot_b4 - - - - eyerel_x5 - float - - eyerel_x5 - - - - eyerel_y5 - float - - eyerel_y5 - - - - eyerel_z5 - float - - eyerel_z5 - - - - lightspot_size5 - float - - lightspot_size5 - - - - lightspot_r5 - float - - lightspot_r5 - - - - lightspot_g5 - float - - lightspot_g5 - - - - lightspot_b5 - float - - lightspot_b5 - - - - - 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 - - - - quality_level - int - - quality_level - - - - tquality_level - int - - tquality_level - - - - 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 - - - - num_lightspots - int - - num_lightspots - - - - overlay_flag - int - - overlay_flag - - - - raise_vertex - bool - - raise_vertex - - - - texture - sampler-2d - 0 - - - NormalTex - sampler-2d - 4 - - - colorMode - int - 2 - - - - - shadow_tex - sampler-2d - 10 - - - shadows_enabled - bool - - shadows_enabled - - - - sun_atlas_size - int - - sun_atlas_size - - - - - - greater - 0.4 - - - - diff --git a/Compositor/Effects/shadow-vol.eff b/Compositor/Effects/shadow-vol.eff deleted file mode 100644 index da4367a4e..000000000 --- a/Compositor/Effects/shadow-vol.eff +++ /dev/null @@ -1,4 +0,0 @@ - - - Effects/shadow-vol - diff --git a/Compositor/Effects/shadow.eff b/Compositor/Effects/shadow.eff deleted file mode 100644 index 791d6b477..000000000 --- a/Compositor/Effects/shadow.eff +++ /dev/null @@ -1,4 +0,0 @@ - - - Effects/shadow - diff --git a/Compositor/Effects/skydome.eff b/Compositor/Effects/skydome.eff deleted file mode 100644 index 4a2838489..000000000 --- a/Compositor/Effects/skydome.eff +++ /dev/null @@ -1,463 +0,0 @@ - - - Effects/skydome - - - /sim/rendering/mie - - - /sim/rendering/rayleigh - - - /sim/rendering/dome-density - - - /rendering/scene/overcast - - - /rendering/scene/saturation - - - /rendering/scene/scattering - - - /environment/ground-visibility-m - - - /environment/visibility-m - - - /environment/scattering-phenomena/ice-hexagonal-column-factor - - - /environment/scattering-phenomena/ice-hexagonal-sheet-factor - - - /environment/scattering-phenomena/parhelic-factor - - - /environment/scattering-phenomena/ring-factor - - - /environment/aurora/strength - - - /environment/aurora/vsize - - - /environment/aurora/hsize - - - /environment/aurora/ray-factor - - - /environment/aurora/penetration-factor - - - /environment/ground-haze-thickness-m - - - /environment/terminator-relative-position-m - - - /environment/mean-terrain-elevation-m - - - /environment/cloud-self-shading - - - /local-weather/config/small-scale-persistence - - - /sim/startup/xsize - - - /sim/startup/ysize - - - /sim/current-view/pitch-offset-deg - - - /sim/current-view/heading-offset-deg - - - /sim/current-view/field-of-view - - - /sim/rendering/als-secondary-lights/use-searchlight - - - /sim/rendering/als-secondary-lights/use-landing-light - - - /sim/rendering/als-secondary-lights/use-alt-landing-light - - - /sim/rendering/als-secondary-lights/landing-light1-offset-deg - - - /sim/rendering/als-secondary-lights/landing-light2-offset-deg - - - /sim/rendering/als-secondary-lights/landing-light3-offset-deg - - - /sim/rendering/als-filters/use-filtering - - - /sim/rendering/als-filters/gamma - - - /sim/rendering/als-filters/brightness - - - /sim/rendering/als-filters/use-night-vision - - - /sim/rendering/als-filters/use-IR-vision - - - /sim/rendering/als-filters/grey-factor - - - /sim/rendering/als-filters/black-factor - - -50.0 - - /environment/air-pollution-norm - - - - - - false - smooth - back - - - - als-lighting - - - - - 2.0 - - - - GL_ARB_shader_objects - GL_ARB_shading_language_100 - GL_ARB_vertex_shader - GL_ARB_fragment_shader - - - - - - true - smooth - back - - Shaders/ALS/skydome.vert - Shaders/ALS/skydome.frag - Shaders/ALS/noise.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/filters.frag - - - mK - float - - mie - - - - rK - float - - rayleigh - - - - density - float - - density - - - - overcast - float - - overcast - - - - saturation - float - - saturation - - - - scattering - float - - scattering - - - - visibility - float - - visibility - - - - hazeLayerAltitude - float - - lthickness - - - - terminator - float - - terminator - - - - avisibility - float - - avisibility - - - - terrain_alt - float - - terrain_alt - - - - cloud_self_shading - float - - cloud_self_shading - - - - air_pollution - float - - air_pollution - - - - ice_hex_col - float - - ice_hex_col - - - - parhelic - float - - parhelic - - - - ring - float - - ring - - - - ice_hex_sheet - float - - ice_hex_sheet - - - - aurora_strength - float - - aurora_strength - - - - aurora_vsize - float - - aurora_vsize - - - - aurora_hsize - float - - aurora_hsize - - - - aurora_ray_factor - float - - aurora_ray_factor - - - - aurora_penetration_factor - float - - aurora_penetration_factor - - - - horizon_roughness - float - - horizon_roughness - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - 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 - - - - 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 - - - - - diff --git a/Compositor/Effects/space-combined.eff b/Compositor/Effects/space-combined.eff deleted file mode 100644 index 39a7cde81..000000000 --- a/Compositor/Effects/space-combined.eff +++ /dev/null @@ -1,963 +0,0 @@ - - - - Effects/space-combined - Effects/model-combined - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0 - - - als-lighting - - - Shaders/ALS/space-ultra.vert - Shaders/ALS/space-ultra.frag - Shaders/ALS/color_temperature.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 - - - GrainTex - sampler-2d - 7 - - - - - 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] - - - - darkmap_factor - float - - darkmap-factor - - - - - refl_enabled - int - - reflection-enabled - - - - - refl_correction - float - - reflection-correction - - - - - refl_map - int - - reflect-map-enabled - - - - - refl_type - int - - reflection-type - - - - - 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] - - - - dirt_modulates_reflection - int - - dirt-modulates-reflection - - - - dirt_reflection_factor - float - - dirt-reflection-factor - - - - - grain_texture_enabled - int - - grain-texture-enabled - - - - grain_magnification - float - - grain-magnification - - - - - rain_enabled - int - - rain-enabled - - - - - amb_correction - float - - ambient-correction - - - - hdg - float - - model-hdg - - - - pitch - float - - model-pitch - - - - roll - float - - model-roll - - - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - ground_scattering - float - - ground_scattering - - - - terminator - float - - terminator - - - - terrain_alt - float - - terrain_alt - - - - overcast - float - - overcast - - - - eye_alt - float - - eye_alt - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - air_pollution - float - - air_pollution - - - - rain_norm - float - - rnorm - - - - wetness - float - - wetness - - - - 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_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - 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 - - - - darkmap_enabled - int - - darkmap-enabled - - - - geo_light_r - float - - geo_light_r - - - - geo_light_g - float - - geo_light_g - - - - geo_light_b - float - - geo_light_b - - - - geo_light_x - float - - geo_light_x - - - - geo_light_y - float - - geo_light_y - - - - geo_light_z - float - - geo_light_z - - - - geo_light_radius - float - - geo_light_radius - - - - geo_ambience - float - - geo_ambience - - - - use_geo_light - int - - use_geo_light - - - - - - als-lighting - - - Shaders/ALS/space-base.vert - Shaders/ALS/space-base.frag - - - - diff --git a/Compositor/Effects/space.eff b/Compositor/Effects/space.eff deleted file mode 100644 index 14130c699..000000000 --- a/Compositor/Effects/space.eff +++ /dev/null @@ -1,15 +0,0 @@ - - - - Effects/space - Effects/model-default - - als-lighting - - - Shaders/ALS/space-base.vert - Shaders/ALS/space-base.frag - - - - diff --git a/Compositor/Effects/surface-lights-directional.eff b/Compositor/Effects/surface-lights-directional.eff deleted file mode 100644 index e900b1e5f..000000000 --- a/Compositor/Effects/surface-lights-directional.eff +++ /dev/null @@ -1,365 +0,0 @@ - - - Effects/surface-lights-directional - - - - light-sprite - clamp - clamp - - - /environment/ground-visibility-m - - - /environment/visibility-m - - - /environment/ground-haze-thickness-m - - - /sim/rendering/eye-altitude-m - - - /environment/terminator-relative-position-m - - - /sim/rendering/als-filters/use-night-vision - - - /sim/rendering/als-filters/use-IR-vision - - - - - - - /sim/rendering/point-sprites - - - 2.0 - - - - GL_ARB_point_sprite - GL_ARB_point_parameters - - - - - - - 8 - DepthSortedBin - - false - - false - - - src-alpha - one-minus-src-alpha - - - gequal - 0.1 - - back - - point - - - - min-size - - - max-size - - - size - - - attenuation - - - - 0 - true - - texture[0]/type - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - - - - - /sim/rendering/point-sprites - - - 2.0 - - - GL_ARB_point_sprite - - - - - - 8 - DepthSortedBin - - false - - false - - - src-alpha - one-minus-src-alpha - - back - - point - - - 0 - true - - texture[0]/type - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - - - - - - - 2.0 - - - GL_ARB_point_parameters - - - - - - - min-size - - - max-size - - - size - - - attenuation - - - - 8 - DepthSortedBin - - - false - - - src-alpha - one-minus-src-alpha - - false - back - - point - - - - - - - - 8 - DepthSortedBin - - false - - false - - - src-alpha - one-minus-src-alpha - - back - - point - - - - - als-lighting - - - - /sim/rendering/point-sprites - - - 2.0 - - - - GL_ARB_point_sprite - GL_ARB_point_parameters - GL_ARB_shader_objects - GL_ARB_shading_language_100 - GL_ARB_vertex_shader - GL_ARB_fragment_shader - - - - - - - 8 - DepthSortedBin - - false - - src-alpha - one-minus-src-alpha - - - false - - - back - - point - - - - min-size - - - max-size - - - size - - - attenuation - - - - 0 - true - - texture[0]/type - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - Shaders/ALS/surface-light.vert - Shaders/ALS/surface-light.frag - Shaders/ALS/noise.frag - - - size - float - - size - - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - eye_alt - float - - eye_alt - - - - max_size - float - - max-size - - - - is_directional - bool - - false - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - texture - sampler-2d - 0 - - - terminator - float - - terminator - - - true - - - diff --git a/Compositor/Effects/surface-lights.eff b/Compositor/Effects/surface-lights.eff deleted file mode 100644 index 6266d1fe8..000000000 --- a/Compositor/Effects/surface-lights.eff +++ /dev/null @@ -1,376 +0,0 @@ - - - Effects/surface-lights - - - - light-sprite - clamp - clamp - - - /environment/ground-visibility-m - - - /environment/visibility-m - - - /environment/ground-haze-thickness-m - - - /sim/rendering/eye-altitude-m - - - /environment/terminator-relative-position-m - - - /sim/rendering/als-filters/use-night-vision - - - /sim/rendering/als-filters/use-IR-vision - - - - - - - /sim/rendering/point-sprites - - - 2.0 - - - - GL_ARB_point_sprite - GL_ARB_point_parameters - - - - - - - 8 - DepthSortedBin - - false - - false - - - src-alpha - one-minus-src-alpha - - - gequal - 0.1 - - back - - point - - - - min-size - - - max-size - - - size - - - attenuation - - - - 0 - true - - texture[0]/type - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - - - - - /sim/rendering/point-sprites - - - 2.0 - - - GL_ARB_point_sprite - - - - - - 8 - DepthSortedBin - - false - - false - - - src-alpha - one-minus-src-alpha - - - cull-face - - - point - - - 0 - true - - texture[0]/type - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - - - - - - - 2.0 - - - GL_ARB_point_parameters - - - - - - - min-size - - - max-size - - - size - - - attenuation - - - - 8 - DepthSortedBin - - - false - - - src-alpha - one-minus-src-alpha - - false - - cull-face - - - point - point - - - - - - - - 8 - DepthSortedBin - - false - - false - - - src-alpha - one-minus-src-alpha - - - cull-face - - - point - - - - - als-lighting - - - - /sim/rendering/point-sprites - - - 2.0 - - - - GL_ARB_point_sprite - GL_ARB_point_parameters - GL_ARB_shader_objects - GL_ARB_shading_language_100 - GL_ARB_vertex_shader - GL_ARB_fragment_shader - - - - - - - 8 - DepthSortedBin - - false - - src-alpha - one-minus-src-alpha - - - false - - - - cull-face - - - point - point - - - - min-size - - - max-size - - - size - - - attenuation - - - - 0 - true - - texture[0]/type - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - Shaders/ALS/surface-light.vert - Shaders/ALS/surface-light.frag - Shaders/ALS/noise.frag - - - size - float - - size - - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - eye_alt - float - - eye_alt - - - - max_size - float - - max-size - - - - is_directional - bool - - light-directional - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - texture - sampler-2d - 0 - - - terminator - float - - terminator - - - true - - - diff --git a/Compositor/Effects/terrain-default.eff b/Compositor/Effects/terrain-default.eff deleted file mode 100644 index 95b9db10b..000000000 --- a/Compositor/Effects/terrain-default.eff +++ /dev/null @@ -1,2312 +0,0 @@ - - - Effects/terrain-default - - - - - 0.2 .2 0.2 1.0 - - - .8 .8 .8 1.0 - - - 0.0 0.0 0.0 1.0 - - - 0.0 0.0 0.0 1.0 - - 1.2 - - - Textures/Terrain/unknown.png - 2d - linear-mipmap-linear - - repeat - repeat - - - normalized - - - Textures/Terrain/snow3.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Terrain/void.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Terrain/void.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Terrain/rock_alt.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Terrain/grain_texture.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Terrain/void.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - false - - 0 - RenderBin - - 0 - 0.5 - 0.0 - 0.5 - 0.0 - 1.0 - 1.0 - 1.0 - 0 - false - - /environment/ground-visibility-m - - - /environment/visibility-m - - - /environment/ground-haze-thickness-m - - - /rendering/scene/scattering - - - /environment/surface/scattering - - - /environment/terminator-relative-position-m - - - /environment/mean-terrain-elevation-m - - - /rendering/scene/overcast - - - /sim/rendering/eye-altitude-m - - - /environment/snow-level-m - - - /environment/surface/snow-thickness-factor - - - /environment/surface/dust-cover-factor - - - /environment/surface/lichen-cover-factor - - - /environment/surface/wetness - - - /sim/rendering/shaders/skydome - - - /environment/fog-structure - - - /environment/cloud-self-shading - - - /environment/moonlight - - - /environment/season - - - /environment/air-pollution-norm - - - /environment/surface/delta-T-soil - - - /sim/rendering/shaders/wind-effects - - - /environment/sea/surface/wind-from-east-fps - - - /environment/sea/surface/wind-from-north-fps - - - /sim/startup/xsize - - - /sim/startup/ysize - - - /sim/current-view/pitch-offset-deg - - - /sim/current-view/heading-offset-deg - - - /sim/current-view/field-of-view - - - /sim/rendering/als-secondary-lights/use-searchlight - - - /sim/rendering/als-secondary-lights/use-landing-light - - - /sim/rendering/als-secondary-lights/use-alt-landing-light - - - /sim/rendering/als-secondary-lights/landing-light1-offset-deg - - - /sim/rendering/als-secondary-lights/landing-light2-offset-deg - - - /sim/rendering/als-secondary-lights/landing-light3-offset-deg - - - /sim/rendering/shaders/landmass - - - /sim/rendering/shaders/transition - - - /sim/rendering/als-filters/use-filtering - - - /sim/rendering/als-filters/gamma - - - /sim/rendering/als-filters/brightness - - - /sim/rendering/als-filters/grey-factor - - - /sim/rendering/als-filters/black-factor - - - /sim/rendering/als-filters/use-night-vision - - - /sim/rendering/als-filters/use-IR-vision - - - /local-weather/cloud-shadows/cloudpos-x[0] - - - /local-weather/cloud-shadows/cloudpos-y[0] - - - /local-weather/cloud-shadows/cloudpos-x[1] - - - /local-weather/cloud-shadows/cloudpos-y[1] - - - /local-weather/cloud-shadows/cloudpos-x[2] - - - /local-weather/cloud-shadows/cloudpos-y[2] - - - /local-weather/cloud-shadows/cloudpos-x[3] - - - /local-weather/cloud-shadows/cloudpos-y[3] - - - /local-weather/cloud-shadows/cloudpos-x[4] - - - /local-weather/cloud-shadows/cloudpos-y[4] - - - /local-weather/cloud-shadows/cloudpos-x[5] - - - /local-weather/cloud-shadows/cloudpos-y[5] - - - /local-weather/cloud-shadows/cloudpos-x[6] - - - /local-weather/cloud-shadows/cloudpos-y[6] - - - /local-weather/cloud-shadows/cloudpos-x[7] - - - /local-weather/cloud-shadows/cloudpos-y[7] - - - /local-weather/cloud-shadows/cloudpos-x[8] - - - /local-weather/cloud-shadows/cloudpos-y[8] - - - /local-weather/cloud-shadows/cloudpos-x[9] - - - /local-weather/cloud-shadows/cloudpos-y[9] - - - /local-weather/cloud-shadows/cloudpos-x[10] - - - /local-weather/cloud-shadows/cloudpos-y[10] - - - /local-weather/cloud-shadows/cloudpos-x[11] - - - /local-weather/cloud-shadows/cloudpos-y[11] - - - /local-weather/cloud-shadows/cloudpos-x[12] - - - /local-weather/cloud-shadows/cloudpos-y[12] - - - /local-weather/cloud-shadows/cloudpos-x[13] - - - /local-weather/cloud-shadows/cloudpos-y[13] - - - /local-weather/cloud-shadows/cloudpos-x[14] - - - /local-weather/cloud-shadows/cloudpos-y[14] - - - /local-weather/cloud-shadows/cloudpos-x[15] - - - /local-weather/cloud-shadows/cloudpos-y[15] - - - /local-weather/cloud-shadows/cloudpos-x[16] - - - /local-weather/cloud-shadows/cloudpos-y[16] - - - /local-weather/cloud-shadows/cloudpos-x[17] - - - /local-weather/cloud-shadows/cloudpos-y[17] - - - /local-weather/cloud-shadows/cloudpos-x[18] - - - /local-weather/cloud-shadows/cloudpos-y[18] - - - /local-weather/cloud-shadows/cloudpos-x[19] - - - /local-weather/cloud-shadows/cloudpos-y[19] - - - /local-weather/cloud-shadows/nearest-cloudpos-x - - - /local-weather/cloud-shadows/nearest-cloudpos-y - - - /local-weather/cloud-shadows/cloud-shadow-flag - - - - /sim/rendering/als/shadows/enabled - - - /sim/rendering/als/shadows/sun-atlas-size - - - - - - - - /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/ambient - - - material/diffuse - - - material/specular - - - material/emissive - - - material/shininess - - 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 - - - - Shaders/Default/include_fog.vert - Shaders/Default/default.vert - Shaders/Default/default.frag - Shaders/Default/include_fog.frag - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - fogType - int - - fogtype - - - - texture - sampler-2d - 0 - - - colorMode - int - 2 - - - - lequal - - - - - - - true - - - material/ambient - - - material/diffuse - - - material/specular - - - material/emissive - - - material/shininess - - 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 - - - modulate - - - - - - als-lighting - - - - - 6.0 - /sim/rendering/shaders/landmass - - - 6.0 - /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 - - - material/emissive - - - material/shininess - - 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[13]/image - - - texture[13]/type - - - texture[13]/filter - - - texture[13]/wrap-s - - - texture[13]/wrap-t - - - texture[13]/internal-format - - - - 3 - - texture[15]/type - - - texture[15]/image - - - texture[15]/filter - - - texture[15]/wrap-s - - - texture[15]/wrap-t - - - texture[15]/internal-format - - - - 4 - - texture[14]/type - - - texture[14]/image - - - texture[14]/filter - - - texture[14]/wrap-s - - - texture[14]/wrap-t - - - texture[14]/internal-format - - - - 5 - - texture[12]/type - - - texture[12]/image - - - texture[12]/filter - - - texture[12]/wrap-s - - - texture[12]/wrap-t - - - texture[12]/internal-format - - - - 7 - - texture[11]/type - - - texture[11]/image - - - texture[11]/filter - - - texture[11]/wrap-s - - - texture[11]/wrap-t - - - texture[11]/internal-format - - - - Shaders/ALS/terrain-ultra.vert - Shaders/ALS/filters.vert - Shaders/ALS/shadows-include.vert - Shaders/ALS/terrain-ultra.frag - Shaders/ALS/noise.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/filters.frag - Shaders/ALS/shadows-include.frag - - - grain_strength - float - - grain_strength - - - - intrinsic_wetness - float - - intrinsic_wetness - - - - transition_model - float - - transition_model - - - - hires_overlay_bias - float - - hires_overlay_bias - - - - dot_density - float - - dot_density - - - - dot_size - float - - dot_size - - - - dust_resistance - float - - dust_resistance - - - - 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 - - - - eye_lat - float - - eye_lat - - - - eye_lon - float - - eye_lon - - - - snowlevel - float - - snow_level - - - - snow_thickness_factor - float - - snow_thickness_factor - - - - dust_cover_factor - float - - dust_cover_factor - - - - lichen_cover_factor - float - - lichen_cover_factor - - - - wetness - float - - wetness - - - - fogstructure - float - - fogstructure - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - season - float - - season - - - - 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 - - - - WindE - float - - windE - - - - WindN - float - - windN - - - - 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 - - - - wind_effects - int - - wind_effects - - - - cloud_shadow_flag - int - - cloud_shadow_flag - - - - rock_strata - int - - rock_strata - - - - raise_vertex - bool - - raise_vertex - - - - texture - sampler-2d - 0 - - - mix_texture - sampler-2d - 5 - - - detail_texture - sampler-2d - 7 - - - grain_texture - sampler-2d - 4 - - - dot_texture - sampler-2d - 3 - - - gradient_texture - sampler-2d - 2 - - - colorMode - int - 2 - - - - - shadow_tex - sampler-2d - 10 - - - shadows_enabled - bool - - shadows_enabled - - - - sun_atlas_size - int - - sun_atlas_size - - - - - lequal - - - - - - als-lighting - - - - - 4.0 - /sim/rendering/shaders/landmass - - - 3.0 - /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 - - - material/emissive - - - material/shininess - - 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 - - - - 5 - - texture[12]/type - - - texture[12]/image - - - texture[12]/filter - - - texture[12]/wrap-s - - - texture[12]/wrap-t - - - texture[12]/internal-format - - - - 7 - - texture[11]/type - - - texture[11]/image - - - texture[11]/filter - - - texture[11]/wrap-s - - - texture[11]/wrap-t - - - texture[11]/internal-format - - - - Shaders/ALS/terrain-detailed.vert - Shaders/ALS/filters.vert - Shaders/ALS/shadows-include.vert - Shaders/ALS/terrain-detailed.frag - Shaders/ALS/noise.frag - Shaders/ALS/hazes.frag - Shaders/ALS/filters.frag - Shaders/ALS/shadows-include.frag - - - 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 - - - - transition_model - float - - transition_model - - - - hires_overlay_bias - float - - hires_overlay_bias - - - - snowlevel - float - - snow_level - - - - snow_thickness_factor - float - - snow_thickness_factor - - - - dust_cover_factor - float - - dust_cover_factor - - - - lichen_cover_factor - float - - lichen_cover_factor - - - - wetness - float - - wetness - - - - fogstructure - float - - fogstructure - - - - cloud_self_shading - float - - cloud_self_shading - - - - air_pollution - float - - air_pollution - - - - moonlight - float - - moonlight - - - - season - float - - season - - - - - 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 - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - quality_level - int - - quality_level - - - - tquality_level - int - - tquality_level - - - - texture - sampler-2d - 0 - - - mix_texture - sampler-2d - 5 - - - detail_texture - sampler-2d - 7 - - - colorMode - int - 2 - - - - - shadow_tex - sampler-2d - 10 - - - shadows_enabled - bool - - shadows_enabled - - - - sun_atlas_size - int - - sun_atlas_size - - - - - lequal - false --> - - - - - als-lighting - - - - - 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 - - - material/emissive - - - material/shininess - - ambient-and-diffuse - - - transparent - - - transparent - - smooth - back - - - render-bin/bin-number - - - render-bin/bin-name - - - - 0 - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - texture[0]/internal-format - - - - Shaders/ALS/generic-base.vert - Shaders/ALS/shadows-include.vert - Shaders/ALS/terrain-base.frag - Shaders/ALS/hazes.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - Shaders/ALS/shadows-include.frag - - - 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 - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - air_pollution - float - - air_pollution - - - - - 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 - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - texture - sampler-2d - 0 - - - colorMode - int - 2 - - - - - shadow_tex - sampler-2d - 10 - - - shadows_enabled - bool - - shadows_enabled - - - - sun_atlas_size - int - - sun_atlas_size - - - - - lequal - - - - - diff --git a/Compositor/Effects/terrain-overlay.eff b/Compositor/Effects/terrain-overlay.eff deleted file mode 100644 index 9a54806f9..000000000 --- a/Compositor/Effects/terrain-overlay.eff +++ /dev/null @@ -1,1287 +0,0 @@ - - - Effects/terrain-overlay - Effects/terrain-default - - - Textures/Terrain/void.png - 2d - nearest-mipmap-nearest - nearest - repeat - repeat - normalized - - - Textures/Terrain/void.png - 2d - nearest-mipmap-nearest - nearest - repeat - repeat - normalized - - 1.5 - 1.0 - 1.0 - 0.5 - 0.5 - 0.5 - 0.5 - 0.8 - 0.0 - 0 - 0 - - - als-lighting - - - - - 6.0 - /sim/rendering/shaders/landmass - - - 6.0 - /sim/rendering/shaders/transition - - - 1.0 - /sim/rendering/shaders/vegetation-effects - - - - - 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 - - - material/emissive - - - material/shininess - - 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[13]/image - - - texture[13]/type - - - texture[13]/filter - - - texture[13]/wrap-s - - - texture[13]/wrap-t - - - texture[13]/internal-format - - - - 3 - - texture[15]/type - - - texture[15]/image - - - texture[15]/filter - - - texture[15]/wrap-s - - - texture[15]/wrap-t - - - texture[15]/internal-format - - - - 4 - - texture[14]/type - - - texture[14]/image - - - texture[14]/filter - - - texture[14]/wrap-s - - - texture[14]/wrap-t - - - texture[14]/internal-format - - - - 5 - - texture[12]/type - - - texture[12]/image - - - texture[12]/filter - - - texture[12]/wrap-s - - - texture[12]/wrap-t - - - texture[12]/internal-format - - - - 7 - - texture[11]/type - - - texture[11]/image - - - texture[11]/filter - - - texture[11]/wrap-s - - - texture[11]/wrap-t - - - texture[11]/internal-format - - - - Shaders/ALS/terrain-ultra.vert - Shaders/ALS/filters.vert - Shaders/ALS/shadows-include.vert - Shaders/ALS/terrain-ultra.frag - Shaders/ALS/noise.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/filters.frag - Shaders/ALS/shadows-include.frag - - - grain_strength - float - - grain_strength - - - - intrinsic_wetness - float - - intrinsic_wetness - - - - transition_model - float - - transition_model - - - - hires_overlay_bias - float - - hires_overlay_bias - - - - dot_density - float - - dot_density - - - - dot_size - float - - dot_size - - - - dust_resistance - float - - dust_resistance - - - - 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 - - - - eye_lat - float - - eye_lat - - - - eye_lon - float - - eye_lon - - - - snowlevel - float - - snow_level - - - - snow_thickness_factor - float - - snow_thickness_factor - - - - dust_cover_factor - float - - dust_cover_factor - - - - lichen_cover_factor - float - - lichen_cover_factor - - - - wetness - float - - wetness - - - - fogstructure - float - - fogstructure - - - - cloud_self_shading - float - - cloud_self_shading - - - - moonlight - float - - moonlight - - - - season - float - - season - - - - 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 - - - - WindE - float - - windE - - - - WindN - float - - windN - - - - 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 - - - - wind_effects - int - - wind_effects - - - - cloud_shadow_flag - int - - cloud_shadow_flag - - - - rock_strata - int - - rock_strata - - - - raise_vertex - bool - - raise_vertex - - - - texture - sampler-2d - 0 - - - mix_texture - sampler-2d - 5 - - - detail_texture - sampler-2d - 7 - - - grain_texture - sampler-2d - 4 - - - dot_texture - sampler-2d - 3 - - - gradient_texture - sampler-2d - 2 - - - colorMode - int - 2 - - - - lequal - - - - true - - - material/ambient - - - material/diffuse - - - material/specular - - - material/emissive - - - material/shininess - - ambient-and-diffuse - - - transparent - - smooth - - back - - - - render-bin/bin-number - - - render-bin/bin-name - - - - 7 - - texture[20]/type - - - texture[20]/image - - - texture[20]/filter - - - texture[20]/mag-filter - - - texture[20]/wrap-s - - - texture[20]/wrap-t - - - texture[20]/internal-format - - - - 8 - - texture[21]/type - - - texture[21]/image - - - texture[21]/filter - - - texture[21]/mag-filter - - - texture[21]/wrap-s - - - texture[21]/wrap-t - - - texture[21]/internal-format - - - - Shaders/ALS/grass.vert - Shaders/ALS/terrain-overlay.geom - Shaders/ALS/terrain-overlay.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - Shaders/ALS/cloud-shadowfunc.frag - 96 - triangles - triangle-strip - - - overlayPrimaryTex - sampler-2d - 7 - - - overlaySecondaryTex - sampler-2d - 8 - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - scattering - float - - scattering - - - - overlay_bias - float - - overlay_bias - - - - overlay_max_height - float - - max_overlay_height - - - - overlay_hardness - float - - overlay_hardness - - - - overlay_secondary_hardness - float - - overlay_secondary_hardness - - - - overlay_density - float - - overlay_density - - - - overlay_secondary_density - float - - overlay_secondary_density - - - - overlay_scale - float - - overlay_scale - - - - overlay_brightness_top - float - - overlay_brightness_top - - - - overlay_brightness_bottom - float - - overlay_brightness_bottom - - - - overlay_steepness_factor - float - - overlay_steepness_factor - - - - season - float - - season - - - - dust_cover_factor - float - - dust_cover_factor - - - - wetness - float - - wetness - - - - snowlevel - float - - snow_level - - - - snow_thickness_factor - float - - snow_thickness_factor - - - - - cloudpos_n_x - float - - cloudpos_n_x - - - - cloudpos_n_y - float - - cloudpos_n_y - - - - - 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 - - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - overlay_autumn_flag - int - - overlay_autumn_flag - - - - overlay_secondary_flag - int - - overlay_secondary_flag - - - - cloud_shadow_flag - int - - cloud_shadow_flag - - - - true - src-alpha - one-minus-src-alpha - - - false - - - - diff --git a/Compositor/Effects/thrust-flame.eff b/Compositor/Effects/thrust-flame.eff deleted file mode 100644 index b51a23470..000000000 --- a/Compositor/Effects/thrust-flame.eff +++ /dev/null @@ -1,300 +0,0 @@ - - - Effects/thrust-flame - - - white - - 0.2 - 0.1 - 0.5 - 1.0 - 0.5 - 0.2 - 0.1 - 0.95 - 0.55 - 0.0 - 1.0 - 0.8 - 0.3 - 1.0 - 0.8 - 0.3 - 0.0 - 0.0 - 1 - 1 - - /environment/ground-visibility-m - - - /environment/visibility-m - - - /environment/ground-haze-thickness-m - - - /environment/mean-terrain-elevation-m - - - /sim/rendering/eye-altitude-m - - - - als-lighting - - - - - 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 - - - 111 - DepthSortedBin - - - - 0 - - texture[0]/active - - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - texture[0]/internal-format - - - - false - - false - - Shaders/ALS/thrustflame.vert - Shaders/ALS/thrustflame.frag - Shaders/ALS/noise.frag - - - flame_radius_fraction - float - - flame_radius_fraction - - - - thrust_collimation - float - - thrust_collimation - - - - thrust_density - float - - thrust_density - - - - base_flame_density - float - - base_flame_density - - - - shock_frequency - float - - shock_frequency - - - - noise_strength - float - - noise_strength - - - - noise_scale - float - - noise_scale - - - - random_seed - float - - random_seed - - - - flame_color_low_r - float - - flame_color_low_r - - - - flame_color_low_g - float - - flame_color_low_g - - - - flame_color_low_b - float - - flame_color_low_b - - - - flame_color_high_r - float - - flame_color_high_r - - - - flame_color_high_g - float - - flame_color_high_g - - - - flame_color_high_b - float - - flame_color_high_b - - - - base_flame_r - float - - base_flame_r - - - - base_flame_g - float - - base_flame_g - - - - base_flame_b - float - - base_flame_b - - - - deflection_coeff - float - - deflection_coeff - - - - use_shocks - int - - use_shocks - - - - use_noise - int - - use_noise - - - - texture - sampler-2d - 0 - - - colorMode - int - - material/color-mode-uniform - - - - - diff --git a/Compositor/Effects/transition-base-dirt.eff b/Compositor/Effects/transition-base-dirt.eff deleted file mode 100644 index 419250c9b..000000000 --- a/Compositor/Effects/transition-base-dirt.eff +++ /dev/null @@ -1,17 +0,0 @@ - - - Effects/transition-base-dirt - Effects/transition - - - Textures/Terrain/dirt3.dds - 2d - linear-mipmap-linear - repeat - repeat - normalized - - 1.0 - 0.0 - - diff --git a/Compositor/Effects/transition-base-grass-inverse.eff b/Compositor/Effects/transition-base-grass-inverse.eff deleted file mode 100644 index 4d8e1b05f..000000000 --- a/Compositor/Effects/transition-base-grass-inverse.eff +++ /dev/null @@ -1,17 +0,0 @@ - - - Effects/transition-base-rock - Effects/transition - - - Textures/Terrain/herbtundra.dds - 2d - linear-mipmap-linear - repeat - repeat - normalized - - 1.0 - 1.0 - - diff --git a/Compositor/Effects/transition-base-grass-rock.eff b/Compositor/Effects/transition-base-grass-rock.eff deleted file mode 100644 index dde692705..000000000 --- a/Compositor/Effects/transition-base-grass-rock.eff +++ /dev/null @@ -1,33 +0,0 @@ - - - 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 - - diff --git a/Compositor/Effects/transition-base-rock.eff b/Compositor/Effects/transition-base-rock.eff deleted file mode 100644 index 34651b2eb..000000000 --- a/Compositor/Effects/transition-base-rock.eff +++ /dev/null @@ -1,17 +0,0 @@ - - - Effects/transition-base-rock - Effects/transition - - - Textures/Terrain/rock7.dds - 2d - linear-mipmap-linear - repeat - repeat - normalized - - 1.0 - 0.0 - - diff --git a/Compositor/Effects/transition.eff b/Compositor/Effects/transition.eff deleted file mode 100644 index d1619bd72..000000000 --- a/Compositor/Effects/transition.eff +++ /dev/null @@ -1,373 +0,0 @@ - - - - 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 - - 0.0 - /sim/rendering/rembrandt/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 - - 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/Default/transition.vert - Shaders/Default/include_fog.frag - Shaders/Default/transition.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 - - - - - - diff --git a/Compositor/Effects/tree-european-deciduous.eff b/Compositor/Effects/tree-european-deciduous.eff deleted file mode 100644 index 1163749d8..000000000 --- a/Compositor/Effects/tree-european-deciduous.eff +++ /dev/null @@ -1,8 +0,0 @@ - - - Effects/tree-european-deciduous - Effects/tree - - 8 - - diff --git a/Compositor/Effects/tree-european-mixed.eff b/Compositor/Effects/tree-european-mixed.eff deleted file mode 100644 index 5204bef21..000000000 --- a/Compositor/Effects/tree-european-mixed.eff +++ /dev/null @@ -1,8 +0,0 @@ - - - Effects/tree-european-mixed - Effects/tree - - 4 - - diff --git a/Compositor/Effects/tree-forest.eff b/Compositor/Effects/tree-forest.eff deleted file mode 100644 index 92645ea2b..000000000 --- a/Compositor/Effects/tree-forest.eff +++ /dev/null @@ -1,10 +0,0 @@ - - - Effects/tree-forest - Effects/tree - - true - true - true - - diff --git a/Compositor/Effects/tree-grass.eff b/Compositor/Effects/tree-grass.eff deleted file mode 100644 index 761b32167..000000000 --- a/Compositor/Effects/tree-grass.eff +++ /dev/null @@ -1,9 +0,0 @@ - - - Effects/tree-grass - Effects/tree - - false - false - - diff --git a/Compositor/Effects/tree.eff b/Compositor/Effects/tree.eff deleted file mode 100644 index 8b8451ebe..000000000 --- a/Compositor/Effects/tree.eff +++ /dev/null @@ -1,2558 +0,0 @@ - - - - - Effects/tree - - - - - 0 - 200.0 - 1.5 - true - true - - /environment/ground-visibility-m - - - /environment/visibility-m - - - /environment/ground-haze-thickness-m - - - /rendering/scene/scattering - - - /environment/surface/scattering - - - /environment/terminator-relative-position-m - - - /sim/rendering/shaders/skydome - - - /environment/mean-terrain-elevation-m - - - /rendering/scene/overcast - - - /sim/rendering/eye-altitude-m - - - /environment/snow-level-m - - - /environment/tree-season - - - /environment/season - - - /environment/surface/dust-cover-factor - - - /sim/rendering/shaders/skydome - - - /environment/fog-structure - - - /environment/air-pollution-norm - - - /environment/cloud-self-shading - - - /sim/rendering/shaders/landmass - - - /sim/rendering/shaders/transition - - - /sim/rendering/shaders/wind-effects - - - /sim/rendering/shaders/forest - - - /environment/sea/surface/wind-from-east-fps - - - /environment/sea/surface/wind-from-north-fps - - - /sim/startup/xsize - - - /sim/startup/ysize - - - /sim/current-view/pitch-offset-deg - - - /sim/current-view/heading-offset-deg - - - /sim/current-view/field-of-view - - - /sim/rendering/als-secondary-lights/use-searchlight - - - /sim/rendering/als-secondary-lights/use-landing-light - - - /sim/rendering/als-secondary-lights/use-alt-landing-light - - - /sim/rendering/als-secondary-lights/landing-light1-offset-deg - - - /sim/rendering/als-secondary-lights/landing-light2-offset-deg - - - /sim/rendering/als-secondary-lights/landing-light3-offset-deg - - - /sim/rendering/als-filters/use-filtering - - - /sim/rendering/als-filters/gamma - - - /sim/rendering/als-filters/brightness - - - /sim/rendering/als-filters/grey-factor - - - /sim/rendering/als-filters/black-factor - - - /sim/rendering/als-filters/use-night-vision - - - /sim/rendering/als-filters/use-IR-vision - - - /environment/surface/delta-T-vegetation - - - /sim/rendering/random-vegetation-optimize - - false - - /local-weather/cloud-shadows/cloudpos-x[0] - - - /local-weather/cloud-shadows/cloudpos-y[0] - - - /local-weather/cloud-shadows/cloudpos-x[1] - - - /local-weather/cloud-shadows/cloudpos-y[1] - - - /local-weather/cloud-shadows/cloudpos-x[2] - - - /local-weather/cloud-shadows/cloudpos-y[2] - - - /local-weather/cloud-shadows/cloudpos-x[3] - - - /local-weather/cloud-shadows/cloudpos-y[3] - - - /local-weather/cloud-shadows/cloudpos-x[4] - - - /local-weather/cloud-shadows/cloudpos-y[4] - - - /local-weather/cloud-shadows/cloudpos-x[5] - - - /local-weather/cloud-shadows/cloudpos-y[5] - - - /local-weather/cloud-shadows/cloudpos-x[6] - - - /local-weather/cloud-shadows/cloudpos-y[6] - - - /local-weather/cloud-shadows/cloudpos-x[7] - - - /local-weather/cloud-shadows/cloudpos-y[7] - - - /local-weather/cloud-shadows/cloudpos-x[8] - - - /local-weather/cloud-shadows/cloudpos-y[8] - - - /local-weather/cloud-shadows/cloudpos-x[9] - - - /local-weather/cloud-shadows/cloudpos-y[9] - - - /local-weather/cloud-shadows/cloudpos-x[10] - - - /local-weather/cloud-shadows/cloudpos-y[10] - - - /local-weather/cloud-shadows/cloudpos-x[11] - - - /local-weather/cloud-shadows/cloudpos-y[11] - - - /local-weather/cloud-shadows/cloudpos-x[12] - - - /local-weather/cloud-shadows/cloudpos-y[12] - - - /local-weather/cloud-shadows/cloudpos-x[13] - - - /local-weather/cloud-shadows/cloudpos-y[13] - - - /local-weather/cloud-shadows/cloudpos-x[14] - - - /local-weather/cloud-shadows/cloudpos-y[14] - - - /local-weather/cloud-shadows/cloudpos-x[15] - - - /local-weather/cloud-shadows/cloudpos-y[15] - - - /local-weather/cloud-shadows/cloudpos-x[16] - - - /local-weather/cloud-shadows/cloudpos-y[16] - - - /local-weather/cloud-shadows/cloudpos-x[17] - - - /local-weather/cloud-shadows/cloudpos-y[17] - - - /local-weather/cloud-shadows/cloudpos-x[18] - - - /local-weather/cloud-shadows/cloudpos-y[18] - - - /local-weather/cloud-shadows/cloudpos-x[19] - - - /local-weather/cloud-shadows/cloudpos-y[19] - - - /local-weather/cloud-shadows/cloud-shadow-flag - - - - - - - /sim/rendering/shaders/quality-level - /sim/rendering/random-vegetation - - 1.0 - - - - - - true - - 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 - off - - - gequal - 0.33 - - - 0 - 2d - - texture[0]/image - - clamp - clamp - - - - Shaders/Default/tree.vert - Shaders/Default/include_fog.frag - Shaders/Default/tree.frag - - - baseTexture - sampler-2d - 0 - - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - fogType - int - - fogtype - - - - season - float - - season - - - - - - true - - 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 - off - - - 2 - RenderBin - - - less - 0.33 - - - src-alpha - one-minus-src-alpha - - - false - - - 0 - 2d - - texture[0]/image - - clamp - clamp - - - - Shaders/Default/tree.vert - Shaders/Default/include_fog.frag - Shaders/Default/tree.frag - - - baseTexture - sampler-2d - 0 - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - fogType - int - - fogtype - - - - season - float - - season - - - - - - - - /sim/rendering/random-vegetation - /sim/rendering/multi-sample-buffers - - 1.0 - /sim/rendering/multi-samples - - GL_ARB_multisample - GL_ARB_vertex_shader - GL_ARB_fragment_shader - - 1.0 - - - - - - true - - 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 - off - - true - - 0 - 2d - - texture[0]/image - - clamp - clamp - - - - Shaders/Default/tree.vert - Shaders/Default/include_fog.frag - Shaders/Default/tree.frag - - - baseTexture - sampler-2d - 0 - - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - scattering - float - - scattering - - - - terminator - float - - terminator - - - - fogType - int - - fogtype - - - - season - float - - season - - - - - - - als-lighting - - - /sim/rendering/random-vegetation - /sim/rendering/multi-sample-buffers - /sim/rendering/random-vegetation-shadows - - 1.0 - /sim/rendering/multi-samples - - GL_ARB_shader_objects - GL_ARB_shading_language_100 - GL_ARB_vertex_shader - GL_ARB_fragment_shader - GL_ARB_multisample - - 2.0 - - - - - - true - - 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 - off - - - 0 - 2d - - texture[0]/image - - clamp - clamp - - true - - Shaders/ALS/tree-shadow.vert - Shaders/ALS/noise.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/tree-shadow.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/hazes.frag - Shaders/ALS/filters.frag - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - scattering - float - - scattering - - - - ground_scattering - float - - ground_scattering - - - - cloud_self_shading - float - - cloud_self_shading - - - - terminator - float - - terminator - - - - terrain_alt - float - - terrain_alt - - - - overcast - float - - overcast - - - - eye_alt - float - - eye_alt - - - - dust_cover_factor - float - - dust_cover_factor - - - - snow_level - float - - snow_level - - - - season - float - - season - - - - cseason - float - - cseason - - - - WindE - float - - windE - - - - WindN - float - - windN - - - - 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 - - - - num_deciduous_trees - int - - num_deciduous_trees - - - - use_forest_effect - bool - - use_forest_effect - - - - use_tree_shadows - bool - - use_tree_shadows - - - - use_optimization - bool - - use_optimization - - - - tree_patches - bool - - tree_patches - - - - forest_effect_size - float - - forest_effect_size - - - - forest_effect_shape - float - - forest_effect_shape - - - - texture - sampler-2d - 0 - - - colorMode - int - 2 - - - - quality_level - int - - quality_level - - - - tquality_level - int - - tquality_level - - - - wind_effects - int - - wind_effects - - - - forest_effects - int - - forest_effects - - - - - - als-lighting - - - /sim/rendering/random-vegetation - /sim/rendering/multi-sample-buffers - - 1.0 - /sim/rendering/multi-samples - - GL_ARB_shader_objects - GL_ARB_shading_language_100 - GL_ARB_vertex_shader - GL_ARB_fragment_shader - GL_ARB_multisample - - - - true - - 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 - off - - - 0 - 2d - - texture[0]/image - - clamp - clamp - - true - - Shaders/ALS/tree.vert - Shaders/ALS/noise.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/tree.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/hazes.frag - Shaders/ALS/filters.frag - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - scattering - float - - scattering - - - - ground_scattering - float - - ground_scattering - - - - cloud_self_shading - float - - cloud_self_shading - - - - terminator - float - - terminator - - - - terrain_alt - float - - terrain_alt - - - - overcast - float - - overcast - - - - eye_alt - float - - eye_alt - - - - dust_cover_factor - float - - dust_cover_factor - - - - snow_level - float - - snow_level - - - - season - float - - season - - - - cseason - float - - cseason - - - - WindE - float - - windE - - - - WindN - float - - windN - - - - 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 - - - - num_deciduous_trees - int - - num_deciduous_trees - - - - use_forest_effect - bool - - use_forest_effect - - - - forest_effect_size - float - - forest_effect_size - - - - forest_effect_shape - float - - forest_effect_shape - - - - texture - sampler-2d - 0 - - - colorMode - int - 2 - - - - quality_level - int - - quality_level - - - - tquality_level - int - - tquality_level - - - - wind_effects - int - - wind_effects - - - - forest_effects - int - - forest_effects - - - - - - als-lighting - - - /sim/rendering/random-vegetation - - - 2.0 - - - - GL_ARB_shader_objects - GL_ARB_shading_language_100 - GL_ARB_vertex_shader - GL_ARB_fragment_shader - - - - - - true - - 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 - off - - - 0 - 2d - - texture[0]/image - - clamp - clamp - - - gequal - 0.1 - - - Shaders/ALS/tree.vert - Shaders/ALS/noise.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/tree.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/hazes.frag - Shaders/ALS/filters.frag - - - visibility - float - - visibility - - - - avisibility - float - - avisibility - - - - hazeLayerAltitude - float - - lthickness - - - - scattering - float - - scattering - - - - ground_scattering - float - - ground_scattering - - - - cloud_self_shading - float - - cloud_self_shading - - - - terminator - float - - terminator - - - - terrain_alt - float - - terrain_alt - - - - overcast - float - - overcast - - - - eye_alt - float - - eye_alt - - - - dust_cover_factor - float - - dust_cover_factor - - - - snow_level - float - - snow_level - - - - season - float - - season - - - - cseason - float - - cseason - - - - WindE - float - - windE - - - - WindN - float - - windN - - - - 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 - - - - num_deciduous_trees - int - - num_deciduous_trees - - - - use_forest_effect - bool - - use_forest_effect - - - - forest_effect_size - float - - forest_effect_size - - - - forest_effect_shape - float - - forest_effect_shape - - - - texture - sampler-2d - 0 - - - colorMode - int - 2 - - - - quality_level - int - - quality_level - - - - tquality_level - int - - tquality_level - - - - wind_effects - int - - wind_effects - - - - forest_effects - int - - forest_effects - - - - - diff --git a/Compositor/Effects/urban.eff b/Compositor/Effects/urban.eff deleted file mode 100644 index ca3deeaa1..000000000 --- a/Compositor/Effects/urban.eff +++ /dev/null @@ -1,2191 +0,0 @@ - - - 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 - - - - 15 - 6 - 7 - - - - - /sim/rendering/shaders/quality-level - /sim/rendering/shaders/urban - - 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/Default/urban.vert - Shaders/Default/include_fog.frag - Shaders/Default/urban.frag - - tangent - 6 - - - binormal - 7 - - - normal - 15 - - - - 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 - - - - - - - - - /sim/rendering/shaders/quality-level - /sim/rendering/shaders/urban - - 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/Default/urban.vert - Shaders/Default/include_fog.frag - Shaders/Default/urban.frag - - tangent - 6 - - - binormal - 7 - - - normal - 15 - - - - - 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 - - - - - - als-lighting - - - /sim/rendering/shaders/urban - - 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/ALS/urban.vert - Shaders/ALS/urban.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/noise.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/filters.frag - - tangent - 6 - - - normal - 15 - - - - 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 - - - - - - - als-lighting - - - /sim/rendering/shaders/urban - - 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/ALS/urban.vert - Shaders/ALS/urban.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/noise.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/filters.frag - - tangent - 6 - - - - normal - 15 - - - - - 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 - - - - - diff --git a/Compositor/Effects/water-dds.eff b/Compositor/Effects/water-dds.eff deleted file mode 100644 index c34c7ffaa..000000000 --- a/Compositor/Effects/water-dds.eff +++ /dev/null @@ -1,56 +0,0 @@ - - - Effects/water-dds - Effects/water - - - Textures/Water/water-reflection.dds - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Water/waves-ver10-nm.dds - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Water/water_sine_nmap.dds - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Water/water-reflection-grey.dds - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Water/sea_foam.dds - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Water/perlin-noise-nm.dds - 2d - linear-mipmap-linear - repeat - repeat - normalized - - 1.0 - - diff --git a/Compositor/Effects/water-inland.eff b/Compositor/Effects/water-inland.eff deleted file mode 100644 index 3db15d05d..000000000 --- a/Compositor/Effects/water-inland.eff +++ /dev/null @@ -1,2063 +0,0 @@ - - - Effects/water-inland - Effects/terrain-default - - - Textures/Water/water-reflection.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Water/waves-ver10-nm.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Water/water_sine_nmap.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Water/water-reflection-grey.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Water/sea_foam.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Water/perlin-noise-nm.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Globe/ocean_depth_1.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Terrain/packice-overlay.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - 0.0 - - /rendering/scene/saturation - - - /environment/config/enabled - - - /rendering/scene/overcast - - - /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 - - - /environment/sea/surface/wind-from-east-fps - - - /environment/sea/surface/wind-from-north-fps - - - /environment/wave/freq - - - /environment/wave/amp - - - /environment/wave/sharp - - - /environment/wave/angle - - - /environment/wave/factor - - - /environment/wave/dangle - - - - /environment/ground-visibility-m - - - /environment/visibility-m - - - /environment/ground-haze-thickness-m - - - /rendering/scene/scattering - - - /environment/surface/scattering - - - /environment/terminator-relative-position-m - - - /environment/mean-terrain-elevation-m - - - /rendering/scene/overcast - - - /sim/rendering/eye-altitude-m - - - /environment/cloud-self-shading - - - /environment/moonlight - - - /sim/rendering/shaders/skydome - - - /environment/fog-structure - - - /environment/air-pollution-norm - - - /environment/sea/surface/ice-cover - - - /sim/rendering/shaders/landmass - - - - /environment/aircraft-effects/wash-x - - - /environment/aircraft-effects/wash-y - - - /environment/aircraft-effects/wash-strength - - - - /sim/rendering/als-filters/use-filtering - - - /sim/rendering/als-filters/gamma - - - /sim/rendering/als-filters/brightness - - - /sim/rendering/als-filters/use-night-vision - - - /sim/rendering/als-filters/use-IR-vision - - - /environment/surface/delta-T-water - - - - /local-weather/cloud-shadows/cloudpos-x[0] - - - /local-weather/cloud-shadows/cloudpos-y[0] - - - /local-weather/cloud-shadows/cloudpos-x[1] - - - /local-weather/cloud-shadows/cloudpos-y[1] - - - /local-weather/cloud-shadows/cloudpos-x[2] - - - /local-weather/cloud-shadows/cloudpos-y[2] - - - /local-weather/cloud-shadows/cloudpos-x[3] - - - /local-weather/cloud-shadows/cloudpos-y[3] - - - /local-weather/cloud-shadows/cloudpos-x[4] - - - /local-weather/cloud-shadows/cloudpos-y[4] - - - /local-weather/cloud-shadows/cloudpos-x[5] - - - /local-weather/cloud-shadows/cloudpos-y[5] - - - /local-weather/cloud-shadows/cloudpos-x[6] - - - /local-weather/cloud-shadows/cloudpos-y[6] - - - /local-weather/cloud-shadows/cloudpos-x[7] - - - /local-weather/cloud-shadows/cloudpos-y[7] - - - /local-weather/cloud-shadows/cloudpos-x[8] - - - /local-weather/cloud-shadows/cloudpos-y[8] - - - /local-weather/cloud-shadows/cloudpos-x[9] - - - /local-weather/cloud-shadows/cloudpos-y[9] - - - /local-weather/cloud-shadows/cloudpos-x[10] - - - /local-weather/cloud-shadows/cloudpos-y[10] - - - /local-weather/cloud-shadows/cloudpos-x[11] - - - /local-weather/cloud-shadows/cloudpos-y[11] - - - /local-weather/cloud-shadows/cloudpos-x[12] - - - /local-weather/cloud-shadows/cloudpos-y[12] - - - /local-weather/cloud-shadows/cloudpos-x[13] - - - /local-weather/cloud-shadows/cloudpos-y[13] - - - /local-weather/cloud-shadows/cloudpos-x[14] - - - /local-weather/cloud-shadows/cloudpos-y[14] - - - /local-weather/cloud-shadows/cloudpos-x[15] - - - /local-weather/cloud-shadows/cloudpos-y[15] - - - /local-weather/cloud-shadows/cloudpos-x[16] - - - /local-weather/cloud-shadows/cloudpos-y[16] - - - /local-weather/cloud-shadows/cloudpos-x[17] - - - /local-weather/cloud-shadows/cloudpos-y[17] - - - /local-weather/cloud-shadows/cloudpos-x[18] - - - /local-weather/cloud-shadows/cloudpos-y[18] - - - /local-weather/cloud-shadows/cloudpos-x[19] - - - /local-weather/cloud-shadows/cloudpos-y[19] - - - /local-weather/cloud-shadows/cloud-shadow-flag - - - - /environment/sea/color_r - - - /environment/sea/color_g - - - /environment/sea/color_b - - - - - 6 - 7 - - - - - /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/Default/water.vert - Shaders/Default/include_fog.frag - Shaders/Default/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 - - - - - - - als-lighting - - - - 5.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 - - - - - 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[7]/image - - - texture[7]/type - - - texture[7]/filter - - - texture[7]/wrap-s - - - texture[7]/wrap-t - - - texture[7]/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[10]/image - - - texture[10]/type - - - texture[10]/filter - - - texture[10]/wrap-s - - - texture[10]/wrap-t - - - texture[10]/internal-format - - - - Shaders/ALS/water.vert - Shaders/ALS/water-high.frag - Shaders/ALS/noise.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/filters.frag - - - - water_normalmap - sampler-2d - 2 - - - water_dudvmap - sampler-2d - 3 - - - topo_map - sampler-2d - 4 - - - sea_foam - sampler-2d - 5 - - - perlin_normalmap - sampler-2d - 6 - - - ice_texture - sampler-2d - 7 - - - - normalmap_dds - float - - normalmap_dds - - - - saturation - float - - - saturation - - - - WindE - float - - windE - - - - WindN - float - - windN - - - - wash_x - float - - wash-x - - - - wash_y - float - - wash-y - - - - wash_strength - float - - wash-strength - - - - 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 - - - - ground_scattering - float - - ground_scattering - - - - terminator - float - - terminator - - - - terrain_alt - float - - terrain_alt - - - - overcast - float - - overcast - - - - eye_alt - float - - eye_alt - - - - cloud_self_shading - float - - cloud_self_shading - - - - fogstructure - float - - fogstructure - - - - air_pollution - float - - air_pollution - - - - ice_cover - float - - ice_cover - - - - 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_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - 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 - - - - - sea_r - float - - sea_r - - - - sea_g - float - - sea_g - - - - sea_b - float - - sea_b - - - - 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 - - - - quality_level - int - - quality_level - - - - tquality_level - int - - tquality_level - - - - ocean_flag - int - 0 - - - - - - als-lighting - - - - 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 - - - - - 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 - - - - - 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/ALS/water.vert - Shaders/ALS/water-base.frag - Shaders/ALS/hazes.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - - - - water_normalmap - sampler-2d - 2 - - - water_dudvmap - sampler-2d - 3 - - - sea_foam - sampler-2d - 5 - - - perlin_normalmap - sampler-2d - 6 - - - - normalmap_dds - float - - normalmap_dds - - - - saturation - float - - - saturation - - - - 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 - - - - ground_scattering - float - - ground_scattering - - - - terminator - float - - terminator - - - - terrain_alt - float - - terrain_alt - - - - overcast - float - - overcast - - - - eye_alt - float - - eye_alt - - - - cloud_self_shading - float - - cloud_self_shading - - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - - sea_r - float - - sea_r - - - - sea_g - float - - sea_g - - - - sea_b - float - - sea_b - - - - ocean_flag - int - 0 - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - - - diff --git a/Compositor/Effects/water.eff b/Compositor/Effects/water.eff deleted file mode 100644 index 01f111e95..000000000 --- a/Compositor/Effects/water.eff +++ /dev/null @@ -1,2504 +0,0 @@ - - - Effects/water - Effects/terrain-default - - - Textures/Water/water-reflection.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Water/waves-ver10-nm.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Water/water_sine_nmap.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Water/water-reflection-grey.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Water/sea_foam.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Water/perlin-noise-nm.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Globe/ocean_depth_1.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - - Textures/Terrain/packice-overlay.png - 2d - linear-mipmap-linear - repeat - repeat - normalized - - 0.0 - - /rendering/scene/saturation - - - /environment/config/enabled - - - /rendering/scene/overcast - - - /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 - - - /environment/sea/surface/wind-from-east-fps - - - /environment/sea/surface/wind-from-north-fps - - - /environment/wave/freq - - - /environment/wave/amp - - - /environment/wave/sharp - - - /environment/wave/angle - - - /environment/wave/factor - - - /environment/wave/dangle - - - - /environment/ground-visibility-m - - - /environment/visibility-m - - - /environment/ground-haze-thickness-m - - - /rendering/scene/scattering - - - /environment/surface/scattering - - - /environment/terminator-relative-position-m - - - /environment/mean-terrain-elevation-m - - - /rendering/scene/overcast - - - /sim/rendering/eye-altitude-m - - - /environment/cloud-self-shading - - - /environment/moonlight - - - /sim/rendering/shaders/skydome - - - /environment/fog-structure - - - /environment/air-pollution-norm - - - /environment/sea/surface/ice-cover - - - /sim/rendering/shaders/landmass - - - - /environment/sea/color_r - - - /environment/sea/color_g - - - /environment/sea/color_b - - - - /environment/aircraft-effects/wash-x - - - /environment/aircraft-effects/wash-y - - - /environment/aircraft-effects/wash-strength - - - - /sim/rendering/als-filters/use-filtering - - - /sim/rendering/als-filters/gamma - - - /sim/rendering/als-filters/brightness - - - /sim/rendering/als-filters/use-night-vision - - - /sim/rendering/als-filters/use-IR-vision - - - /environment/surface/delta-T-water - - - - /local-weather/cloud-shadows/cloudpos-x[0] - - - /local-weather/cloud-shadows/cloudpos-y[0] - - - /local-weather/cloud-shadows/cloudpos-x[1] - - - /local-weather/cloud-shadows/cloudpos-y[1] - - - /local-weather/cloud-shadows/cloudpos-x[2] - - - /local-weather/cloud-shadows/cloudpos-y[2] - - - /local-weather/cloud-shadows/cloudpos-x[3] - - - /local-weather/cloud-shadows/cloudpos-y[3] - - - /local-weather/cloud-shadows/cloudpos-x[4] - - - /local-weather/cloud-shadows/cloudpos-y[4] - - - /local-weather/cloud-shadows/cloudpos-x[5] - - - /local-weather/cloud-shadows/cloudpos-y[5] - - - /local-weather/cloud-shadows/cloudpos-x[6] - - - /local-weather/cloud-shadows/cloudpos-y[6] - - - /local-weather/cloud-shadows/cloudpos-x[7] - - - /local-weather/cloud-shadows/cloudpos-y[7] - - - /local-weather/cloud-shadows/cloudpos-x[8] - - - /local-weather/cloud-shadows/cloudpos-y[8] - - - /local-weather/cloud-shadows/cloudpos-x[9] - - - /local-weather/cloud-shadows/cloudpos-y[9] - - - /local-weather/cloud-shadows/cloudpos-x[10] - - - /local-weather/cloud-shadows/cloudpos-y[10] - - - /local-weather/cloud-shadows/cloudpos-x[11] - - - /local-weather/cloud-shadows/cloudpos-y[11] - - - /local-weather/cloud-shadows/cloudpos-x[12] - - - /local-weather/cloud-shadows/cloudpos-y[12] - - - /local-weather/cloud-shadows/cloudpos-x[13] - - - /local-weather/cloud-shadows/cloudpos-y[13] - - - /local-weather/cloud-shadows/cloudpos-x[14] - - - /local-weather/cloud-shadows/cloudpos-y[14] - - - /local-weather/cloud-shadows/cloudpos-x[15] - - - /local-weather/cloud-shadows/cloudpos-y[15] - - - /local-weather/cloud-shadows/cloudpos-x[16] - - - /local-weather/cloud-shadows/cloudpos-y[16] - - - /local-weather/cloud-shadows/cloudpos-x[17] - - - /local-weather/cloud-shadows/cloudpos-y[17] - - - /local-weather/cloud-shadows/cloudpos-x[18] - - - /local-weather/cloud-shadows/cloudpos-y[18] - - - /local-weather/cloud-shadows/cloudpos-x[19] - - - /local-weather/cloud-shadows/cloudpos-y[19] - - - /local-weather/cloud-shadows/cloud-shadow-flag - - - - - 6 - 7 - - - - - /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/Default/water.vert - Shaders/Default/include_fog.frag - Shaders/Default/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 - - - - - rembrandt_enabled - int - - rembrandt - - - - - - - - /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/Default/water.vert - Shaders/Default/include_fog.frag - Shaders/Default/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 - - - - - rembrandt_enabled - int - - rembrandt - - - - - - als-lighting - - - - 5.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 - - - - 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[7]/image - - - texture[7]/type - - - texture[7]/filter - - - texture[7]/wrap-s - - - texture[7]/wrap-t - - - texture[7]/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[10]/image - - - texture[10]/type - - - texture[10]/filter - - - texture[10]/wrap-s - - - texture[10]/wrap-t - - - texture[10]/internal-format - - - - Shaders/ALS/water.vert - Shaders/ALS/water-high.frag - Shaders/ALS/noise.frag - Shaders/ALS/cloud-shadowfunc.frag - Shaders/ALS/hazes.frag - Shaders/ALS/secondary_lights.frag - Shaders/ALS/filters.frag - - - - water_normalmap - sampler-2d - 2 - - - water_dudvmap - sampler-2d - 3 - - - topo_map - sampler-2d - 4 - - - sea_foam - sampler-2d - 5 - - - perlin_normalmap - sampler-2d - 6 - - - ice_texture - sampler-2d - 7 - - - - normalmap_dds - float - - normalmap_dds - - - - saturation - float - - - saturation - - - - WindE - float - - windE - - - - WindN - float - - windN - - - - wash_x - float - - wash-x - - - - wash_y - float - - wash-y - - - - wash_strength - float - - wash-strength - - - - 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 - - - - ground_scattering - float - - ground_scattering - - - - terminator - float - - terminator - - - - terrain_alt - float - - terrain_alt - - - - overcast - float - - overcast - - - - eye_alt - float - - eye_alt - - - - cloud_self_shading - float - - cloud_self_shading - - - - fogstructure - float - - fogstructure - - - - air_pollution - float - - air_pollution - - - - ice_cover - float - - ice_cover - - - - 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_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - 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 - - - - - sea_r - float - - sea_r - - - - sea_g - float - - sea_g - - - - sea_b - float - - sea_b - - - - 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 - - - - quality_level - int - - quality_level - - - - tquality_level - int - - tquality_level - - - - ocean_flag - int - 1 - - - - - - als-lighting - - - - 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 - - - - - 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 - - - - - 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/ALS/water.vert - Shaders/ALS/water-base.frag - Shaders/ALS/hazes.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - - - - water_normalmap - sampler-2d - 2 - - - water_dudvmap - sampler-2d - 3 - - - sea_foam - sampler-2d - 5 - - - perlin_normalmap - sampler-2d - 6 - - - - normalmap_dds - float - - normalmap_dds - - - - saturation - float - - - saturation - - - - 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 - - - - ground_scattering - float - - ground_scattering - - - - terminator - float - - terminator - - - - terrain_alt - float - - terrain_alt - - - - overcast - float - - overcast - - - - eye_alt - float - - eye_alt - - - - cloud_self_shading - float - - cloud_self_shading - - - - air_pollution - float - - air_pollution - - - - - gamma - float - - gamma - - - - brightness - float - - brightness - - - - use_filtering - bool - - use_filtering - - - - use_night_vision - bool - - use_night_vision - - - - use_IR_vision - bool - - use_IR_vision - - - - delta_T - float - - delta_T - - - - fact_grey - float - - fact_grey - - - - fact_black - float - - fact_black - - - - - sea_r - float - - sea_r - - - - sea_g - float - - sea_g - - - - sea_b - float - - sea_b - - - - ocean_flag - int - 1 - - - display_xsize - int - - display_xsize - - - - display_ysize - int - - display_ysize - - - - - - diff --git a/Compositor/Shaders/ALS/3dcloud-detailed.frag b/Compositor/Shaders/ALS/3dcloud-detailed.frag deleted file mode 100644 index cd5acc42a..000000000 --- a/Compositor/Shaders/ALS/3dcloud-detailed.frag +++ /dev/null @@ -1,90 +0,0 @@ -#version 120 - -uniform float fg_Fcoef; - -uniform sampler2D baseTexture; -uniform float scattering; - -varying float fogFactor; -varying float mie_frag; -varying float mie_frag_mod; -varying float z_pos; -varying float bottom_shade; - -varying vec3 internal_pos; -varying vec3 hazeColor; - -varying float flogz; - -vec3 filter_combined (in vec3 color) ; - -void main(void) -{ - vec4 base = texture2D( baseTexture, gl_TexCoord[0].st); - if (base.a < 0.02) - discard; - - float mie_factor = 0.0; - float geo_factor = 1.0; - - float mie_sign = 1.0; - if (mie_frag < 0.0) {mie_sign = -1.0;} - - if (mie_sign > 0.0) - {mie_factor = smoothstep(0.8, 1.0, mie_frag);} - else - {mie_factor = -1.0 * (1.0 - smoothstep(-1.0, -0.8, mie_frag));} - - mie_factor *= mie_frag_mod; - - // suppress effect in cloud center - - float z_bias = 0.2 * (1.0 - smoothstep(2.0, 3.0, z_pos)); - - geo_factor *= smoothstep(-0.9 - z_bias, -0.4 - z_bias, internal_pos.x) * (1.0 -smoothstep(0.4 + z_bias, 0.9 + z_bias, internal_pos.x)); - geo_factor *= smoothstep(-0.9 - z_bias, -0.4 - z_bias, internal_pos.y) * (1.0 -smoothstep(0.4 + z_bias, 0.9 + z_bias, internal_pos.y)); - geo_factor *= smoothstep(0, 0.3, internal_pos.z) * (1.0 - smoothstep(0.5, 1.2, internal_pos.z)); - - if (mie_sign > 0.0) - { - mie_factor *=(1.0 -geo_factor); - } - - float transparency = smoothstep(0.0, 0.7, base.a); - float opacity = smoothstep(0.7, 1.0, base.a); - - float inverse_mie = 0.0; - - if ((opacity == 0.0) && (mie_sign > 0.0)) // Mie forward scattering enhancing light - {mie_factor *= (1.0 - pow(transparency, 2.0));} - else if ((opacity == 0.0) && (mie_sign < 0.0)) // Mie forward scattering reducing reflected light - { - inverse_mie = (1.0 - pow(transparency, 2.0)) * smoothstep(0.65, 0.8, scattering); - inverse_mie *= (1.0 - smoothstep(-1.0, -0.5, mie_frag)); - } - else if (mie_sign > 0.0) // bulk light absorption - {mie_factor *= - 4.0 * pow(opacity, 2.0);} - - - // darken the bulk of the away-facing cloud - - float bulk_shade_factor = (1.0 - 0.6 * geo_factor * smoothstep(0.5, 1.0, mie_frag)); - bulk_shade_factor -= 0.3 * smoothstep(0.5, 1.0, mie_frag) * (1.0 - mie_frag_mod) * (1.0 - smoothstep(0.4, 0.5, bottom_shade)); - - - float mie_enhancement = 1.0 + clamp(mie_factor, 0.0, 1.0); - mie_enhancement = mie_enhancement * bulk_shade_factor; - - vec4 finalColor = base * gl_Color; - finalColor.rgb *= mie_enhancement * (1.0 - 0.4 * inverse_mie); - finalColor.rgb = max(finalColor.rgb, gl_Color.rgb * 1.2 * bottom_shade); - - finalColor.rgb = mix(hazeColor, finalColor.rgb, fogFactor ); - finalColor.rgb = filter_combined(finalColor.rgb); - - - gl_FragColor.rgb = finalColor.rgb; - gl_FragColor.a = mix(0.0, finalColor.a, 1.0 - 0.5 * (1.0 - fogFactor)); - // logarithmic depth - gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; -} diff --git a/Compositor/Shaders/ALS/3dcloud-detailed.vert b/Compositor/Shaders/ALS/3dcloud-detailed.vert deleted file mode 100644 index 4bb01c4ad..000000000 --- a/Compositor/Shaders/ALS/3dcloud-detailed.vert +++ /dev/null @@ -1,296 +0,0 @@ -// -*-C++-*- -#version 120 - -varying float fogFactor; -varying vec3 hazeColor; -varying float mie_frag; -varying float mie_frag_mod; -varying vec3 internal_pos; -varying float bottom_shade; -varying float z_pos; - -varying float flogz; - -uniform float range; // From /sim/rendering/clouds3d-vis-range -uniform float detail_range; // From /sim/rendering/clouds3d_detail-range -uniform float scattering; -uniform float terminator; -uniform float altitude; -uniform float cloud_self_shading; -uniform float visibility; -uniform float moonlight; -uniform float air_pollution; -uniform float flash; -uniform float lightning_pos_x; -uniform float lightning_pos_y; -uniform float lightning_range; - -attribute vec3 usrAttr1; -attribute vec3 usrAttr2; - -float alpha_factor = usrAttr1.r; -float shade_factor = usrAttr1.g; -float cloud_height = usrAttr1.b; -float bottom_factor = usrAttr2.r; -float middle_factor = usrAttr2.g; -float top_factor = usrAttr2.b; - -const float EarthRadius = 5800000.0; - -// light_func is a generalized logistic function fit to the light intensity as a function -// of scaled terminator position obtained from Flightgear core - -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 > 30.0) {return e;} -if (x < -15.0) {return 0.03;} - - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - - -float mie_func (in float x, in float Mie) -{ -return x + 2.0 * x * Mie * (1.0 -0.8*x) * (1.0 -0.8*x); -} - -void main(void) -{ - - - //shade_factor = shade_factor * cloud_self_shading; - //top_factor = top_factor * cloud_self_shading; - //shade_factor = min(shade_factor, top_factor); - //middle_factor = min(middle_factor, top_factor); - //bottom_factor = min(bottom_factor, top_factor); - - float intensity; - float mix_factor; - - bottom_shade = bottom_factor; - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight * scattering; - gl_TexCoord[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 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]. 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; - gl_Position.xyz += gl_Vertex.z * w; - // Apply Z scaling to allow sprites to be squashed in the z-axis - gl_Position.z = gl_Position.z * gl_Color.w; - - // Now shift the sprite to the correct position in the cloud. - gl_Position.xyz += gl_Color.xyz; - - internal_pos = gl_Position.xyz/ cloud_height; - - - // 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(vec3(gl_ModelViewMatrix * vec4(- gl_Position.x, - gl_Position.y, - gl_Position.z, 0.0)))); - - // prepare suppression of shadeward Mie terms - float n1 = dot(normalize(-gl_LightSource[0].position.xyz), - normalize(vec3(gl_ModelViewMatrix * vec4(- gl_Color.x, - gl_Color.y, - gl_Color.z, 0.0)))); - - //z_pos = dot(normalize(-gl_LightSource[0].position.xyz), - // vec3(gl_ModelViewMatrix * vec4(- gl_Position.x, - gl_Position.y, - gl_Position.z, 0.0)))/cloud_height; - - - float mie_suppress = smoothstep(0.0, 0.3, n1); - - // Determine the position - used for fog and shading calculations - float fogCoord = length(vec3(gl_ModelViewMatrix * vec4(gl_Color.x, gl_Color.y, gl_Color.z, 1.0))); - float center_dist = length(vec3(gl_ModelViewMatrix * vec4(0.0,0.0,0.0,1.0))); - - z_pos = (fogCoord - center_dist)/cloud_height; - - if ((fogCoord > detail_range) && (fogCoord > center_dist) && (shade_factor < 0.7)) { - // More than detail_range away, so discard all sprites on opposite side of - // cloud center by shifting them beyond the view fustrum - gl_Position = vec4(0.0,0.0,10.0,1.0); - gl_FrontColor.a = 0.0; - } else { - - // Determine the shading of the vertex. We shade it based on it's position - // in the cloud relative to the sun, and it's vertical position in the cloud. - float shade = mix(shade_factor, top_factor, smoothstep(-0.3, 0.3, n)); - //if (n < 0) { - // shade = mix(top_factor, shade_factor, abs(n)); - //} - - if (gl_Position.z < 0.5 * cloud_height) { - shade = min(shade, mix(bottom_factor, middle_factor, gl_Position.z * 2.0 / cloud_height)); - } else { - shade = min(shade, mix(middle_factor, top_factor, gl_Position.z * 2.0 / cloud_height - 1.0)); - } - - //float h = gl_Position.z / cloud_height; - //if (h < 0.5) { - // shade = min(shade, mix(bottom_factor, middle_factor, smoothstep(0.0, 0.5, h))); - //} else { - // shade = min(shade, mix(middle_factor, top_factor, smoothstep(2.0 * (h - 0.5))); - // } - - // Final position of the sprite - vec3 relVector = gl_Position.xyz - ep.xyz; - gl_Position = gl_ModelViewProjectionMatrix * gl_Position; - // logarithmic depth - flogz = 1.0 + gl_Position.w; - - // Light at the final position - - // first obtain normal 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, corrected for altitude - // the altitude correction is clamped to reasonable values, sometimes altitude isn't parsed correctly, leading - // to overbright or overdark clouds - // float vertex_alt = clamp(altitude * 0.30480 + relVector.z,1000.0,10000.0); - float vertex_alt = clamp(altitude + relVector.z, 300.0, 10000.0); - float yprime = -dot(relVector, lightHorizon); - float yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt); - - // two times terminator width governs how quickly light fades into shadow - float terminator_width = 200000.0; - float earthShade = 1.0- 0.9* smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt); - float earthShadeFactor = 1.0 - smoothstep(0.4, 0.5, earthShade); - - // compute the light at the position - vec4 light_diffuse; - - float lightArg = (terminator-yprime_alt)/100000.0; - - light_diffuse.b = light_func(lightArg -1.2 * air_pollution, 1.330e-05, 0.264, 2.227, 1.08e-05, 1.0); - light_diffuse.g = light_func(lightArg -0.6 * air_pollution, 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.a = 1.0; - - //light_diffuse *= cloud_self_shading; - intensity = (1.0 - (0.8 * (1.0 - earthShade))) * length(light_diffuse.rgb); - light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, (1.0 - smoothstep(0.5,0.9, min(scattering, cloud_self_shading) )))); - - // correct ambient light intensity and hue before sunrise - if (earthShade < 0.6) - { - light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.6,earthShade ) )); - - } - - - - gl_FrontColor.rgb = intensity * shade * normalize(mix(light_diffuse.rgb, shadedFogColor, smoothstep(0.1,0.4, (1.0 - shade) ))) ; - - // lightning - vec2 lightningRelVector = relVector.xy - vec2(lightning_pos_x, lightning_pos_y); - float rCoord = length(lightningRelVector); - - vec3 flash_color = vec3 (0.43, 0.57, 1.0); - float flash_factor = flash; - - if (flash == 2) - { - flash_color = vec3 (0.8, 0.7, 0.4); - flash_factor = 1; - } - - float rn = 0.5 + 0.5 * fract(gl_Color.x); - gl_FrontColor.rgb += flash_factor * flash_color * (1.0 - smoothstep(lightning_range, 5.0 * lightning_range, rCoord)) * rn; - - - // fading of cloudlets - - if ((fogCoord > (0.9 * detail_range)) && (fogCoord > center_dist) && (shade_factor < 0.7)) { - // cloudlet is almost at the detail range, so fade it out. - gl_FrontColor.a = 1.0 - smoothstep(0.9 * detail_range, detail_range, fogCoord); - } else { - // 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(0.9 * range, range, fogCoord)); - } - gl_FrontColor.a = gl_FrontColor.a * (1.0 - smoothstep(visibility, 3.0* visibility, fogCoord)); - - fogFactor = exp(-fogCoord/visibility); - - // haze of ground haze shader is slightly bluish - hazeColor = light_diffuse.rgb; - hazeColor.r = hazeColor.r * 0.83; - hazeColor.g = hazeColor.g * 0.9; - hazeColor = hazeColor * scattering; - - - // Mie correction - float Mie = 0.0; - float MieFactor = dot(normalize(lightFull), normalize(relVector)); - - - mie_frag = MieFactor; - mie_frag_mod = mie_suppress * (1.0 - smoothstep(0.4, 0.6, bottom_factor)) * (1.0 - smoothstep(detail_range, 1.5 * detail_range, fogCoord)) * smoothstep(0.65, 0.8, scattering) - * smoothstep(0.7, 1.0, top_factor); - - - if (bottom_factor < 0.4) {mie_frag_mod = 0.0;} - - if (bottom_factor > 0.4) - { - MieFactor = dot(normalize(lightFull), normalize(relVector)); - Mie = 1.5 * smoothstep(0.9,1.0, MieFactor) * smoothstep(0.6, 0.8, bottom_factor) * (1.0-earthShadeFactor) ; - //if (MieFactor < 0.0) {Mie = - Mie;} - } - //else {Mie = 0.0;} - - if (Mie > 0.0) - { - hazeColor.r = mie_func(hazeColor.r, Mie); - hazeColor.g = mie_func(hazeColor.g, 0.8* Mie); - hazeColor.b = mie_func(hazeColor.b, 0.5* Mie); - - gl_FrontColor.r = mie_func(gl_FrontColor.r, Mie); - gl_FrontColor.g = mie_func(gl_FrontColor.g, 0.8* Mie); - gl_FrontColor.b = mie_func(gl_FrontColor.b, 0.5*Mie); - } - else if (MieFactor < 0.0) - { - float thickness_reduction = smoothstep(0.4, 0.8, bottom_factor) ; - float light_reduction = dot (lightFull, lightHorizon); - light_reduction *= light_reduction; - - float factor_b = 0.8 + 0.2 * (1.0 - smoothstep(0.0, 0.7, -MieFactor) * thickness_reduction * light_reduction) ; - float factor_r = 0.6 + 0.4 * (1.0 - smoothstep(0.0, 0.7, -MieFactor) * thickness_reduction * light_reduction) ; - float factor_g = 0.65 + 0.35 * (1.0 - smoothstep(0.0, 0.7, -MieFactor) * thickness_reduction * light_reduction) ; - hazeColor.r *= factor_r; - hazeColor.g *= factor_g; - hazeColor.b *= factor_b; - - gl_FrontColor.r *= factor_r; - gl_FrontColor.g *= factor_g; - gl_FrontColor.b *= factor_b; - } - - gl_FrontColor.rgb = gl_FrontColor.rgb + moonLightColor * earthShadeFactor; - hazeColor.rgb = hazeColor.rgb + moonLightColor * earthShadeFactor; - gl_FrontColor.a = gl_FrontColor.a * alpha_factor; - gl_BackColor = gl_FrontColor; - } -} diff --git a/Compositor/Shaders/ALS/3dcloud.frag b/Compositor/Shaders/ALS/3dcloud.frag deleted file mode 100644 index ca3ff1e01..000000000 --- a/Compositor/Shaders/ALS/3dcloud.frag +++ /dev/null @@ -1,30 +0,0 @@ -#version 120 - -uniform float fg_Fcoef; - -uniform sampler2D baseTexture; -varying float fogFactor; - -varying vec3 hazeColor; - -varying float flogz; - -vec3 filter_combined (in vec3 color) ; - -void main(void) -{ - vec4 base = texture2D( baseTexture, gl_TexCoord[0].st); - if (base.a < 0.02) - discard; - - vec4 finalColor = base * gl_Color; - - finalColor.rgb = mix(hazeColor, finalColor.rgb, fogFactor ); - finalColor.rgb = filter_combined(finalColor.rgb); - - gl_FragColor.rgb = finalColor.rgb; - gl_FragColor.a = mix(0.0, finalColor.a, 1.0 - 0.5 * (1.0 - fogFactor)); - // logarithmic depth - gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; -} - diff --git a/Compositor/Shaders/ALS/3dcloud.vert b/Compositor/Shaders/ALS/3dcloud.vert deleted file mode 100644 index 1a7829f19..000000000 --- a/Compositor/Shaders/ALS/3dcloud.vert +++ /dev/null @@ -1,271 +0,0 @@ -// -*-C++-*- -#version 120 - -varying float fogFactor; -varying vec3 hazeColor; - -varying float flogz; - -uniform float range; // From /sim/rendering/clouds3d-vis-range -uniform float detail_range; // From /sim/rendering/clouds3d_detail-range -uniform float scattering; -uniform float terminator; -uniform float altitude; -uniform float cloud_self_shading; -uniform float visibility; -uniform float moonlight; -uniform float air_pollution; -uniform float flash; -uniform float lightning_pos_x; -uniform float lightning_pos_y; -uniform float lightning_range; - -attribute vec3 usrAttr1; -attribute vec3 usrAttr2; - -float alpha_factor = usrAttr1.r; -float shade_factor = usrAttr1.g; -float cloud_height = usrAttr1.b; -float bottom_factor = usrAttr2.r; -float middle_factor = usrAttr2.g; -float top_factor = usrAttr2.b; - -const float EarthRadius = 5800000.0; - -vec3 moonlight_perception (in vec3 light); - -// light_func is a generalized logistic function fit to the light intensity as a function -// of scaled terminator position obtained from Flightgear core - -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 > 30.0) {return e;} -if (x < -15.0) {return 0.03;} - - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - - -float mie_func (in float x, in float Mie) -{ -return x + 2.0 * x * Mie * (1.0 -0.8*x) * (1.0 -0.8*x); -} - -void main(void) -{ - - - //shade_factor = shade_factor * cloud_self_shading; - //top_factor = top_factor * cloud_self_shading; - //shade_factor = min(shade_factor, top_factor); - //middle_factor = min(middle_factor, top_factor); - //bottom_factor = min(bottom_factor, top_factor); - - float intensity; - float mix_factor; - - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight * scattering; - moonLightColor = moonlight_perception (moonLightColor); - - gl_TexCoord[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 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]. 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; - gl_Position.xyz += gl_Vertex.z * w; - // Apply Z scaling to allow sprites to be squashed in the z-axis - gl_Position.z = gl_Position.z * gl_Color.w; - - // Now shift the sprite to the correct position in the cloud. - 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(vec3(gl_ModelViewMatrix * vec4(- gl_Position.x, - gl_Position.y, - gl_Position.z, 0.0)))); - - // Determine the position - used for fog and shading calculations - float fogCoord = length(vec3(gl_ModelViewMatrix * vec4(gl_Color.x, gl_Color.y, gl_Color.z, 1.0))); - float center_dist = length(vec3(gl_ModelViewMatrix * vec4(0.0,0.0,0.0,1.0))); - - if ((fogCoord > detail_range) && (fogCoord > center_dist) && (shade_factor < 0.7)) { - // More than detail_range away, so discard all sprites on opposite side of - // cloud center by shifting them beyond the view fustrum - gl_Position = vec4(0.0,0.0,10.0,1.0); - gl_FrontColor.a = 0.0; - } else { - - // Determine the shading of the vertex. We shade it based on it's position - // in the cloud relative to the sun, and it's vertical position in the cloud. - float shade = mix(shade_factor, top_factor, smoothstep(-0.3, 0.3, n)); - //if (n < 0) { - // shade = mix(top_factor, shade_factor, abs(n)); - //} - - if (gl_Position.z < 0.5 * cloud_height) { - shade = min(shade, mix(bottom_factor, middle_factor, gl_Position.z * 2.0 / cloud_height)); - } else { - shade = min(shade, mix(middle_factor, top_factor, gl_Position.z * 2.0 / cloud_height - 1.0)); - } - - //float h = gl_Position.z / cloud_height; - //if (h < 0.5) { - // shade = min(shade, mix(bottom_factor, middle_factor, smoothstep(0.0, 0.5, h))); - //} else { - // shade = min(shade, mix(middle_factor, top_factor, smoothstep(2.0 * (h - 0.5))); - // } - - // Final position of the sprite - vec3 relVector = gl_Position.xyz - ep.xyz; - gl_Position = gl_ModelViewProjectionMatrix * gl_Position; - // logarithmic depth - flogz = 1.0 + gl_Position.w; - - // Light at the final position - - // first obtain normal 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, corrected for altitude - // the altitude correction is clamped to reasonable values, sometimes altitude isn't parsed correctly, leading - // to overbright or overdark clouds - // float vertex_alt = clamp(altitude * 0.30480 + relVector.z,1000.0,10000.0); - float vertex_alt = clamp(altitude + relVector.z, 300.0, 10000.0); - float yprime = -dot(relVector, lightHorizon); - float yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt); - - // two times terminator width governs how quickly light fades into shadow - float terminator_width = 200000.0; - float earthShade = 1.0- 0.9* smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt); - float earthShadeFactor = 1.0 - smoothstep(0.4, 0.5, earthShade); - - // compute the light at the position - vec4 light_diffuse; - - float lightArg = (terminator-yprime_alt)/100000.0; - - light_diffuse.b = light_func(lightArg -1.2 * air_pollution, 1.330e-05, 0.264, 2.227, 1.08e-05, 1.0); - light_diffuse.g = light_func(lightArg -0.6 * air_pollution, 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.a = 1.0; - - //light_diffuse *= cloud_self_shading; - intensity = (1.0 - (0.8 * (1.0 - earthShade))) * length(light_diffuse.rgb); - light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, (1.0 - smoothstep(0.5,0.9, min(scattering, cloud_self_shading) )))); - - // correct ambient light intensity and hue before sunrise - if (earthShade < 0.6) - { - light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.6,earthShade ) )); - - } - - - - gl_FrontColor.rgb = intensity * shade * normalize(mix(light_diffuse.rgb, shadedFogColor, smoothstep(0.1,0.4, (1.0 - shade) ))) ; - - // lightning - vec2 lightningRelVector = relVector.xy - vec2(lightning_pos_x, lightning_pos_y); - float rCoord = length(lightningRelVector); - - vec3 flash_color = vec3 (0.43, 0.57, 1.0); - float flash_factor = flash; - - if (flash == 2) - { - flash_color = vec3 (0.8, 0.7, 0.4); - flash_factor = 1; - } - - float rn = 0.5 + 0.5 * fract(gl_Color.x); - gl_FrontColor.rgb += flash_factor * flash_color * (1.0 - smoothstep(lightning_range, 5.0 * lightning_range, rCoord)) * rn; - - - // fading of cloudlets - - if ((fogCoord > (0.9 * detail_range)) && (fogCoord > center_dist) && (shade_factor < 0.7)) { - // cloudlet is almost at the detail range, so fade it out. - gl_FrontColor.a = 1.0 - smoothstep(0.9 * detail_range, detail_range, fogCoord); - } else { - // 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(0.9 * range, range, fogCoord)); - } - gl_FrontColor.a = gl_FrontColor.a * (1.0 - smoothstep(visibility, 3.0* visibility, fogCoord)); - - fogFactor = exp(-fogCoord/visibility); - - // haze of ground haze shader is slightly bluish - hazeColor = light_diffuse.rgb; - hazeColor.r = hazeColor.r * 0.83; - hazeColor.g = hazeColor.g * 0.9; - hazeColor = hazeColor * scattering; - - - // Mie correction - float Mie = 0.0; - float MieFactor = 0.0; - - if (bottom_factor > 0.4) - { - MieFactor = dot(normalize(lightFull), normalize(relVector)); - Mie = 1.5 * smoothstep(0.9,1.0, MieFactor) * smoothstep(0.6, 0.8, bottom_factor) * (1.0-earthShadeFactor) ; - //if (MieFactor < 0.0) {Mie = - Mie;} - } - //else {Mie = 0.0;} - - if (Mie > 0.0) - { - hazeColor.r = mie_func(hazeColor.r, Mie); - hazeColor.g = mie_func(hazeColor.g, 0.8* Mie); - hazeColor.b = mie_func(hazeColor.b, 0.5* Mie); - - gl_FrontColor.r = mie_func(gl_FrontColor.r, Mie); - gl_FrontColor.g = mie_func(gl_FrontColor.g, 0.8* Mie); - gl_FrontColor.b = mie_func(gl_FrontColor.b, 0.5*Mie); - } - else if (MieFactor < 0.0) - { - float thickness_reduction = smoothstep(0.4, 0.8, bottom_factor) ; - float light_reduction = dot (lightFull, lightHorizon); - light_reduction *= light_reduction; - - float factor_b = 0.8 + 0.2 * (1.0 - smoothstep(0.0, 0.7, -MieFactor) * thickness_reduction * light_reduction) ; - float factor_r = 0.6 + 0.4 * (1.0 - smoothstep(0.0, 0.7, -MieFactor) * thickness_reduction * light_reduction) ; - float factor_g = 0.65 + 0.35 * (1.0 - smoothstep(0.0, 0.7, -MieFactor) * thickness_reduction * light_reduction) ; - hazeColor.r *= factor_r; - hazeColor.g *= factor_g; - hazeColor.b *= factor_b; - - gl_FrontColor.r *= factor_r; - gl_FrontColor.g *= factor_g; - gl_FrontColor.b *= factor_b; - } - - gl_FrontColor.rgb = gl_FrontColor.rgb + moonLightColor * earthShadeFactor; - hazeColor.rgb = hazeColor.rgb + moonLightColor * earthShadeFactor; - gl_FrontColor.a = gl_FrontColor.a * alpha_factor; - gl_BackColor = gl_FrontColor; - } -} diff --git a/Compositor/Shaders/ALS/agriculture.frag b/Compositor/Shaders/ALS/agriculture.frag deleted file mode 100644 index f73a235e8..000000000 --- a/Compositor/Shaders/ALS/agriculture.frag +++ /dev/null @@ -1,667 +0,0 @@ -// -*-C++-*- -#version 120 - -// written by Thorsten Renk, May 2014 -// based on ALS terrain shader -// Ambient term comes in gl_Color.rgb. -varying vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; -varying vec2 rawPos; -varying vec3 worldPos; -varying vec3 ecViewdir; - - -uniform float fg_Fcoef; - -uniform sampler2D texture; -uniform sampler2D mix_texture; -uniform sampler2D grain_texture; -uniform sampler2D gradient_texture; - - -varying float steepness; -varying vec2 grad_dir; - -varying float flogz; - - -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 snowlevel; -uniform float dust_cover_factor; -uniform float lichen_cover_factor; -uniform float wetness; -uniform float fogstructure; -uniform float snow_thickness_factor; -uniform float cloud_self_shading; -uniform float season; -uniform float air_pollution; -uniform float grain_strength; -uniform float intrinsic_wetness; -uniform float overlay_fraction; -uniform float overlay_scale; -uniform float rotation_scale; -uniform float distortion_factor; -uniform float uv_xoffset; -uniform float uv_yoffset; -uniform float landing_light1_offset; -uniform float landing_light2_offset; -uniform float landing_light3_offset; - -uniform float dust_resistance; -uniform float WindE; -uniform float WindN; -uniform float osg_SimulationTime; - -uniform int quality_level; -uniform int tquality_level; -uniform int wind_effects; -uniform int cloud_shadow_flag; -uniform int rotation_flag; -uniform int use_searchlight; -uniform int use_landing_light; -uniform int use_alt_landing_light; - - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - -float alt; -float eShade; -float yprime_alt; -float mie_angle; - -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 SlopeLines2D(in vec2 coord, in vec2 gradDir, in float wavelength, in float steepness); -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(); - - -// a fade function for procedural scales which are smaller than a pixel - -float detail_fade (in float scale, in float angle, in float dist) -{ -float fade_dist = 2000.0 * scale * angle/max(pow(steepness,4.0), 0.1); - -return 1.0 - smoothstep(0.5 * fade_dist, fade_dist, dist); -} - - - - - -void main() -{ - - -yprime_alt = diffuse_term.a; -//diffuse_term.a = 1.0; -mie_angle = gl_Color.a; -float effective_scattering = min(scattering, cloud_self_shading); - -// distance to fragment -float dist = length(relPos); -// angle of view vector with horizon -float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist; -// float altitude of fragment above sea level -float msl_altitude = (relPos.z + eye_alt); - - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); -// this is taken from default.frag - vec3 n; - float NdotL, NdotHV, fogFactor; - vec4 color = gl_Color; - color.a = 1.0; - vec3 lightDir = gl_LightSource[0].position.xyz; - vec3 halfVector = normalize(normalize(lightDir) + normalize(ecViewdir)); - vec4 texel; - vec4 snow_texel; - vec4 detail_texel; - vec4 mix_texel; - vec4 grain_texel; - vec4 dot_texel; - vec4 gradient_texel; - vec4 foam_texel; - vec4 fragColor; - vec4 specular = vec4(0.0); - float intensity; - - - -// Wind motion of the overlay noise simulating movement of vegetation and loose debris - -vec2 windPos; - -if (wind_effects > 1) - { - float windSpeed = length(vec2 (WindE,WindN)) /3.0480; - // interfering sine wave wind pattern - float sineTerm = sin(0.35 * windSpeed * osg_SimulationTime + 0.05 * (rawPos.x + rawPos.y)); - sineTerm = sineTerm + sin(0.3 * windSpeed * osg_SimulationTime + 0.04 * (rawPos.x + rawPos.y)); - sineTerm = sineTerm + sin(0.22 * windSpeed * osg_SimulationTime + 0.05 * (rawPos.x + rawPos.y)); - sineTerm = sineTerm/3.0; - // non-linear amplification to simulate gusts - sineTerm = sineTerm * sineTerm;//smoothstep(0.2, 1.0, sineTerm); - - // wind starts moving dust and leaves at around 8 m/s - float timeArg = 0.01 * osg_SimulationTime * windSpeed * smoothstep(8.0, 15.0, windSpeed); - timeArg = timeArg + 0.02 * sineTerm; - - windPos = vec2 (rawPos.x + WindN * timeArg, rawPos.y + WindE * timeArg); - } -else - { - windPos = rawPos.xy; - } - - - -// get noise at different wavelengths - -// used: 5m, 5m gradient, 10m, 10m gradient: heightmap of the closeup terrain, 10m also snow -// 50m: detail texel -// 250m: detail texel -// 500m: distortion and overlay -// 1500m: overlay, detail, dust, fog -// 2000m: overlay, detail, snow, fog - -// Perlin noise - -float noise_10m = Noise2D(rawPos.xy, 10.0); -float noise_5m = Noise2D(rawPos.xy ,5.0); -float noise_2m = Noise2D(rawPos.xy ,2.0); -float noise_1m = Noise2D(rawPos.xy ,1.0); -float noise_01m = Noise2D(windPos.xy, 0.1); - -float noisegrad_10m; -float noisegrad_5m; -float noisegrad_2m; -float noisegrad_1m; - - - -float noise_25m = Noise2D(rawPos.xy, 25.0); -float noise_50m = Noise2D(rawPos.xy, 50.0); - - -float noise_250m = Noise3D(worldPos.xyz,250.0); -float noise_500m = Noise3D(worldPos.xyz, 500.0); -float noise_1500m = Noise3D(worldPos.xyz, 1500.0); -float noise_2000m = Noise3D(worldPos.xyz, 2000.0); - -// tiling noise - -float vnoise_overlay = VoronoiNoise2D(rawPos.xy, overlay_scale, distortion_factor, distortion_factor); -float vnoise_rotation = VoronoiNoise2D(rawPos.xy, rotation_scale, distortion_factor, distortion_factor); - - - -// slope noise - -float slopenoise_50m = SlopeLines2D(rawPos, grad_dir, 50.0, steepness); -float slopenoise_100m = SlopeLines2D(rawPos, grad_dir, 100.0, steepness); - -float snownoise_25m = mix(noise_25m, slopenoise_50m, clamp(3.0*(1.0-steepness),0.0,1.0)); -float snownoise_50m = mix(noise_50m, slopenoise_100m, clamp(3.0*(1.0-steepness),0.0,1.0)); - - - -// get the texels - - float distortion_factor = 1.0; - vec2 stprime; - int flag = 1; - int mix_flag = 1; - float noise_term; - float snow_alpha; - - float angle = vnoise_rotation * 2.0 * 3.1415; - - if (rotation_flag ==2) - { - if (vnoise_rotation < 0.25) {angle = 0.5 * 3.1415926;} - else if (vnoise_rotation < 0.5) {angle = 3.1415926;} - else if (vnoise_rotation < 0.75) {angle = 1.5 * 3.1415926;} - else {angle = 0.0;} - } - - if (rotation_flag > 0) - { - stprime = vec2 (cos(angle)*gl_TexCoord[0].s + sin(angle)*gl_TexCoord[0].t, -sin(angle)*gl_TexCoord[0].s + cos(angle)*gl_TexCoord[0].t); - } - else - {stprime = gl_TexCoord[0].st;} - stprime+= vec2 (uv_xoffset, uv_yoffset); - texel = texture2D(texture, stprime); - float local_autumn_factor = texel.a; - grain_texel = texture2D(grain_texture, gl_TexCoord[0].st * 25.0); - gradient_texel = texture2D(gradient_texture, gl_TexCoord[0].st * 4.0); - - - // we need to fade procedural structures when they get smaller than a single pixel, for this we need - // to know under what angle we see the surface - - float view_angle = abs(dot(normalize(normal), normalize(ecViewdir))); - float sfactor = sqrt(2.0 * (1.0-steepness)/0.03) + abs(ct)/0.15; - - // the snow texel is generated procedurally - if (msl_altitude +500.0 > snowlevel) - { - snow_texel = vec4 (0.95, 0.95, 0.95, 1.0) * (0.9 + 0.1* noise_500m + 0.1* (1.0 - noise_10m) ); - snow_texel.r = snow_texel.r * (0.9 + 0.05 * (noise_10m + noise_5m)); - snow_texel.g = snow_texel.g * (0.9 + 0.05 * (noise_10m + noise_5m)); - snow_texel.a = 1.0; - noise_term = 0.1 * (noise_500m-0.5) ; - noise_term = noise_term + 0.2 * (snownoise_50m -0.5) * detail_fade(50.0, view_angle, 0.5*dist) ; - noise_term = noise_term + 0.2 * (snownoise_25m -0.5) * detail_fade(25.0, view_angle, 0.5*dist) ; - noise_term = noise_term + 0.3 * (noise_10m -0.5) * detail_fade(10.0, view_angle, 0.8*dist) ; - noise_term = noise_term + 0.3 * (noise_5m - 0.5) * detail_fade(5.0, view_angle, dist); - noise_term = noise_term + 0.15 * (noise_2m -0.5) * detail_fade(2.0, view_angle, dist); - noise_term = noise_term + 0.08 * (noise_1m -0.5) * detail_fade(1.0, view_angle, dist); - snow_texel.a = snow_texel.a * 0.2+0.8* smoothstep(0.2,0.8, 0.3 +noise_term + snow_thickness_factor +0.0001*(msl_altitude -snowlevel) ); - } - - // the mixture/gradient texture - mix_texel = texture2D(mix_texture, stprime * 1.3); - if (mix_texel.a <0.1) {mix_flag = 0;} - - - -// texture preparation according to detail level - -// mix in hires texture patches - -float dist_fact; -float nSum; -float mix_factor; - - // first the second texture overlay - // transition model 0: random patch overlay without any gradient information - // transition model 1: only gradient-driven transitions, no randomness - - - if (mix_flag == 1) - { - //nSum = 0.18 * (2.0 * noise_2000m + 2.0 * noise_1500m + noise_500m); - //nSum = mix(nSum, 0.5, max(0.0, 2.0 * (transition_model - 0.5))); - //nSum = nSum + 0.4 * (1.0 -smoothstep(0.9,0.95, abs(steepness)+ 0.05 * (noise_50m - 0.5))) * min(1.0, 2.0 * transition_model); - //mix_factor = smoothstep(0.5, 0.54, nSum); - if (vnoise_overlay > overlay_fraction) {mix_factor = 0.0;} else {mix_factor = 1.0;} - texel = mix(texel, mix_texel, mix_factor); - local_autumn_factor = texel.a; - } - - - - // rock for very steep gradients - - if (gradient_texel.a > 0.0) - { - texel = mix(texel, gradient_texel, 1.0 - smoothstep(0.75,0.8,abs(steepness)+ 0.00002* msl_altitude + 0.05 * (noise_50m - 0.5))); - local_autumn_factor = texel.a; - } - - - - - - - // then the grain texture overlay - - texel.rgb = mix(texel.rgb, grain_texel.rgb, grain_strength * grain_texel.a * (1.0 - mix_factor) * (1.0-smoothstep(2000.0,5000.0, dist))); - - // for really hires, add procedural noise overlay - texel.rgb = texel.rgb * (1.0 + 0.4 * (noise_01m-0.5) * detail_fade(0.1, view_angle, dist)) ; - -// autumn colors - -float autumn_factor = season * 2.0 * (1.0 - local_autumn_factor) ; - - -texel.r = min(1.0, (1.0 + 2.5 * autumn_factor) * texel.r); -texel.g = texel.g; -texel.b = max(0.0, (1.0 - 4.0 * autumn_factor) * texel.b); - - -if (local_autumn_factor < 1.0) - { - intensity = length(texel.rgb) * (1.0 - 0.5 * smoothstep(1.1,2.0,season)); - texel.rgb = intensity * normalize(mix(texel.rgb, vec3(0.23,0.17,0.08), smoothstep(1.1,2.0, season))); - } - - // slope line overlay - texel.rgb = texel.rgb * (1.0 - 0.12 * slopenoise_50m - 0.08 * slopenoise_100m); - -//const vec4 dust_color = vec4 (0.76, 0.71, 0.56, 1.0); -const vec4 dust_color = vec4 (0.76, 0.65, 0.45, 1.0); -const vec4 lichen_color = vec4 (0.17, 0.20, 0.06, 1.0); - -// mix vegetation -float gradient_factor = smoothstep(0.5, 1.0, steepness); -texel = mix(texel, lichen_color, gradient_factor * (0.4 * lichen_cover_factor + 0.8 * lichen_cover_factor * 0.5 * (noise_10m + (1.0 - noise_5m))) ); -// mix dust -texel = mix(texel, dust_color, clamp(0.5 * dust_cover_factor *dust_resistance + 3.0 * dust_cover_factor * dust_resistance *(((noise_1500m - 0.5) * 0.125)+0.125 ) - 0.03*slopenoise_100m,0.0, 1.0) ); -// mix snow -float snow_mix_factor = 0.0; -if (msl_altitude +500.0 > snowlevel) - { - snow_alpha = smoothstep(0.75, 0.85, abs(steepness)); - snow_mix_factor = snow_texel.a* smoothstep(snowlevel, snowlevel+200.0, snow_alpha * msl_altitude+ (noise_2000m + 0.1 * noise_10m -0.55) *400.0); - texel = mix(texel, snow_texel, snow_mix_factor); - } - - - - -// get distribution of water when terrain is wet - -float combined_wetness = min(1.0, wetness + intrinsic_wetness); -float water_threshold1; -float water_threshold2; -float water_factor =0.0; - - -if ((dist < 5000.0)&& (quality_level > 3) && (combined_wetness>0.0)) - { - water_threshold1 = 1.0-0.5* combined_wetness; - water_threshold2 = 1.0 - 0.3 * combined_wetness; - water_factor = smoothstep(water_threshold1, water_threshold2 , (0.3 * (2.0 * (1.0-noise_10m) + (1.0 -noise_5m)) * (1.0 - smoothstep(2000.0, 5000.0, dist))) - 5.0 * (1.0 -steepness)); - } - -// darken wet terrain - - texel.rgb = texel.rgb * (1.0 - 0.6 * combined_wetness); - - - -// light computations - - - vec4 light_specular = gl_LightSource[0].specular; - - // 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 = normal;//vec3 (nvec.x, nvec.y, sqrt(1.0 -pow(nvec.x,2.0) - pow(nvec.y,2.0) )); - n = normalize(n); - - NdotL = dot(n, lightDir); - - noisegrad_10m = (noise_10m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),10.0))/0.05; - noisegrad_5m = (noise_5m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),5.0))/0.05; - noisegrad_2m = (noise_2m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),2.0))/0.05; - noisegrad_1m = (noise_1m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),1.0))/0.05; - - - - NdotL = NdotL + (noisegrad_10m * detail_fade(10.0, view_angle,dist) + 0.5* noisegrad_5m * detail_fade(5.0, view_angle,dist)) * mix_factor/0.8; - NdotL = NdotL + 0.15 * noisegrad_2m * mix_factor/0.8 * detail_fade(2.0,view_angle,dist); - NdotL = NdotL + 0.1 * noisegrad_2m * detail_fade(2.0,view_angle,dist); - NdotL = NdotL + 0.05 * noisegrad_1m * detail_fade(1.0, view_angle,dist); - - if (NdotL > 0.0) { - float shadowmap = getShadowing(); - if (cloud_shadow_flag == 1) {NdotL = NdotL * shadow_func(relPos.x, relPos.y, 0.3 * noise_250m + 0.5 * noise_500m+0.2 * noise_1500m, dist);} - color += diffuse_term * NdotL * shadowmap; - NdotHV = max(dot(n, halfVector), 0.0); - if (gl_FrontMaterial.shininess > 0.0) - specular.rgb = ((gl_FrontMaterial.specular.rgb * 0.1 + (water_factor * vec3 (1.0, 1.0, 1.0))) - * light_specular.rgb - * pow(NdotHV, gl_FrontMaterial.shininess + (20.0 * water_factor)) - * shadowmap); - } - color.a = 1.0;//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); - - 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); - } - color.rgb +=secondary_light * light_distance_fading(dist); - - - fragColor = color * texel + specular; - - float lightArg = (terminator-yprime_alt)/100000.0; - vec3 hazeColor = get_hazeColor(lightArg); - - - -// Rayleigh color shift due to out-scattering - 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); - fragColor.rgb = rayleigh_out_shift(fragColor.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(diffuse_term.rgb)/1.73 * rShade; - 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); - fragColor.rgb = mix(fragColor.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; - - - - -// 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; - } - } - -// blur of the haze layer edge - -float blur_thickness = 50.0; -float cphi = dot(vec3(0.0, 1.0, 0.0), relPos)/dist; -float ctlayer = delta_z/dist-0.01 + 0.02 * Noise2D(vec2(cphi,1.0),0.1) -0.01; -float ctblur = 0.035 ; - -float blur_dist; - -if (abs(delta_z) < 400.0) - { - blur_dist = dist * (1.0-smoothstep(0.0,300.0,-delta_z)) * smoothstep(-400.0,-200.0, -delta_z); - blur_dist = blur_dist * smoothstep(ctlayer-4.0*ctblur, ctlayer-ctblur, ct) * (1.0-smoothstep(ctlayer+0.5*ctblur, ctlayer+ctblur, ct)); - distance_in_layer = max(distance_in_layer, blur_dist); - } - - -// 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 (quality_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 (quality_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; - - -//float lightArg = (terminator-yprime_alt)/100000.0; - - - -// 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 -{ - - - // 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(n,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.rgb *= eqColorFactor * eShade; -hazeColor.rgb = max(hazeColor.rgb, minLight.rgb); - -fragColor.rgb = mix(hazeColor + secondary_light * fog_backscatter(mvisibility), fragColor.rgb,transmission); - -} - -fragColor.rgb = filter_combined(fragColor.rgb); - -gl_FragColor = fragColor; -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; -} - diff --git a/Compositor/Shaders/ALS/airfield.frag b/Compositor/Shaders/ALS/airfield.frag deleted file mode 100644 index 168524b01..000000000 --- a/Compositor/Shaders/ALS/airfield.frag +++ /dev/null @@ -1,530 +0,0 @@ -// -*-C++-*- -#version 120 - -// written by Thorsten Renk, Oct 2011, based on default.frag -// Ambient term comes in gl_Color.rgb. -varying vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; -varying vec3 worldPos; -varying vec2 rawPos; -varying vec3 ecViewdir; - - -uniform float fg_Fcoef; - -uniform sampler2D texture; -uniform sampler2D overlay_texture; -uniform sampler2D grain_texture; - -varying float steepness; - -varying float flogz; - - -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 snowlevel; -uniform float dust_cover_factor; -uniform float fogstructure; -uniform float cloud_self_shading; -uniform float snow_thickness_factor; -uniform float grit_alpha; -uniform float overlay_bias; -uniform float overlay_alpha; -uniform float base_layer_magnification; -uniform float overlay_layer_magnification; -uniform float grain_layer_magnification; -uniform float wetness; -uniform float air_pollution; -uniform float season; -uniform float landing_light1_offset; -uniform float landing_light2_offset; -uniform float landing_light3_offset; - -uniform int quality_level; -uniform int tquality_level; -uniform int cloud_shadow_flag; -uniform int use_overlay; -uniform int use_grain; -uniform int use_color_overlay; -uniform int use_searchlight; -uniform int use_landing_light; -uniform int use_alt_landing_light; - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - - -float alt; -float eShade; -float yprime_alt; -float mie_angle; - -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 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(); - - -float detail_fade (in float scale, in float angle, in float dist) -{ -float fade_dist = 4000.0 * scale * angle; - -return 1.0 - smoothstep(0.5 * fade_dist, fade_dist, dist); -} - - -// this determines how light is attenuated in the distance -// physically this should be exp(-arg) but for technical reasons we use a sharper cutoff -// for distance > visibility - - -void main() -{ - -//if ((gl_FragCoord.y < ylimit) && (gl_FragCoord.x > zlimit1) && (gl_FragCoord.x < zlimit2)) -// {discard;} - - -float effective_scattering = min(scattering, cloud_self_shading); -yprime_alt = diffuse_term.a; -//diffuse_term.a = 1.0; -mie_angle = gl_Color.a; - -vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - -float dist = length(relPos); -float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist; - -// this is taken from default.frag - vec3 n; - float NdotL, NdotHV, fogFactor; - vec4 color = gl_Color; - color.a = 1.0; - vec3 lightDir = gl_LightSource[0].position.xyz; - vec3 halfVector; - if (quality_level<6) - {halfVector = gl_LightSource[0].halfVector.xyz;} - else - {halfVector = normalize(normalize(lightDir) + normalize(ecViewdir));} - vec4 texel; - vec4 overlay_texel; - vec4 grain_texel; - vec4 snow_texel; - vec4 fragColor; - vec4 specular = vec4(0.0); - float intensity; - - -// get noise at different wavelengths - -// used: 5m, 5m gradient, 10m, 10m gradient: heightmap of the closeup terrain, 10m also snow -// 500m: distortion and overlay -// 1500m: overlay, detail, dust, fog -// 2000m: overlay, detail, snow, fog - -float noise_01m; -float noise_1m = Noise2D(rawPos.xy, 1.0); -float noise_2m; - -float noise_10m = Noise2D(rawPos.xy, 10.0); -float noise_5m = Noise2D(rawPos.xy,5.0); - - - -float noise_50m = Noise2D(rawPos.xy, 50.0); - -float noise_1500m = Noise3D(worldPos.xyz, 1500.0); -float noise_2000m = Noise3D(worldPos.xyz, 2000.0); - - - - -// - - -// get the texels - - texel = texture2D(texture, gl_TexCoord[0].st * base_layer_magnification); - float local_autumn_factor = texel.a; - - float distortion_factor = 1.0; - float noise_term; - float snow_alpha; - - if (quality_level > 3) - { - //snow_texel = texture2D(snow_texture, gl_TexCoord[0].st); - - snow_texel = vec4 (0.95, 0.95, 0.95, 1.0) * (0.9 + 0.1* noise_50m + 0.1* (1.0 - noise_10m) ); - snow_texel.a = 1.0; - noise_term = 0.1 * (noise_50m-0.5); - - noise_term = noise_term + 0.2 * (noise_10m -0.5) * (1.0 - smoothstep(10000.0, 16000.0, dist) ) ; - noise_term = noise_term + 0.3 * (noise_5m -0.5) * (1.0 - smoothstep(1200.0 , 2000.0 , dist) ) ; - if (dist < 1000.0){ noise_term = noise_term + 0.3 * (noise_1m -0.5) * (1.0 - smoothstep(500.0 , 1000.0 , dist) );} - snow_texel.a = snow_texel.a * 0.2+0.8* smoothstep(0.2,0.8, 0.3 +noise_term + snow_thickness_factor +0.0001*(relPos.z +eye_alt -snowlevel) ); - } - -if (use_overlay == 1) - { - overlay_texel = texture2D(overlay_texture, gl_TexCoord[0].st * overlay_layer_magnification); - - texel.rgb = mix(texel.rgb, overlay_texel.rgb, overlay_texel.a * overlay_alpha * smoothstep(0.45, 0.65, overlay_bias + (0.5 * noise_1m + 0.1 * noise_2m + 0.4 * noise_10m))); - - - } - -if (use_grain == 1) - { - grain_texel = texture2D(grain_texture, gl_TexCoord[0].st * grain_layer_magnification); - texel.rgb = mix(texel.rgb, grain_texel.rgb, grain_texel.a); - } - - - - -float dist_fact; -float nSum; -float mix_factor; -float water_factor = 0.0; -float water_threshold1; -float water_threshold2; - - -// get distribution of water when terrain is wet - -if ((dist < 3000.0)&& (quality_level > 3) && (wetness>0.0)) - { - water_threshold1 = 1.0-0.5* wetness; - water_threshold2 = 1.0 - 0.3 * wetness; - water_factor = smoothstep(water_threshold1, water_threshold2 , 0.5 * (noise_5m + (1.0 -noise_1m))) * (1.0 - smoothstep(1000.0, 3000.0, dist)); - } - - -// color and shade variation of the grass - -if (use_color_overlay == 1) - { - float nfact_1m = 3.0 * (noise_1m - 0.5) * detail_fade(1.0, abs(ct),dist);//* (1.0 - smoothstep(3000.0, 6000.0, dist/ abs(ct))); - float nfact_5m = 2.0 * (noise_5m - 0.5) * detail_fade(2.0, abs(ct),dist);; - float nfact_10m = 1.0 * (noise_10m - 0.5); - texel.rgb = texel.rgb * (0.85 + 0.1 * (nfact_1m * detail_fade(1.0, abs(ct),dist) + nfact_5m + nfact_10m) * grit_alpha); - texel.r = texel.r * (1.0 + 0.14 * smoothstep(0.5,0.7, 0.33*(2.0 * noise_10m + (1.0-noise_5m)))); - } - - -// autumn colors - -float autumn_factor = season * 2.0 * (1.0 - local_autumn_factor) ; - - -texel.r = min(1.0, (1.0 + 2.5 * autumn_factor) * texel.r); -texel.g = texel.g; -texel.b = max(0.0, (1.0 - 4.0 * autumn_factor) * texel.b); - - -if (local_autumn_factor < 1.0) - { - intensity = length(texel.rgb) * (1.0 - 0.5 * smoothstep(1.1,2.0,season)); - texel.rgb = intensity * normalize(mix(texel.rgb, vec3(0.23,0.17,0.08), smoothstep(1.1,2.0, season))); - } - -vec4 dust_color; - -if (quality_level > 3) - { - // mix dust - dust_color = vec4 (0.76, 0.71, 0.56, 1.0); - texel = mix(texel, 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) ); - - // mix snow - snow_alpha = smoothstep(0.75, 0.85, abs(steepness)); - texel = mix(texel, snow_texel, snow_texel.a * smoothstep(snowlevel, snowlevel+200.0, snow_alpha * (relPos.z + eye_alt)+ (noise_2000m + 0.1 * noise_10m -0.55) *400.0)); - } - - -// darken grass when wet - texel.rgb = texel.rgb * (1.0 - 0.6 * wetness); - - - -// light computations - - - vec4 light_specular = gl_LightSource[0].specular ; - - // 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); - n = normal;//vec3 (nvec.x, nvec.y, sqrt(1.0 -pow(nvec.x,2.0) - pow(nvec.y,2.0) )); - n = normalize(n); - - NdotL = dot(n, lightDir); - if ((dist < 200.0) && (quality_level > 4)) - { - noise_01m = Noise2D(rawPos.xy,0.1); - NdotL = NdotL + 0.8 * (noise_01m-0.5) * grit_alpha * detail_fade(0.1, abs(ct),dist) * (1.0 - water_factor); - } - - if (NdotL > 0.0) { - float shadowmap = getShadowing(); - if (cloud_shadow_flag == 1) - {NdotL = NdotL * shadow_func(relPos.x, relPos.y, noise_1500m, dist);} - color += diffuse_term * NdotL * shadowmap; - - - - - NdotHV = max(dot(n, halfVector), 0.0); - - if (gl_FrontMaterial.shininess > 0.0) - specular.rgb = ((gl_FrontMaterial.specular.rgb + (water_factor * vec3 (1.0, 1.0, 1.0))) - * light_specular.rgb - * pow(NdotHV, (gl_FrontMaterial.shininess + 20.0 * water_factor)) - * shadowmap); - } - color.a = 1.0; - // 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); - - - - 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); - } - color.rgb +=secondary_light * light_distance_fading(dist); - - fragColor = color * texel + specular; - - - float lightArg = (terminator-yprime_alt)/100000.0; - - vec3 hazeColor = get_hazeColor(lightArg); - - -// Rayleigh color shift due to out-scattering - - if ((quality_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); - fragColor.rgb = rayleigh_out_shift(fragColor.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); - fragColor.rgb = mix(fragColor.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; - - - - -// 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 (quality_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 (quality_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)) ); - } - -// high altitude desaturation of the haze color - -intensity = length(hazeColor); - -if (intensity>0.0) -{ - -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(n,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)); -} - - -//hazeColor = clamp(hazeColor,0.0,1.0); - -// 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.rgb *= eqColorFactor * eShade; -hazeColor.rgb = max(hazeColor.rgb, minLight.rgb); - - -fragColor.rgb = mix(hazeColor+secondary_light * fog_backscatter(mvisibility), fragColor.rgb,transmission); - - - -} - -fragColor.rgb = filter_combined(fragColor.rgb); - -gl_FragColor = fragColor; -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; - -} diff --git a/Compositor/Shaders/ALS/birds.frag b/Compositor/Shaders/ALS/birds.frag deleted file mode 100644 index 4e1154e28..000000000 --- a/Compositor/Shaders/ALS/birds.frag +++ /dev/null @@ -1,212 +0,0 @@ -// -*-C++-*- -#version 120 - -uniform float fg_Fcoef; - -uniform sampler2D texture; - -uniform float color_base_r; -uniform float color_base_g; -uniform float color_base_b; - -uniform float color_alt_r; -uniform float color_alt_g; -uniform float color_alt_b; - -uniform float visibility; -uniform float avisibility; -uniform float hazeLayerAltitude; -uniform float eye_alt; -uniform float terminator; -uniform float scattering; - -uniform float osg_SimulationTime; - - -varying vec3 vertex; -varying vec3 relPos; -varying vec3 normal; - -varying float flogz; - -const float terminator_width = 200000.0; - -float Noise2D(in vec2 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 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() -{ - -float noise = 0.0; - - -vec3 color_base = vec3 (color_base_r, color_base_g, color_base_b); -vec3 color_alt = vec3 (color_alt_r, color_alt_g, color_alt_b); -vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - - -vec3 viewDir = normalize(relPos); - - -vec2 lookup_coords = vertex.yz; -lookup_coords.x += 0.03* osg_SimulationTime; - -float domain_size = 0.05; -float r = length(vertex); - -float domain_noise = VoronoiNoise2D(lookup_coords, domain_size, 0.0, 0.0); -domain_noise = domain_noise * (1.0- smoothstep(0.5, 1.0, r)); - -if (domain_noise < 0.9) {discard;} - - - -// fogging - -float dist = length(relPos); -float delta_z = hazeLayerAltitude - eye_alt; -float transmission; -float vAltitude; -float delta_zv; -float H; -float distance_in_layer; -float transmission_arg; - - // angle with horizon - float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist; - - - 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,min(visibility, avisibility)) * 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)) - { - 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; - } - } - - - - transmission_arg = (dist-distance_in_layer)/avisibility; - if (visibility < avisibility) - { - transmission_arg = transmission_arg + (distance_in_layer/visibility); - } - else - { - transmission_arg = transmission_arg + (distance_in_layer/avisibility); - } - - - - transmission = fog_func(transmission_arg, 0.0); - float lightArg = terminator/100000.0; - float earthShade = 0.6 * (1.0 - smoothstep(-terminator_width+ terminator, terminator_width + terminator, 0.0)) + 0.4; - - vec4 light_diffuse; - - - light_diffuse.b = light_func(lightArg , 1.330e-05, 0.264, 2.227, 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.a = 1.0; - - light_diffuse *=scattering; - - - float intensity = length(light_diffuse.rgb); - light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, 1.0 -smoothstep(0.4, 0.7,earthShade) )); - - -vec4 domainTexel; - - -if (domain_noise > 0.9) {domainTexel = vec4 (1.0, 1.0, 1.0, 1.0);} -else {domainTexel = vec4 (0.0, 0.0, 0.0, 0.0);} - - - -vec2 coords_raw = lookup_coords/domain_size; -coords_raw += vec2(0.5,0.5); -float coord_int_x = coords_raw.x - fract(coords_raw.x) ; -float coord_int_y = coords_raw.y - fract(coords_raw.y) ; - -vec2 domain_coords = vec2 (coords_raw.x - coord_int_x, coords_raw.y - coord_int_y); - -float domain_x = coords_raw.x - coord_int_x; - -domain_coords.y = clamp(domain_coords.y, 0.05, 0.95); - -domain_coords.x *=0.25; - -float shape_select = 0.0; - -if (domain_noise > 0.975) {shape_select = 0.25;} -else if (domain_noise > 0.95) {shape_select = 0.5;} -else if (domain_noise > 0.925) {shape_select = 0.75;} - -float t_fact = fract(osg_SimulationTime); - -if (t_fact > 0.75) {shape_select +=0.75;} -else if (t_fact > 0.5) {shape_select +=0.5;} -else if (t_fact > 0.25) {shape_select +=0.25;} - - -domain_coords.x += shape_select; - -vec4 shapeTexel = texture2D(texture, domain_coords); - -color_base.rgb = mix(color_alt.rgb, color_base.rgb, length(shapeTexel.rgb)/1.73); - -if ((domain_coords.y < 0.1) || (domain_coords.y > 0.9)) {shapeTexel.a = 0.0;} -if ((domain_x < 0.1) || (domain_x > 0.9)) {shapeTexel.a = 0.0;} - -domainTexel.rgb *= color_base.rgb; - -vec4 birdTexel; -birdTexel.rgb = domainTexel.rgb * light_diffuse.rgb; -birdTexel.a = domainTexel.a * shapeTexel.a * transmission; - - -gl_FragColor = birdTexel; -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; - -} diff --git a/Compositor/Shaders/ALS/birds.vert b/Compositor/Shaders/ALS/birds.vert deleted file mode 100644 index e63c31ea5..000000000 --- a/Compositor/Shaders/ALS/birds.vert +++ /dev/null @@ -1,52 +0,0 @@ -// -*-C++-*- - -#version 120 - - - - -varying vec3 vertex; -varying vec3 relPos; -varying vec3 normal; - -varying float flogz; - -uniform float osg_SimulationTime; - -void main() -{ - -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); - - vec3 absu = abs(u); - vec3 r = normalize(vec3(-u.y, u.x, 0.0)); - vec3 w = cross(u, r); - -vertex = gl_Vertex.xyz; -relPos = vertex - ep.xyz; -normal = gl_NormalMatrix * gl_Normal; - - 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; - gl_Position.xyz += gl_Vertex.z * w; - - gl_Position = gl_ModelViewProjectionMatrix * gl_Position; - // logarithmic depth - flogz = 1.0 + gl_Position.w; - -//vec4 offset = gl_ModelViewProjectionMatrix * vec4 (0.05* osg_SimulationTime, 0.0, 0.0, 1.0); - -//gl_Position +=offset; - -//gl_Position = ftransform(); -gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; - -gl_FrontColor = vec4 (1.0,1.0,1.0,1.0); -gl_BackColor = gl_FrontColor; -} - - diff --git a/Compositor/Shaders/ALS/bowwave.frag b/Compositor/Shaders/ALS/bowwave.frag deleted file mode 100644 index 97f2e8b4f..000000000 --- a/Compositor/Shaders/ALS/bowwave.frag +++ /dev/null @@ -1,449 +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 -// Ported to the Atmospheric Light Scattering Framework -// by Thorsten Renk, Aug. 2013 - -#version 120 -#define fps2kts 0.5925 - -uniform float fg_Fcoef; - -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; - -uniform float hazeLayerAltitude; -uniform float terminator; -uniform float terrain_alt; -uniform float avisibility; -uniform float visibility; -uniform float overcast; -uniform float scattering; -uniform float ground_scattering; -uniform float cloud_self_shading; -uniform float eye_alt; -uniform float fogstructure; -uniform float ice_cover; -uniform float sea_r; -uniform float sea_g; -uniform float sea_b; - -uniform int quality_level; - - -varying vec4 waterTex1; //moving texcoords -varying vec4 waterTex2; //moving texcoords -varying vec3 viewerdir; -varying vec3 lightdir; -varying vec3 normal; -varying vec3 relPos; -varying float earthShade; -varying float yprime_alt; -varying float mie_angle; -varying float steepness; - -varying float flogz; - -vec3 specular_light; - -float fog_func (in float targ, in float alt); - -vec3 get_hazeColor(in float light_arg); -vec3 filter_combined (in vec3 color) ; - -const float terminator_width = 200000.0; -const float EarthRadius = 5800000.0; - - -/////// 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 ); - } - - -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 > 30.0) {return e;} -if (x < -15.0) {return 0.0;} - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - -// this determines how light is attenuated in the distance -// physically this should be exp(-arg) but for technical reasons we use a sharper cutoff -// for distance > visibility - - - -////////////////////// - -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; - - float dist = length(relPos); - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - float effective_scattering = min(scattering, cloud_self_shading); - - // 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 dist1 = texture2D(water_dudvmap, vec2(waterTex1 + disdis*sca2)* windScale * 2.0) * 2.0 - 1.0; - vec4 fdist = normalize(dist1); - 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; - } - */ - - refl.r = sea_r; - refl.g = sea_g; - refl.b = sea_b; - refl.a = 1.0; - - - float intensity; - // de-saturate for reduced light - refl.rgb = mix(refl.rgb, vec3 (0.248, 0.248, 0.248), 1.0 - smoothstep(0.1, 0.8, ground_scattering)); - - // de-saturate light for overcast haze - intensity = length(refl.rgb); - refl.rgb = mix(refl.rgb, intensity * vec3 (1.0, 1.0, 1.0), 0.5 * smoothstep(0.1, 0.9, overcast)); - - 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 - - specular_light = gl_Color.rgb; - - vec3 specular_color = vec3(specular_light) - * 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; - ambient_light.rgb = max(specular_light.rgb, vec3(0.1, 0.1, 0.1)); - ambient_light.a = 1.0; - vec4 finalColor; - - finalColor = refl + specular * smoothstep(0.3, 0.6, ground_scattering); - - //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; - - - -float delta_z = hazeLayerAltitude - eye_alt; - - -if (dist > 40.0) -{ - - -float transmission; -float vAltitude; -float delta_zv; -float H; -float distance_in_layer; -float transmission_arg; - - -// 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,min(visibility,avisibility)) * 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 (quality_level > 3) - { - transmission_arg = transmission_arg + (distance_in_layer/(1.0 * visibility )); - } - 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 (quality_level > 3) - { - transmission_arg = transmission_arg + (distance_in_layer/(1.0 * avisibility )); - } - 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, eye_alt); - -// there's always residual intensity, we should never be driven to zero -if (eqColorFactor < 0.2) eqColorFactor = 0.2; - - -float lightArg = (terminator-yprime_alt)/100000.0; - -vec3 hazeColor = get_hazeColor(lightArg); - - -// now dim the light for haze -float 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)) ); - } - -// high altitude desaturation of the haze color - -intensity = length(hazeColor); - - -if (intensity > 0.0) // this needs to be a condition, because otherwise hazeColor doesn't come out correctly - { - hazeColor = intensity * normalize (mix(hazeColor, intensity * vec3 (1.0,1.0,1.0), 0.7* smoothstep(5000.0, 50000.0, eye_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)))); - } - - - - // 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.rgb *= eqColorFactor * eShade; - hazeColor.rgb = max(hazeColor.rgb, minLight.rgb); - - finalColor.rgb = mix(hazeColor, finalColor.rgb,transmission); - - - } - - - finalColor.rgb = filter_combined(finalColor.rgb); - gl_FragColor = vec4(finalColor.rgb, alpha0.a * 1.35); - // logarithmic depth - gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; - - } diff --git a/Compositor/Shaders/ALS/building-default.vert b/Compositor/Shaders/ALS/building-default.vert deleted file mode 100644 index 0640592a7..000000000 --- a/Compositor/Shaders/ALS/building-default.vert +++ /dev/null @@ -1,314 +0,0 @@ -// -*-C++-*- -#version 120 -#extension GL_EXT_draw_instanced : enable - -// 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 - -attribute vec3 instancePosition; // (x,y,z) -attribute vec3 instanceScale; // (width, depth, height) -attribute vec3 attrib1; // Generic packed attributes -attribute vec3 attrib2; - -// 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 vec3 relPos; - -//varying float earthShade; -//varying float yprime; -//varying float vertex_alt; -varying float yprime_alt; -varying float mie_angle; - -varying float flogz; - -uniform int colorMode; -uniform float hazeLayerAltitude; -uniform float terminator; -uniform float terrain_alt; -uniform float avisibility; -uniform float visibility; -uniform float overcast; -//uniform float scattering; -uniform float ground_scattering; - -uniform bool use_IR_vision; - -// 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 earthShade; -//float mie_angle; - - -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)); -} - -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() -{ - - vec4 light_diffuse; - vec4 light_ambient; - - float yprime; - float lightArg; - float intensity; - float vertex_alt; - float scattering; - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - - // 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); - flogz = 1.0 + gl_Position.w; - - // 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; - - // Rotate the normal. - normal = gl_Normal; - normal.xy = vec2(dot(normal.xy, vec2(cr, sr)), dot(normal.xy, vec2(-sr, cr))); - normal = gl_NormalMatrix * normal; - - - vec4 ambient_color, diffuse_color; - if (colorMode == MODE_DIFFUSE) { - diffuse_color = vec4(1.0,1.0,1.0,1.0); - ambient_color = gl_FrontMaterial.ambient; - } else if (colorMode == MODE_AMBIENT_AND_DIFFUSE) { - diffuse_color = vec4(1.0,1.0,1.0,1.0); - ambient_color = vec4(1.0,1.0,1.0,1.0); - } 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 + gl_Color.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 + gl_Color.z,100.0); - scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_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.a = 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.4 + 0.6 * smoothstep(0.2, 0.5, earthShade)); - intensity = length(light_ambient.rgb); - light_ambient.rgb = intensity * normalize(mix(light_ambient.rgb, shadedFogColor, 1.0 -smoothstep(0.4, 0.8,earthShade) )); - - intensity = length(light_diffuse.rgb); - light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, 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 = vec4 (1.0, 1.0, 1.0, 1.0); - light_ambient = vec4 (0.33, 0.4, 0.5, 1.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_diffuse.a = 1.0; - - light_ambient.r = 0.316 + lightArg * 0.016; - 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; - } - - light_diffuse = light_diffuse * scattering; - yprime_alt = -sqrt(2.0 * EarthRadius * hazeLayerAltitude); -} - -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 - - diffuse_term = diffuse_color* light_diffuse; - vec4 constant_term = gl_FrontMaterial.emission + ambient_color * - (gl_LightModel.ambient + light_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 = 1.0; - // Another hack for supporting two-sided lighting without using - // gl_FrontFacing in the fragment shader. - gl_FrontColor.rgb = constant_term.rgb; - gl_BackColor.rgb = constant_term.rgb; - //gl_FrontColor.a = mie_angle; gl_BackColor.a = mie_angle; -} diff --git a/Compositor/Shaders/ALS/building-model-ultra.vert b/Compositor/Shaders/ALS/building-model-ultra.vert deleted file mode 100644 index 84e6ebe2b..000000000 --- a/Compositor/Shaders/ALS/building-model-ultra.vert +++ /dev/null @@ -1,190 +0,0 @@ -// -*- mode: C; -*- -// Licence: GPL v2 -// © Emilian Huminiuc and Vivian Meazza 2011 -#version 120 - -attribute vec3 instancePosition; // (x,y,z) -attribute vec3 instanceScale ; // (width, depth, height) -attribute vec3 attrib1; // Generic packed attributes -attribute vec3 attrib2; - -varying vec3 rawpos; -varying vec3 VNormal; -varying vec3 VTangent; -varying vec3 VBinormal; -varying vec3 vViewVec; -varying vec3 vertVec; -varying vec3 reflVec; - -varying float flogz; - -varying float alpha; - -attribute vec3 tangent; -attribute vec3 binormal; - -uniform float pitch; -uniform float roll; -uniform float hdg; -uniform int refl_dynamic; -uniform int nmap_enabled; -uniform int shader_qual; -uniform int rembrandt_enabled; -uniform int color_is_position; - -//////Fog Include/////////// -// uniform int fogType; -// void fog_Func(int type); -//////////////////////////// - -void rotationMatrixPR(in float sinRx, in float cosRx, in float sinRy, in float cosRy, out mat4 rotmat) -{ - rotmat = mat4( cosRy , sinRx * sinRy , cosRx * sinRy, 0.0, - 0.0 , cosRx , -sinRx * cosRx, 0.0, - -sinRy, sinRx * cosRy, cosRx * cosRy , 0.0, - 0.0 , 0.0 , 0.0 , 1.0 ); -} - -void rotationMatrixH(in float sinRz, in float cosRz, out mat4 rotmat) -{ - rotmat = mat4( cosRz, -sinRz, 0.0, 0.0, - sinRz, cosRz, 0.0, 0.0, - 0.0 , 0.0 , 1.0, 0.0, - 0.0 , 0.0 , 0.0, 1.0 ); -} - -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 rawpos = 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 - rawpos.x = (1.0 - gl_Color.z) * rawpos.x + gl_Color.z * ((rawpos.x + 0.5) * attr3.z - 0.5); - rawpos.y = (1.0 - gl_Color.z) * rawpos.y + gl_Color.z * (rawpos.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. - rawpos.z = rawpos.z + gl_Color.z * attrib1.y / instanceScale.z; - rawpos = rawpos * instanceScale.xyz; - - // Rotation of the building and movement into rawpos - rawpos.xy = vec2(dot(rawpos.xy, vec2(cr, sr)), dot(rawpos.xy, vec2(-sr, cr))); - rawpos = rawpos + instancePosition.xyz; - vec4 ecPosition = gl_ModelViewMatrix * vec4(rawpos, 1.0); - - // 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; - - // Rotate the normal. - vec3 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))); - - VNormal = normalize(gl_NormalMatrix * normal); - vec3 n = normalize(normal); - vec3 tempTangent = cross(n, vec3(1.0,0.0,0.0)); - vec3 tempBinormal = cross(n, tempTangent); - - if (nmap_enabled > 0){ - tempTangent = tangent; - tempBinormal = binormal; - } - - VTangent = normalize(gl_NormalMatrix * tempTangent); - VBinormal = normalize(gl_NormalMatrix * tempBinormal); - vec3 t = tempTangent; - vec3 b = tempBinormal; - - // 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 = 1.0; - - // 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); - vec3 reflVec_stat = normalize(gl_ModelViewMatrixInverse * reflect_eye).xyz; - if (refl_dynamic > 0){ - //prepare rotation matrix - mat4 RotMatPR; - mat4 RotMatH; - float _roll = roll; - if (_roll>90.0 || _roll < -90.0) - { - _roll = -_roll; - } - float cosRx = cos(radians(_roll)); - float sinRx = sin(radians(_roll)); - float cosRy = cos(radians(-pitch)); - float sinRy = sin(radians(-pitch)); - float cosRz = cos(radians(hdg)); - float sinRz = sin(radians(hdg)); - rotationMatrixPR(sinRx, cosRx, sinRy, cosRy, RotMatPR); - rotationMatrixH(sinRz, cosRz, RotMatH); - vec3 reflVec_dyn = (RotMatH * (RotMatPR * normalize(gl_ModelViewMatrixInverse * reflect_eye))).xyz; - - reflVec = reflVec_dyn; - } else { - reflVec = reflVec_stat; - } - - if(rembrandt_enabled < 1){ - gl_FrontColor = gl_FrontMaterial.emission + vec4(1.0,1.0,1.0,1.0) - * (gl_LightModel.ambient + gl_LightSource[0].ambient); - } else { - gl_FrontColor = vec4(1.0,1.0,1.0,1.0); - } - gl_Position = gl_ModelViewProjectionMatrix * vec4(rawpos,1.0); - flogz = 1.0 + gl_Position.w; -} diff --git a/Compositor/Shaders/ALS/building.vert b/Compositor/Shaders/ALS/building.vert deleted file mode 100644 index cd55ba1e9..000000000 --- a/Compositor/Shaders/ALS/building.vert +++ /dev/null @@ -1,283 +0,0 @@ -// -*-C++-*- -#version 120 -#extension GL_EXT_draw_instanced : enable - -// 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 - -attribute vec3 instancePosition; // (x,y,z) -attribute vec3 instanceScaleRotate; // (width, depth, height) -attribute vec3 rotPitchWtex0x; // (rotation, pitch height, texture x offset) -attribute vec3 wtex0yTex1xTex1y; // (wall texture y offset, wall/roof texture x gain, wall/roof texture y gain) -attribute vec3 rtex0xRtex0y; // (roof texture y offset, roof texture x gain, texture y gain) -attribute vec3 rooftopscale; // (rooftop x scale, rooftop y scale) - -// 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 vec3 relPos; - -//varying float earthShade; -//varying float yprime; -//varying float vertex_alt; -varying float yprime_alt; -varying float mie_angle; - -uniform int colorMode; -uniform float hazeLayerAltitude; -uniform float terminator; -uniform float terrain_alt; -uniform float avisibility; -uniform float visibility; -uniform float overcast; -//uniform float scattering; -uniform float ground_scattering; - -uniform bool use_IR_vision; - -// 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 earthShade; -//float mie_angle; - - -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_diffuse; - vec4 light_ambient; - - float yprime; - float lightArg; - float intensity; - float vertex_alt; - float scattering; - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - - // Determine the rotation for the building. - float sr = sin(6.28 * rotPitchWtex0x.x); - float cr = cos(6.28 * rotPitchWtex0x.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) * rooftopscale.x - 0.5); - position.y = (1.0 - gl_Color.z) * position.y + gl_Color.z * (position.y * rooftopscale.y); - - // Adjust pitch of roof to the correct height. These vertices are identified by gl_Color.z - // Scale down by the building height (instanceScaleRotate.z) because - // immediately afterwards we will scale UP the vertex to the correct scale. - position.z = position.z + gl_Color.z * rotPitchWtex0x.y / instanceScaleRotate.z; - position = position * instanceScaleRotate.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); - - // Texture coordinates are stored as: - // - a separate offset for the wall (wtex0x, wtex0y), and roof (rtex0x, rtex0y) - // - a shared gain value (tex1x, tex1y) - // - // The vertex color value selects between them, with glColor.x=1 indicating walls - // and glColor.y=1 indicating roofs. - // Finally, the roof texture is on the left of the texture sheet - vec2 tex0 = vec2(sign(gl_MultiTexCoord0.x) * (gl_Color.x*rotPitchWtex0x.z + gl_Color.y*rtex0xRtex0y.x), - gl_Color.x*wtex0yTex1xTex1y.x + gl_Color.y*rtex0xRtex0y.y); - gl_TexCoord[0].x = tex0.x + gl_MultiTexCoord0.x * wtex0yTex1xTex1y.y; - gl_TexCoord[0].y = tex0.y + gl_MultiTexCoord0.y * wtex0yTex1xTex1y.z; - - // Rotate the normal. - normal = gl_Normal; - normal.xy = vec2(dot(normal.xy, vec2(cr, sr)), dot(normal.xy, vec2(-sr, cr))); - normal = gl_NormalMatrix * normal; - - - vec4 ambient_color, diffuse_color; - if (colorMode == MODE_DIFFUSE) { - diffuse_color = vec4(1.0,1.0,1.0,1.0); - ambient_color = gl_FrontMaterial.ambient; - } else if (colorMode == MODE_AMBIENT_AND_DIFFUSE) { - diffuse_color = vec4(1.0,1.0,1.0,1.0); - ambient_color = vec4(1.0,1.0,1.0,1.0); - } 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 + gl_Color.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 + gl_Color.z,100.0); - scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_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.a = 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.4 + 0.6 * smoothstep(0.2, 0.5, earthShade)); - intensity = length(light_ambient.rgb); - light_ambient.rgb = intensity * normalize(mix(light_ambient.rgb, shadedFogColor, 1.0 -smoothstep(0.4, 0.8,earthShade) )); - - intensity = length(light_diffuse.rgb); - light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, 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 = vec4 (1.0, 1.0, 1.0, 1.0); - light_ambient = vec4 (0.33, 0.4, 0.5, 1.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_diffuse.a = 1.0; - - light_ambient.r = 0.316 + lightArg * 0.016; - 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; - } - - light_diffuse = light_diffuse * scattering; - yprime_alt = -sqrt(2.0 * EarthRadius * hazeLayerAltitude); -} - -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 - - diffuse_term = diffuse_color* light_diffuse; - vec4 constant_term = gl_FrontMaterial.emission + ambient_color * - (gl_LightModel.ambient + light_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 = 1.0; - // Another hack for supporting two-sided lighting without using - // gl_FrontFacing in the fragment shader. - gl_FrontColor.rgb = constant_term.rgb; - gl_BackColor.rgb = constant_term.rgb; - //gl_FrontColor.a = mie_angle; gl_BackColor.a = mie_angle; -} diff --git a/Compositor/Shaders/ALS/chute.vert b/Compositor/Shaders/ALS/chute.vert deleted file mode 100644 index 84857f6f1..000000000 --- a/Compositor/Shaders/ALS/chute.vert +++ /dev/null @@ -1,296 +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 vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; - -varying float yprime_alt; -varying float mie_angle; - -varying float flogz; - -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 moonlight; -uniform float chute_force; -uniform float chute_fold; -uniform float chute_bend; -uniform float chute_projection_z; -uniform float osg_SimulationTime; - - -// 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 earthShade; - -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_diffuse; - vec4 light_ambient; - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight; - - vec4 vertex = gl_Vertex; - - // wobble with wind - - float force_speedup = max(0.8, chute_force); - - float phi = asin(dot (vec2 (1.0, 0.0), normalize(vertex.xy))); - float wobble = 0.02 * sin(12.0*osg_SimulationTime) * sin(14.0 * phi); - wobble += 0.01 * sin(6.0*osg_SimulationTime) * sin(8.0 * phi); - - vertex.xy*= (1.0 + wobble * (1.0 - 0.5 * chute_fold)); - - float displace_x = vertex.z * sin(6.0*osg_SimulationTime * force_speedup) * 0.05; - float displace_y = vertex.z * cos(4.0*osg_SimulationTime * force_speedup) * 0.04; - - vertex.xy += vec2 (displace_x, displace_y) * (1.0 - chute_fold); - - // distort shape with force - - float force_gain; - float force_factor = abs(chute_force - 1.0); - - if (chute_force < 1.0) - {force_gain = 1.0 + 0.2 * force_factor;} - else - {force_gain = 1.0 - 0.2 * force_factor;} - - vertex.xy*= force_gain; - - vertex.z += 0.4 * (1./force_gain - 1.0) * max(vertex.z - chute_projection_z, 0.0); - - // fold - - vertex.z = chute_projection_z + (1.0 - 0.8* chute_fold) * (vertex.z - chute_projection_z); - - vertex.z += 0.5 * chute_fold * (0.5 * sin(2.0 * vertex.x + 1.0 * osg_SimulationTime) * cos(3.0 * vertex.y + 1.5 * osg_SimulationTime)); - - // and bend - - vertex.z -= vertex.x * vertex.x * 0.2 * chute_bend; - - - //float yprime_alt; - float yprime; - float lightArg; - float intensity; - float vertex_alt; - float scattering; - -// this code is copied from default.vert - - //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; - } - - - - // 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 = 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(vertex.z,100.0); - scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_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.a = 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.xyz); - - light_ambient.rgb = intensity * normalize(mix(light_ambient.rgb, 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.rgb = intensity * normalize(mix(light_diffuse.rgb, 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 = vec4 (1.0, 1.0, 1.0, 0.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_diffuse.a = 1.0; - - light_ambient.r = 0.316 + lightArg * 0.016; - 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; - } - - light_diffuse = light_diffuse * scattering; - yprime_alt = -sqrt(2.0 * EarthRadius * hazeLayerAltitude); -} - - -// default lighting based on texture and material using the light we have just computed - - diffuse_term = diffuse_color* light_diffuse; - vec4 constant_term = gl_FrontMaterial.emission + ambient_color * - (gl_LightModel.ambient + light_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; - gl_Position = gl_ModelViewProjectionMatrix * vertex; - // logarithmic depth - flogz = 1.0 + gl_Position.w; -} - - - - diff --git a/Compositor/Shaders/ALS/cliffs.frag b/Compositor/Shaders/ALS/cliffs.frag deleted file mode 100644 index 977a68619..000000000 --- a/Compositor/Shaders/ALS/cliffs.frag +++ /dev/null @@ -1,625 +0,0 @@ -// -*-C++-*- -#version 120 - -// adapted by James Hester 2018, based on rock-ALS.frag -// by Thorsten Renk. -// Ambient term comes in gl_Color.rgb. -varying vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; -varying vec2 rawPos; -varying vec3 worldPos; -varying vec3 ecViewdir; - - - -varying float steepness; -varying vec2 grad_dir; - -varying float flogz; - - -uniform float fg_Fcoef; - -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 dust_cover_factor; -uniform float lichen_cover_factor; -uniform float wetness; -uniform float fogstructure; -uniform float cloud_self_shading; -uniform float contrast; -uniform float air_pollution; -uniform float intrinsic_wetness; -uniform float transition_model; -uniform float overlay_bias; -uniform float crack_depth; -uniform float crack_pattern_stretch; -uniform float grain_fade_power; -uniform float rock_brightness; -uniform float overlay_alpha; -uniform float dust_resistance; -uniform float slopeline_strength; -uniform float landing_light1_offset; -uniform float landing_light2_offset; -uniform float landing_light3_offset; -uniform float osg_SimulationTime; - -uniform vec3 base_color; -uniform vec3 overlay_color; - -uniform int wind_effects; -uniform int cloud_shadow_flag; -uniform int rock_strata; -uniform int use_searchlight; -uniform int use_landing_light; -uniform int use_alt_landing_light; - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - -float alt; -float eShade; -float yprime_alt; -float mie_angle; - -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 SlopeLines2D(in vec2 coord, in vec2 gradDir, in float wavelength, in float steepness); -float Strata3D(in vec3 coord, in float wavelength, in float variation); -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 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 > 30.0) {return e;} -if (x < -15.0) {return 0.0;} - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - - -// a fade function for procedural scales which are smaller than a pixel - -float detail_fade (in float scale, in float angle, in float dist) -{ -float fade_dist = 2000.0 * scale * angle/max(pow(steepness,4.0), 0.1); - -return 1.0 - smoothstep(0.5 * fade_dist, fade_dist, dist); -} - - - -void main() -{ - - -yprime_alt = diffuse_term.a; -//diffuse_term.a = 1.0; -mie_angle = gl_Color.a; -float effective_scattering = min(scattering, cloud_self_shading); - -// distance to fragment -float dist = length(relPos); -// horizontal distance using texture coordinate -float horiz_coord = gl_TexCoord[0].s * 1000.0; -// angle of view vector with horizon -float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist; -// float altitude of fragment above base of cliff -float cliff_altitude = gl_TexCoord[0].t * 1000.0; - - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); -// this is taken from default.frag - vec3 n; - float NdotL, NdotHV, fogFactor; - vec4 color = gl_Color; - color.a = 1.0; - vec3 lightDir = gl_LightSource[0].position.xyz; - vec3 halfVector = normalize(normalize(lightDir) + normalize(ecViewdir)); - vec4 texel; - vec4 detail_texel; - vec4 mix_texel; - vec4 grain_texel; - vec4 dot_texel; - vec4 gradient_texel; - vec4 foam_texel; - vec4 fragColor; - vec4 specular = vec4(0.0); - float intensity; - - - -// Perlin noise, distance along cliff in texture coordinate instead of x,y - -float noise_100m = Noise2D(vec2(horiz_coord,cliff_altitude),100.0); -float noise_50m = Noise2D(vec2(horiz_coord,cliff_altitude), 50.0); -float noise_25m = Noise2D(vec2(horiz_coord,cliff_altitude), 25.0); -float noise_10m = Noise2D(vec2(horiz_coord,cliff_altitude), 10.0); -float noise_5m = Noise2D(vec2(horiz_coord,cliff_altitude) ,5.0); -float noise_2m = Noise2D(vec2(horiz_coord,cliff_altitude) ,2.0); -float noise_1m = Noise2D(vec2(horiz_coord,cliff_altitude) ,1.0); -float noise_05m = Noise2D(vec2(horiz_coord,cliff_altitude),0.5); -float noise_02m = Noise2D(vec2(horiz_coord,cliff_altitude),0.2); -float noise_01m = Noise2D(vec2(horiz_coord,cliff_altitude), 0.1); - -float noisegrad_10m; -float noisegrad_5m; -float noisegrad_2m; -float noisegrad_1m; -float noisegrad_05m; -float noisegrad_02m; -float noisegrad_01m; - - - - - -float noise_250m = Noise3D(worldPos.xyz,250.0); -float noise_500m = Noise3D(worldPos.xyz, 500.0); -float noise_1500m = Noise3D(worldPos.xyz, 1500.0); -float noise_2000m = Noise3D(worldPos.xyz, 2000.0); - -// dot noise - -float dotnoise_2m = 0.0; -float dotnoise_10m = 0.0; -float dotnoise_15m = 0.0; - -float dotnoisegrad_10m; - -// slope noise - -float slopenoise_50m = SlopeLines2D(rawPos, grad_dir, 50.0, steepness); -float slopenoise_100m = SlopeLines2D(rawPos, grad_dir, 100.0, steepness); - - - - - - -// get the texels - - float noise_term; - float local_autumn_factor; - - // we need to fade procedural structures when they get smaller than a single pixel, for this we need - // to know under what angle we see the surface - - float view_angle = abs(dot(normalize(normal), normalize(ecViewdir))); - - // strata noise - - float stratnoise_50m; - float stratnoise_10m; - - if (rock_strata==1) - { - stratnoise_50m = Strata3D(vec3 (rawPos.x, rawPos.y, cliff_altitude), 50.0, 0.2); - stratnoise_10m = Strata3D(vec3 (rawPos.x, rawPos.y, cliff_altitude), 10.0, 0.2); - stratnoise_50m = mix(stratnoise_50m, 1.0, smoothstep(0.8,0.9, steepness)); - stratnoise_10m = mix(stratnoise_10m, 1.0, smoothstep(0.8,0.9, steepness)); - texel *= (0.4 + 0.4 * stratnoise_50m + 0.2 * stratnoise_10m); - } - - - - - - - - // procedural rock texture generation - - texel.rgb = base_color; - - // use powers of Perlin noise to generate the base pattern - - float grainy_noise; - float fade_norm; - - float gfp = grain_fade_power; - float gfptmp; - - //grainy_noise = (0.5 * (1.0-slopenoise_100m) + 0.5 *noise_50m) + gfp * (0.5 * slopenoise_50m + 0.5 * noise_25m); - grainy_noise = (0.5 *noise_50m) + gfp * ( 0.5 * noise_25m); - fade_norm = 1.0+gfp; - - gfptmp = gfp * gfp; - grainy_noise += noise_10m * gfptmp * detail_fade(10.0, view_angle, dist) ; - fade_norm += gfptmp * detail_fade(10.0, view_angle, dist) ; - - gfptmp = gfptmp * gfp; - grainy_noise += noise_5m * gfptmp * detail_fade(5.0, view_angle, dist) ; - fade_norm += gfptmp * detail_fade(5.0, view_angle, dist) ; - - gfptmp = gfptmp * gfp; - grainy_noise += noise_2m * gfptmp * detail_fade(2.0, view_angle, dist) ; - fade_norm += gfptmp * detail_fade(2.0, view_angle, dist) ; - - gfptmp = gfptmp * gfp; - grainy_noise += noise_1m * gfptmp * detail_fade(1.0, view_angle, dist) ; - fade_norm += gfptmp * detail_fade(1.0, view_angle, dist) ; - - gfptmp = gfptmp * gfp; - grainy_noise += noise_05m * gfptmp * detail_fade(0.5, view_angle, dist) ; - fade_norm += gfptmp * detail_fade(0.5, view_angle, dist) ; - - grainy_noise = grainy_noise/fade_norm; - grainy_noise = smoothstep(-0.2, 1.2, grainy_noise); - - // generate the crack pattern from isovalue lines of stretched Perlin noise - - float cnoise_500m = Noise2D(vec2(horiz_coord+10.0, crack_pattern_stretch * cliff_altitude), 500.0); - float cnoise_250m = Noise2D(vec2(horiz_coord+10.0, crack_pattern_stretch * cliff_altitude), 250.0); - float cnoise_100m = Noise2D(vec2(horiz_coord+10.0, crack_pattern_stretch * cliff_altitude), 100.0); - float cnoise_50m = Noise2D(vec2(horiz_coord+10.0, crack_pattern_stretch * cliff_altitude), 50.0); - float cnoise_25m = Noise2D(vec2(horiz_coord+10.0, crack_pattern_stretch * cliff_altitude), 25.0); - float cnoise_10m = Noise2D(vec2(horiz_coord+10.0, crack_pattern_stretch * cliff_altitude), 10.0); - float cnoise_5m = Noise2D(vec2(horiz_coord+10.0, crack_pattern_stretch * cliff_altitude), 5.0); - float cnoise_2m = Noise2D(vec2(horiz_coord+10.0, crack_pattern_stretch * cliff_altitude), 2.0); - float cnoise_1m = Noise2D(vec2(horiz_coord+10.0, crack_pattern_stretch * cliff_altitude), 1.0); - - float crack_noise; - float crack_factor; - float crack_size; - float scrack_noise; - float scrack_size; - - crack_noise = cnoise_500m + 0.65 * cnoise_250m + 0.42 * cnoise_100m * detail_fade(50.0, view_angle, dist) ; - crack_noise = crack_noise + 0.27 * cnoise_50m * detail_fade(25.0, view_angle, dist) ; - crack_noise = crack_noise + 0.17 * cnoise_25m * detail_fade(10.0, view_angle, dist) ; - crack_noise = crack_noise + 0.11 * cnoise_10m * detail_fade(5.0, view_angle, dist) ; - crack_noise = 0.381 * crack_noise; - - - - scrack_noise = cnoise_10m + 0.65 * cnoise_5m * detail_fade(5.0, view_angle, dist); - scrack_noise = scrack_noise + 0.3 * cnoise_2m + 0.1 * cnoise_1m * detail_fade(1.0, view_angle, dist); - scrack_noise = 0.48 * scrack_noise; - - crack_size = 0.02 +0.00001 * dist; - crack_factor = smoothstep(0.5-crack_size,0.50,crack_noise) * (1.0-smoothstep(0.51,0.51+crack_size,crack_noise)); - //crack_factor = step(0.5-0.2*crack_size,crack_noise) * (1.0-step(0.5+0.2*crack_size,crack_noise)); - - crack_size *= 0.5; - crack_factor += smoothstep(0.42,0.42+crack_size,crack_noise) * (1.0-smoothstep(0.43,0.43+crack_size,crack_noise)); - - scrack_size = crack_size * 4.0; - crack_factor += 0.75 * smoothstep(0.5-scrack_size,0.50,scrack_noise) * (1.0-smoothstep(0.51,0.51+scrack_size,scrack_noise))* (1.0- smoothstep(250.0,1000.0,dist)); - - - crack_factor = crack_factor * min(1.0,0.03/crack_size); - - - -// distribution of overlay color - - - float overlay_noise; - float overlay_factor; - - overlay_noise = 0.381 * (noise_50m + 0.65 * noise_25m + 0.42 * noise_10m + 0.27 * noise_5m + 0.17 * noise_2m + 0.11 * noise_1m); - overlay_noise = overlay_noise + 0.1 * (smoothstep(0.8,0.9, steepness)); - - overlay_factor = smoothstep(0.7, 0.72, overlay_noise + overlay_bias) + (1.0 - smoothstep(0.2, 0.22, overlay_noise - overlay_bias)); - - - -// merge the noise components - - //grainy_noise = grainy_noise * (1.0-crack_depth * crack_factor) + 0.5 * crack_depth * crack_factor; - texel.rgb = ((1.0 - contrast) + contrast * grainy_noise ) * texel.rgb; - texel.rgb = mix(texel.rgb, overlay_color.rgb,overlay_alpha * overlay_factor); - texel.rgb = texel.rgb * ((1.0-crack_depth) +crack_depth*(1.0-crack_factor * (0.5 + 0.5 * noise_50m) )); - - texel.rgb = texel.rgb * rock_brightness; - - texel.rgb = texel.rgb * (1.0 + 0.4 * (noise_01m-0.5) * detail_fade(0.1, view_angle, dist)) ; - - -const vec4 dust_color = vec4 (0.76, 0.65, 0.45, 1.0); -const vec4 lichen_color = vec4 (0.17, 0.20, 0.06, 1.0); - -// mix vegetation -float gradient_factor = smoothstep(0.5, 1.0, steepness); -texel = mix(texel, lichen_color, gradient_factor * (0.4 * lichen_cover_factor + 0.8 * lichen_cover_factor * 0.5 * (noise_10m + (1.0 - noise_5m))) ); -// mix dust -texel = mix(texel, dust_color, clamp(0.5 * dust_cover_factor *dust_resistance + 3.0 * dust_cover_factor * dust_resistance *(((noise_1500m - 0.5) * 0.125)+0.125 ), 0.0, 1.0) ); - -// get distribution of water when terrain is wet - -float combined_wetness = min(1.0, wetness + intrinsic_wetness); -float water_threshold1; -float water_threshold2; -float water_factor =0.0; - - -if ((dist < 5000.0) && (combined_wetness>0.0)) - { - water_threshold1 = 1.0-0.5* combined_wetness; - water_threshold2 = 1.0 - 0.3 * combined_wetness; - water_factor = smoothstep(water_threshold1, water_threshold2 , (0.3 * (2.0 * (1.0-noise_10m) + (1.0 -noise_5m)) * (1.0 - smoothstep(2000.0, 5000.0, dist))) - 5.0 * (1.0 -steepness)); - } - -// darken wet terrain - - texel.rgb = texel.rgb * (1.0 - 0.6 * combined_wetness); - - - -// light computations - - - vec4 light_specular = gl_LightSource[0].specular; - - // 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 = normal; - n = normalize(n); - - NdotL = dot(n, lightDir); - - noisegrad_10m = (noise_10m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),10.0))/0.05; - noisegrad_5m = (noise_5m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),5.0))/0.05; - noisegrad_2m = (noise_2m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),2.0))/0.05; - noisegrad_1m = (noise_1m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),1.0))/0.05; - noisegrad_05m = (noise_05m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),0.5))/0.05; - - - dotnoisegrad_10m = 0.0; - - float fresnel; - - if (NdotL > 0.0) { - if (cloud_shadow_flag == 1) {NdotL = NdotL * shadow_func(relPos.x, relPos.y, 0.3 * noise_250m + 0.5 * noise_500m+0.2 * noise_1500m, dist);} - color += diffuse_term * NdotL; - NdotHV = max(dot(n, halfVector), 0.0); - - fresnel = 1.0 + 5.0 * (1.0-smoothstep(0.0,0.2, dot(normalize(ecViewdir),n))); - - //if (gl_FrontMaterial.shininess > 0.0) - specular.rgb = ((gl_FrontMaterial.specular.rgb * 0.1 + (water_factor * vec3 (1.0, 1.0, 1.0))) - * light_specular.rgb - * pow(NdotHV, max(gl_FrontMaterial.shininess,4.0) + (20.0 * water_factor))); - } - color.a = 1.0;//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); - - 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); - } - color.rgb +=secondary_light * light_distance_fading(dist); - - - fragColor = color * texel + specular; - -float lightArg = (terminator-yprime_alt)/100000.0; -vec3 hazeColor = get_hazeColor(lightArg); - - - -// Rayleigh color shift due to out-scattering - 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); - fragColor.rgb = rayleigh_out_shift(fragColor.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); - fragColor.rgb = mix(fragColor.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; - - - - -// 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; - } - } - -// blur of the haze layer edge - -float blur_thickness = 50.0; -float cphi = dot(vec3(0.0, 1.0, 0.0), relPos)/dist; -float ctlayer = delta_z/dist-0.01 + 0.02 * Noise2D(vec2(cphi,1.0),0.1) -0.01; -float ctblur = 0.035 ; - -float blur_dist; - -if (abs(delta_z) < 400.0) - { - blur_dist = dist * (1.0-smoothstep(0.0,300.0,-delta_z)) * smoothstep(-400.0,-200.0, -delta_z); - blur_dist = blur_dist * smoothstep(ctlayer-4.0*ctblur, ctlayer-ctblur, ct) * (1.0-smoothstep(ctlayer+0.5*ctblur, ctlayer+ctblur, ct)); - distance_in_layer = max(distance_in_layer, blur_dist); - } - - -// 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) - { - transmission_arg = transmission_arg + (distance_in_layer/(1.0 * visibility + 1.0 * visibility * fogstructure * 0.06 * (noise_1500m + noise_2000m -1.0) )); - // this combines the Weber-Fechner intensity - eqColorFactor = 1.0 - 0.1 * delta_zv/visibility - (1.0 - effective_scattering); - } -else - { - transmission_arg = transmission_arg + (distance_in_layer/(1.0 * avisibility + 1.0 * avisibility * fogstructure * 0.06 * (noise_1500m + noise_2000m - 1.0) )); - // 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 -{ - - - // 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(n,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.rgb *= eqColorFactor * eShade; -hazeColor.rgb = max(hazeColor.rgb, minLight.rgb); - - -fragColor.rgb = mix(hazeColor + secondary_light * fog_backscatter(mvisibility), fragColor.rgb,transmission); - -} - -fragColor.rgb = filter_combined(fragColor.rgb); - -gl_FragColor = fragColor; -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; - -} - diff --git a/Compositor/Shaders/ALS/cloud-impostor.vert b/Compositor/Shaders/ALS/cloud-impostor.vert deleted file mode 100644 index 72ac337dc..000000000 --- a/Compositor/Shaders/ALS/cloud-impostor.vert +++ /dev/null @@ -1,139 +0,0 @@ -// -*-C++-*- -#version 120 - -varying float fogFactor; -varying vec3 hazeColor; - -varying float flogz; - -uniform float terminator; -uniform float altitude; -uniform float cloud_self_shading; -uniform float moonlight; -uniform float air_pollution; -uniform float range; -uniform float visibility; - -const float shade = 1.0; -const float cloud_height = 1000.0; -const float EarthRadius = 5800000.0; - -vec3 moonlight_perception (in vec3 light); - -// light_func is a generalized logistic function fit to the light intensity as a function -// of scaled terminator position obtained from Flightgear core - -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 > 30.0) {return e;} -if (x < -15.0) {return 0.03;} - - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - -void main(void) -{ - - vec3 shadedFogColor = vec3 (0.55, 0.67, 0.88); - vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight; - moonLightColor = moonlight_perception (moonLightColor); - - 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); - - gl_Position = vec4(0.0, 0.0, 0.0, 1.0); - gl_Position.x = gl_Vertex.x; - gl_Position.y += gl_Vertex.y; - gl_Position.z += gl_Vertex.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); - - vec3 relVector = gl_Position.xyz - ep.xyz; - gl_Position = gl_ModelViewProjectionMatrix * gl_Position; - // logarithmic depth - flogz = 1.0 + gl_Position.w; - - // Light at the final position - - // first obtain normal 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, corrected for altitude - //float vertex_alt = max(altitude * 0.30480 + relVector.z,100.0); - float vertex_alt = altitude + relVector.z; - float yprime = -dot(relVector, lightHorizon); - float yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt); - - // compute the light at the position - vec4 light_diffuse; - - float lightArg = (terminator-yprime_alt)/100000.0; - - light_diffuse.b = light_func(lightArg -1.2 * air_pollution, 1.330e-05, 0.264, 2.227, 1.08e-05, 1.0); - light_diffuse.g = light_func(lightArg -0.6 * air_pollution, 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.a = 1.0; - - - // two times terminator width governs how quickly light fades into shadow - float terminator_width = 200000.0; - float earthShade = 0.9 * smoothstep(terminator_width+ terminator, -terminator_width + terminator, yprime_alt) + 0.1; - - float intensity = (1.0 - (0.8 * (1.0 - earthShade))) * length(light_diffuse.rgb); - - light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, (1.0 - smoothstep(0.5,0.9, cloud_self_shading )))); - if (earthShade < 0.6) - { - intensity = length(light_diffuse.rgb); - light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.6,earthShade ) )); - } - - - - gl_FrontColor = light_diffuse; - - - // 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(100.0, 250.0, fogCoord), 1.0 - smoothstep(0.9 * range, range, fogCoord)); - - - - gl_FrontColor.a = gl_FrontColor.a * (1.0 - smoothstep(visibility, 3.0* visibility, fogCoord)); - - // Fog doesn't affect rain as much as other objects. - -float fadeScale = 0.05 + 0.2 * log(fogCoord/1000.0); - if (fadeScale < 0.05) fadeScale = 0.05; - fogFactor = exp( -gl_Fog.density * 0.5* fogCoord * fadeScale); - - hazeColor = light_diffuse.rgb; - hazeColor.r = hazeColor.r * 0.83; - hazeColor.g = hazeColor.g * 0.9; - - - - - gl_FrontColor.rgb = gl_FrontColor.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade)); - hazeColor.rgb = hazeColor.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade)); - gl_BackColor = gl_FrontColor; - -} diff --git a/Compositor/Shaders/ALS/cloud-noctilucent.vert b/Compositor/Shaders/ALS/cloud-noctilucent.vert deleted file mode 100644 index 4441e69ba..000000000 --- a/Compositor/Shaders/ALS/cloud-noctilucent.vert +++ /dev/null @@ -1,148 +0,0 @@ -// -*-C++-*- -#version 120 - -varying float fogFactor; -varying vec3 hazeColor; - -varying float flogz; - -uniform float terminator; -uniform float altitude; -uniform float cloud_self_shading; -uniform float moonlight; - -const float shade = 1.0; -const float cloud_height = 1000.0; -const float EarthRadius = 5800000.0; - -vec3 moonlight_perception (in vec3 light); - -// light_func is a generalized logistic function fit to the light intensity as a function -// of scaled terminator position obtained from Flightgear core - -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 > 30.0) {return e;} -if (x < -15.0) {return 0.03;} - - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - -void main(void) -{ - - vec3 shadedFogColor = vec3 (0.55, 0.67, 0.88); - vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight; - moonLightColor = moonlight_perception (moonLightColor); - - 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); - - gl_Position = vec4(0.0, 0.0, 0.0, 1.0); - gl_Position.x = gl_Vertex.x; - gl_Position.y += gl_Vertex.y; - gl_Position.z += gl_Vertex.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); - - vec3 relVector = gl_Position.xyz - ep.xyz; - gl_Position = gl_ModelViewProjectionMatrix * gl_Position; - // logarithmic depth - flogz = 1.0 + gl_Position.w; - - // Light at the final position - - // first obtain normal 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, corrected for altitude - //float vertex_alt = max(altitude * 0.30480 + relVector.z,100.0); - float vertex_alt = altitude + relVector.z; - float yprime = -dot(relVector, lightHorizon); - float yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt); - - // compute the light at the position - //vec4 light_diffuse; - - float lightArg = (terminator-yprime_alt)/100000.0; - - //light_diffuse.b = light_func(lightArg, 1.330e-05, 0.264, 2.227, 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.a = 1.0; - - float light_intensity = light_func(lightArg, 8.305e-06, 0.161, 3.827, 3.04e-05, 1.0); - vec4 light_diffuse = vec4 (0.57, 0.57, 0.9, 1.0); - light_diffuse.rgb = light_intensity * light_diffuse.rgb; - - float intensity = length(light_diffuse.rgb); - //light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, (1.0 - smoothstep(0.5,0.9, cloud_self_shading )))); - -// 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 = light_diffuse * shade; - - gl_FrontColor = mix(backlight, light_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 = 0.2 * min(smoothstep(100.0, 250.0, fogCoord), 1.0 - smoothstep(250000.0, 300000.0, fogCoord)); - // During the day, noctilucent clouds are invisible - gl_FrontColor.a = gl_FrontColor.a * (1.0 - smoothstep(4.0,8.0,lightArg)); - - - // Fog doesn't affect rain as much as other objects. - //fogFactor = exp( -gl_Fog.density * fogCoord * 0.4); - //fogFactor = clamp(fogFactor, 0.0, 1.0); - -float fadeScale = 0.05 + 0.2 * log(fogCoord/1000.0); - if (fadeScale < 0.05) fadeScale = 0.05; - fogFactor = exp( -gl_Fog.density * fogCoord * fadeScale); - - hazeColor = light_diffuse.rgb; - hazeColor.r = hazeColor.r * 0.83; - hazeColor.g = hazeColor.g * 0.9; - - // in sunset or sunrise conditions, do extra shading of clouds - - - - // two times terminator width governs how quickly light fades into shadow - float terminator_width = 200000.0; - - // now dim the light - float earthShade = 0.9 * smoothstep(terminator_width+ terminator, -terminator_width + terminator, yprime_alt) + 0.1; - - if (earthShade < 0.8) - { - intensity = length(light_diffuse.rgb); - gl_FrontColor.rgb = intensity * normalize(mix(gl_FrontColor.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.8,earthShade ) )); - } - - hazeColor = hazeColor * earthShade; - gl_FrontColor.rgb = gl_FrontColor.rgb * earthShade; - gl_FrontColor.rgb = gl_FrontColor.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade)); - hazeColor.rgb = hazeColor.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade)); - gl_BackColor = gl_FrontColor; - -} diff --git a/Compositor/Shaders/ALS/cloud-shadowfunc.frag b/Compositor/Shaders/ALS/cloud-shadowfunc.frag deleted file mode 100644 index 303472fa3..000000000 --- a/Compositor/Shaders/ALS/cloud-shadowfunc.frag +++ /dev/null @@ -1,156 +0,0 @@ -#version 120 -uniform float cloudpos1_x; -uniform float cloudpos1_y; -uniform float cloudpos2_x; -uniform float cloudpos2_y; -uniform float cloudpos3_x; -uniform float cloudpos3_y; -uniform float cloudpos4_x; -uniform float cloudpos4_y; -uniform float cloudpos5_x; -uniform float cloudpos5_y; -uniform float cloudpos6_x; -uniform float cloudpos6_y; -uniform float cloudpos7_x; -uniform float cloudpos7_y; -uniform float cloudpos8_x; -uniform float cloudpos8_y; -uniform float cloudpos9_x; -uniform float cloudpos9_y; -uniform float cloudpos10_x; -uniform float cloudpos10_y; -uniform float cloudpos11_x; -uniform float cloudpos11_y; -uniform float cloudpos12_x; -uniform float cloudpos12_y; -uniform float cloudpos13_x; -uniform float cloudpos13_y; -uniform float cloudpos14_x; -uniform float cloudpos14_y; -uniform float cloudpos15_x; -uniform float cloudpos15_y; -uniform float cloudpos16_x; -uniform float cloudpos16_y; -uniform float cloudpos17_x; -uniform float cloudpos17_y; -uniform float cloudpos18_x; -uniform float cloudpos18_y; -uniform float cloudpos19_x; -uniform float cloudpos19_y; -uniform float cloudpos20_x; -uniform float cloudpos20_y; - -uniform float cloudpos_n_x; -uniform float cloudpos_n_y; - -float shadow_func (in float x, in float y, in float noise, in float dist) -{ - -if (dist > 30000.0) {return 1.0;} - -float width = fract((cloudpos1_x)) * 5000.0; -float strength = fract((cloudpos1_y)); - - -float dlength = length( vec2 (x - cloudpos1_x, y - cloudpos1_y)); -float shadeValue = strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos2_x, y - cloudpos2_y)); -width = fract((cloudpos2_x)) * 5000.0; strength = fract((cloudpos2_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos3_x, y - cloudpos3_y)); -width = fract((cloudpos3_x)) * 5000.0; strength = fract((cloudpos3_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos4_x, y - cloudpos4_y)); -width = fract((cloudpos4_x)) * 5000.0; strength = fract((cloudpos4_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos5_x, y - cloudpos5_y)); -width = fract((cloudpos5_x)) * 5000.0; strength = fract((cloudpos5_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos6_x, y - cloudpos6_y)); -width = fract((cloudpos6_x)) * 5000.0; strength = fract((cloudpos6_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos7_x, y - cloudpos7_y)); -width = fract((cloudpos7_x)) * 5000.0; strength = fract((cloudpos7_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos8_x, y - cloudpos8_y)); -width = fract((cloudpos8_x)) * 5000.0; strength = fract((cloudpos8_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos9_x, y - cloudpos9_y)); -width = fract((cloudpos9_x)) * 5000.0; strength = fract((cloudpos9_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos10_x, y - cloudpos10_y)); -width = fract((cloudpos10_x)) * 5000.0; strength = fract((cloudpos10_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos11_x, y - cloudpos11_y)); -width = fract((cloudpos11_x)) * 5000.0; strength = fract((cloudpos11_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos12_x, y - cloudpos12_y)); -width = fract((cloudpos12_x)) * 5000.0; strength = fract((cloudpos12_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos13_x, y - cloudpos13_y)); -width = fract((cloudpos13_x)) * 5000.0; strength = fract((cloudpos13_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos14_x, y - cloudpos14_y)); -width = fract((cloudpos14_x)) * 5000.0; strength = fract((cloudpos14_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos15_x, y - cloudpos15_y)); -width = fract((cloudpos15_x)) * 5000.0; strength = fract((cloudpos15_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos16_x, y - cloudpos16_y)); -width = fract((cloudpos16_x)) * 5000.0; strength = fract((cloudpos16_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos17_x, y - cloudpos17_y)); -width = fract((cloudpos17_x)) * 5000.0; strength = fract((cloudpos17_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos18_x, y - cloudpos18_y)); -width = fract((cloudpos18_x)) * 5000.0; strength = fract((cloudpos18_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos19_x, y - cloudpos19_y)); -width = fract((cloudpos19_x)) * 5000.0; strength = fract((cloudpos19_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -dlength = length ( vec2 (x - cloudpos20_x, y - cloudpos20_y)); -width = fract((cloudpos20_x)) * 5000.0; strength = fract((cloudpos20_y)); -shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -shadeValue = shadeValue * (0.8 + 2.0 * shadeValue * smoothstep(0.4,0.6,noise)); -shadeValue = clamp(shadeValue,0.0,1.0); -shadeValue = shadeValue * (1.0 - smoothstep(15000.0, 30000.0,dist)); - -return 1.0 - shadeValue; - -} - - -float shadow_func_nearest (in float x, in float y, in float noise, in float dist) -{ - -if (dist > 6000.0) {return 1.0;} - -float width = fract((cloudpos_n_x)) * 5000.0; -float strength = fract((cloudpos_n_y)); - - -float dlength = length( vec2 (x - cloudpos_n_x, y - cloudpos_n_y)); -float shadeValue = strength * (1.0-smoothstep(width * 0.5, width, dlength)); - -return 1.0 - shadeValue; -} diff --git a/Compositor/Shaders/ALS/cloud-static-detailed.frag b/Compositor/Shaders/ALS/cloud-static-detailed.frag deleted file mode 100644 index f8c023822..000000000 --- a/Compositor/Shaders/ALS/cloud-static-detailed.frag +++ /dev/null @@ -1,65 +0,0 @@ -// -*-C++-*- -#version 120 - -uniform float fg_Fcoef; - -uniform sampler2D baseTexture; - -uniform float ring_factor; -uniform float rainbow_factor; - -varying float fogFactor; -varying float mie_frag; -varying float eShade; - -varying vec3 hazeColor; - -varying float flogz; - -vec3 filter_combined (in vec3 color) ; - -void main(void) -{ - vec4 base = texture2D( baseTexture, gl_TexCoord[0].st); - - float fwd_enhancement = smoothstep(0.8, 1.0, mie_frag) * eShade; - float light_intensity = length(gl_Color.rgb)/1.76; - - - //22 deg ring - - float halo_ring_enhancement = smoothstep (0.88, 0.927, mie_frag) * (1.0 - smoothstep(0.927, 0.94, mie_frag)) * eShade * 1.5 * ring_factor; - - - float halo_ring_enhancement_b = smoothstep (0.88, 0.90, mie_frag) * (1.0 - smoothstep(0.90, 0.92, mie_frag)) * eShade * ring_factor; - float halo_ring_enhancement_r = smoothstep (0.91, 0.93, mie_frag) * (1.0 - smoothstep(0.93, 0.955, mie_frag)) * eShade * ring_factor; - - - vec4 finalColor = base * gl_Color; - - float reduction = 0.16 * light_intensity * rainbow_factor; - - finalColor.g *= (1.0 - reduction * halo_ring_enhancement_r); - finalColor.b *= (1.0 - reduction * halo_ring_enhancement_r); - - finalColor.r *= (1.0 - reduction * halo_ring_enhancement_b); - finalColor.g *= (1.0 - reduction * halo_ring_enhancement_b); - - fwd_enhancement *=(1.0-smoothstep(0.8, 1.0, light_intensity)); - finalColor.rgb *= (1.0 + fwd_enhancement) * (1.0 + 0.5 * halo_ring_enhancement * (1.0-smoothstep(0.8, 1.0, light_intensity))) ; - finalColor.a *= (1.0 + 0.5 * halo_ring_enhancement); - - - - finalColor.rgb = clamp(finalColor.rgb, 0.0, 1.0); - finalColor.a = clamp(finalColor.a, 0.0, 1.0); - - vec4 fragColor = vec4 (mix(hazeColor, finalColor.rgb, fogFactor ), mix(0.0, finalColor.a, 1.0 - 0.5 * (1.0 - fogFactor))); - - - fragColor.rgb = filter_combined(fragColor.rgb); - //fragColor.rgb = vec3 (1.0, 0.0, 0.0); - gl_FragColor = fragColor; - // logarithmic depth - gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; -} diff --git a/Compositor/Shaders/ALS/cloud-static-detailed.vert b/Compositor/Shaders/ALS/cloud-static-detailed.vert deleted file mode 100644 index 78693204d..000000000 --- a/Compositor/Shaders/ALS/cloud-static-detailed.vert +++ /dev/null @@ -1,146 +0,0 @@ -// -*-C++-*- -#version 120 - -varying float fogFactor; -varying float mie_frag; -varying float eShade; -varying vec3 hazeColor; - -varying float flogz; - -uniform float terminator; -uniform float altitude; -uniform float cloud_self_shading; -uniform float moonlight; - -const float shade = 1.0; -const float cloud_height = 1000.0; -const float EarthRadius = 5800000.0; - -// light_func is a generalized logistic function fit to the light intensity as a function -// of scaled terminator position obtained from Flightgear core - -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 > 30.0) {return e;} -if (x < -15.0) {return 0.03;} - - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - -void main(void) -{ - - vec3 shadedFogColor = vec3 (0.55, 0.67, 0.88); - vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight; - - 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); - - gl_Position = vec4(0.0, 0.0, 0.0, 1.0); - gl_Position.x = gl_Vertex.x; - gl_Position.y += gl_Vertex.y; - gl_Position.z += gl_Vertex.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); - - vec3 relVector = gl_Position.xyz - ep.xyz; - gl_Position = gl_ModelViewProjectionMatrix * gl_Position; - // logarithmic depth - flogz = 1.0 + gl_Position.w; - - // Light at the final position - - // first obtain normal to sun position - - vec3 lightFull = (gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz; - vec3 lightHorizon = normalize(vec3(lightFull.x,lightFull.y, 0.0)); - - - mie_frag = dot(normalize(lightFull), normalize(relVector)); - - - // yprime is the distance of the vertex into sun direction, corrected for altitude - //float vertex_alt = max(altitude * 0.30480 + relVector.z,100.0); - float vertex_alt = altitude + relVector.z; - float yprime = -dot(relVector, lightHorizon); - float yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt); - - // compute the light at the position - vec4 light_diffuse; - - float lightArg = (terminator-yprime_alt)/100000.0; - - light_diffuse.b = light_func(lightArg, 1.330e-05, 0.264, 2.227, 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.a = 1.0; - - float intensity = length(light_diffuse.rgb); - light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, (1.0 - smoothstep(0.5,0.9, cloud_self_shading )))); - -// 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 = light_diffuse * shade; - - gl_FrontColor = mix(backlight, light_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(100.0, 250.0, fogCoord), 1.0 - smoothstep(70000.0, 75000.0, fogCoord)); - - // Fog doesn't affect rain as much as other objects. - //fogFactor = exp( -gl_Fog.density * fogCoord * 0.4); - //fogFactor = clamp(fogFactor, 0.0, 1.0); - -float fadeScale = 0.05 + 0.2 * log(fogCoord/1000.0); - if (fadeScale < 0.05) fadeScale = 0.05; - fogFactor = exp( -gl_Fog.density * fogCoord * fadeScale); - - hazeColor = light_diffuse.rgb; - hazeColor.r = hazeColor.r * 0.83; - hazeColor.g = hazeColor.g * 0.9; - - // in sunset or sunrise conditions, do extra shading of clouds - - - - // two times terminator width governs how quickly light fades into shadow - float terminator_width = 200000.0; - - // now dim the light - float earthShade = 0.9 * smoothstep(terminator_width+ terminator, -terminator_width + terminator, yprime_alt) + 0.1; - - eShade = earthShade; - - if (earthShade < 0.8) - { - intensity = length(light_diffuse.rgb); - gl_FrontColor.rgb = intensity * normalize(mix(gl_FrontColor.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.8,earthShade ) )); - } - - hazeColor = hazeColor * earthShade; - gl_FrontColor.rgb = gl_FrontColor.rgb * earthShade; - gl_FrontColor.rgb = gl_FrontColor.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade)); - hazeColor.rgb = hazeColor.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade)); - gl_BackColor = gl_FrontColor; - -} diff --git a/Compositor/Shaders/ALS/cloud-static.frag b/Compositor/Shaders/ALS/cloud-static.frag deleted file mode 100644 index 23994cf72..000000000 --- a/Compositor/Shaders/ALS/cloud-static.frag +++ /dev/null @@ -1,26 +0,0 @@ -#version 120 - -uniform float fg_Fcoef; - -uniform sampler2D baseTexture; -varying float fogFactor; - -varying vec3 hazeColor; - -varying float flogz; - -vec3 filter_combined (in vec3 color) ; - -void main(void) -{ - vec4 base = texture2D( baseTexture, gl_TexCoord[0].st); - vec4 finalColor = base * gl_Color; - - vec4 fragColor = vec4 (mix(hazeColor, finalColor.rgb, fogFactor ), mix(0.0, finalColor.a, 1.0 - 0.5 * (1.0 - fogFactor))); - - - fragColor.rgb = filter_combined(fragColor.rgb); - gl_FragColor = fragColor; - // logarithmic depth - gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; -} diff --git a/Compositor/Shaders/ALS/cloud-static.vert b/Compositor/Shaders/ALS/cloud-static.vert deleted file mode 100644 index 453b7bbfd..000000000 --- a/Compositor/Shaders/ALS/cloud-static.vert +++ /dev/null @@ -1,141 +0,0 @@ -// -*-C++-*- -#version 120 - -varying float fogFactor; -varying vec3 hazeColor; - -varying float flogz; - -uniform float terminator; -uniform float altitude; -uniform float cloud_self_shading; -uniform float moonlight; - -const float shade = 1.0; -const float cloud_height = 1000.0; -const float EarthRadius = 5800000.0; - -vec3 moonlight_perception (in vec3 light); - -// light_func is a generalized logistic function fit to the light intensity as a function -// of scaled terminator position obtained from Flightgear core - -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 > 30.0) {return e;} -if (x < -15.0) {return 0.03;} - - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - -void main(void) -{ - - vec3 shadedFogColor = vec3 (0.55, 0.67, 0.88); - vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight; - moonLightColor = moonlight_perception (moonLightColor); - - 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); - - gl_Position = vec4(0.0, 0.0, 0.0, 1.0); - gl_Position.x = gl_Vertex.x; - gl_Position.y += gl_Vertex.y; - gl_Position.z += gl_Vertex.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); - - vec3 relVector = gl_Position.xyz - ep.xyz; - gl_Position = gl_ModelViewProjectionMatrix * gl_Position; - // logarithmic depth - flogz = 1.0 + gl_Position.w; - - // Light at the final position - - // first obtain normal 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, corrected for altitude - //float vertex_alt = max(altitude * 0.30480 + relVector.z,100.0); - float vertex_alt = altitude + relVector.z; - float yprime = -dot(relVector, lightHorizon); - float yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt); - - // compute the light at the position - vec4 light_diffuse; - - float lightArg = (terminator-yprime_alt)/100000.0; - - light_diffuse.b = light_func(lightArg, 1.330e-05, 0.264, 2.227, 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.a = 1.0; - - float intensity = length(light_diffuse.rgb); - light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, (1.0 - smoothstep(0.5,0.9, cloud_self_shading )))); - -// 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 = light_diffuse * shade; - - gl_FrontColor = mix(backlight, light_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(100.0, 250.0, fogCoord), 1.0 - smoothstep(70000.0, 75000.0, fogCoord)); - - // Fog doesn't affect rain as much as other objects. - //fogFactor = exp( -gl_Fog.density * fogCoord * 0.4); - //fogFactor = clamp(fogFactor, 0.0, 1.0); - -float fadeScale = 0.05 + 0.2 * log(fogCoord/1000.0); - if (fadeScale < 0.05) fadeScale = 0.05; - fogFactor = exp( -gl_Fog.density * fogCoord * fadeScale); - - hazeColor = light_diffuse.rgb; - hazeColor.r = hazeColor.r * 0.83; - hazeColor.g = hazeColor.g * 0.9; - - // in sunset or sunrise conditions, do extra shading of clouds - - - - // two times terminator width governs how quickly light fades into shadow - float terminator_width = 200000.0; - - // now dim the light - float earthShade = 0.9 * smoothstep(terminator_width+ terminator, -terminator_width + terminator, yprime_alt) + 0.1; - - if (earthShade < 0.8) - { - intensity = length(light_diffuse.rgb); - gl_FrontColor.rgb = intensity * normalize(mix(gl_FrontColor.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.8,earthShade ) )); - } - - hazeColor = hazeColor * earthShade; - gl_FrontColor.rgb = gl_FrontColor.rgb * earthShade; - gl_FrontColor.rgb = gl_FrontColor.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade)); - hazeColor.rgb = hazeColor.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade)); - gl_BackColor = gl_FrontColor; - -} diff --git a/Compositor/Shaders/ALS/clustered-include.frag b/Compositor/Shaders/ALS/clustered-include.frag deleted file mode 100644 index c94084bda..000000000 --- a/Compositor/Shaders/ALS/clustered-include.frag +++ /dev/null @@ -1,133 +0,0 @@ -#version 140 - -uniform usampler3D fg_ClusteredLightGrid; -uniform usamplerBuffer fg_ClusteredLightIndices; -uniform int fg_ClusteredTileSize; -uniform float fg_ClusteredSliceScale; -uniform float fg_ClusteredSliceBias; - -const bool debug = true; -const float shininess = 16.0; - -struct PointLight { - vec4 position; - vec4 ambient; - vec4 diffuse; - vec4 specular; - vec4 attenuation; -}; - -struct SpotLight { - vec4 position; - vec4 direction; - vec4 ambient; - vec4 diffuse; - vec4 specular; - vec4 attenuation; - float cos_cutoff; - float exponent; -}; - -layout (std140) uniform PointLightBlock { - PointLight pointLights[256]; -}; -layout (std140) uniform SpotLightBlock { - SpotLight spotLights[256]; -}; - - -vec3 addColors(vec3 a, vec3 b) -{ - return 0.14 * log(exp(a/0.14) + exp(b/0.14) - vec3(1.0)); -} - -// @param p Fragment position in view space. -// @param n Fragment normal in view space. -vec3 addClusteredLightsContribution(vec3 inputColor, vec3 p, vec3 n) -{ - int slice = int(max(log2(-p.z) * fg_ClusteredSliceScale - + fg_ClusteredSliceBias, 0.0)); - ivec3 clusterCoord = ivec3(gl_FragCoord.xy / fg_ClusteredTileSize, slice); - uvec3 cluster = texelFetch(fg_ClusteredLightGrid, - clusterCoord, - 0).rgb; - uint startIndex = cluster.r; - uint pointCount = cluster.g; - uint spotCount = cluster.b; - - vec3 color = vec3(0.0); - - for (uint i = uint(0); i < pointCount; ++i) { - uint lightListIndex = texelFetch(fg_ClusteredLightIndices, - int(startIndex + i)).r; - PointLight light = pointLights[lightListIndex]; - - float range = light.attenuation.w; - vec3 toLight = light.position.xyz - p; - // Ignore fragments outside the light volume - if (dot(toLight, toLight) > (range * range)) - continue; - - //////////////////////////////////////////////////////////////////////// - // Actual lighting - - float d = length(toLight); - float att = 1.0 / (light.attenuation.x // constant - + light.attenuation.y * d // linear - + light.attenuation.z * d * d); // quadratic - vec3 lightDir = normalize(toLight); - float NdotL = max(dot(n, lightDir), 0.0); - - vec3 Iamb = light.ambient.rgb; - vec3 Idiff = light.diffuse.rgb * NdotL; - vec3 Ispec = vec3(0.0); - - if (NdotL > 0.0) { - vec3 halfVector = normalize(lightDir + normalize(-p)); - float NdotHV = max(dot(n, halfVector), 0.0); - Ispec = light.specular.rgb * att * pow(NdotHV, shininess); - } - - color += addColors(color, (Iamb + Idiff + Ispec) * att); - } - - for (uint i = uint(0); i < spotCount; ++i) { - uint lightListIndex = texelFetch(fg_ClusteredLightIndices, - int(startIndex + i)).r; - SpotLight light = spotLights[lightListIndex]; - - vec3 toLight = light.position.xyz - p; - - //////////////////////////////////////////////////////////////////////// - // Actual lighting - - float d = length(toLight); - float att = 1.0 / (light.attenuation.x // constant - + light.attenuation.y * d // linear - + light.attenuation.z * d * d); // quadratic - - vec3 lightDir = normalize(toLight); - - float spotDot = dot(-lightDir, light.direction.xyz); - if (spotDot < light.cos_cutoff) - continue; - - att *= pow(spotDot, light.exponent); - - float NdotL = max(dot(n, lightDir), 0.0); - - vec3 Iamb = light.ambient.rgb; - vec3 Idiff = light.diffuse.rgb * NdotL; - vec3 Ispec = vec3(0.0); - - if (NdotL > 0.0) { - vec3 halfVector = normalize(lightDir + normalize(-p)); - float NdotHV = max(dot(n, halfVector), 0.0); - Ispec = light.specular.rgb * att * pow(NdotHV, shininess); - } - - color += (Iamb + Idiff + Ispec) * att; - } - - return clamp(color + inputColor, 0.0, 1.0); -} diff --git a/Compositor/Shaders/ALS/color_temperature.frag b/Compositor/Shaders/ALS/color_temperature.frag deleted file mode 100755 index d9a81c05a..000000000 --- a/Compositor/Shaders/ALS/color_temperature.frag +++ /dev/null @@ -1,51 +0,0 @@ -// -*-C++-*- -#version 120 - - -vec4 color_temperature (in float T) -{ -T *=0.01; - -float red; -float green; -float blue; -float alpha; - -red = 1.0; - -if (T<66.0) - { - red = 255.0; - green = T; - green = 99.4708025 * log(green) - 161.11956; - - if (T <=19) - {blue = 0.0;} - else - { - blue = T-10; - blue = 138.517731 * log(blue) - 305.044792; - } - - - } -else - { - red = T - 60.0; - red = 329.6987 * pow(red, -0.1332047); - - green = T - 60.0; - green = 288.122169 * pow(green, -0.075514); - - blue = 255.0; - } - -alpha = 0.8 * smoothstep(5.0, 15.0, T); - -vec3 color = vec3 (red, green, blue); -color /= 255.0; - -color = clamp(color, 0.0, 1.0); - -return vec4 (color, alpha); -} diff --git a/Compositor/Shaders/ALS/drunway.frag b/Compositor/Shaders/ALS/drunway.frag deleted file mode 100644 index f855cbe35..000000000 --- a/Compositor/Shaders/ALS/drunway.frag +++ /dev/null @@ -1,509 +0,0 @@ -// -*-C++-*- -#version 120 - -// written by Thorsten Renk, Oct 2011, based on default.frag -// Ambient term comes in gl_Color.rgb. -varying vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; -varying vec2 rawPos; -varying vec3 ecViewdir; - - -uniform float fg_Fcoef; - -uniform sampler2D texture; -uniform sampler2D NormalTex; -uniform sampler2D mix_texture; -uniform sampler2D grain_texture; - -varying float steepness; - -varying float flogz; - - -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 snowlevel; -uniform float dust_cover_factor; -uniform float lichen_cover_factor; -uniform float filter_threshold; -uniform float filter_transition; -uniform float size_base; -uniform float size_overlay; -uniform float size_grain; -uniform float strength_05m; -uniform float strength_1m; -uniform float strength_2m; -uniform float strength_5m; -uniform float strength_10m; -uniform float relief_strength; -uniform float grain_strength; -uniform float bias_center_strength; -uniform float wetness; -uniform float fogstructure; -uniform float snow_thickness_factor; -uniform float cloud_self_shading; -uniform float landing_light1_offset; -uniform float landing_light2_offset; -uniform float landing_light3_offset; -uniform float air_pollution; - - -uniform int quality_level; -uniform int tquality_level; -uniform int cloud_shadow_flag; -uniform int bias_center; -uniform int use_searchlight; -uniform int use_landing_light; -uniform int use_alt_landing_light; - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - -float alt; -float eShade; -float yprime_alt; -float mie_angle; - - -float shadow_func (in float x, in float y, in float noise, in float dist); -float Noise2D(in vec2 coord, in float wavelength); -float fog_func (in float targ, in float 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); -float rayleigh_in_func(in float dist, in float air_pollution, in float avisibility, in float eye_alt, in float vertex_alt); - -vec3 searchlight(); -vec3 landing_light(in float offset, in float offsetv); -vec3 rayleigh_out_shift(in vec3 color, in float outscatter); -vec3 get_hazeColor(in float light_arg); -vec3 filter_combined (in vec3 color) ; - - - -void main() -{ - - - -yprime_alt = diffuse_term.a; -//diffuse_term.a = 1.0; -mie_angle = gl_Color.a; -float effective_scattering = min(scattering, cloud_self_shading); - -// distance to fragment -float dist = length(relPos); -// angle of view vector with horizon -float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist; - - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); -// this is taken from default.frag - vec3 n; - float NdotL, NdotHV, fogFactor; - vec4 color = gl_Color; - color.a = 1.0; - vec3 lightDir = gl_LightSource[0].position.xyz; - vec3 halfVector; - if (quality_level<6) - {halfVector = gl_LightSource[0].halfVector.xyz;} - else - {halfVector = normalize(normalize(lightDir) + normalize(ecViewdir));} - - vec4 texel; - vec4 snow_texel; - vec4 mix_texel; - vec4 grain_texel; - vec4 fragColor; - vec4 specular = vec4(0.0); - float intensity; - - -// get noise at different wavelengths - -// used: 5m, 5m gradient, 10m, 10m gradient: heightmap of the closeup terrain, 10m also snow -// 50m: detail texel -// 250m: detail texel -// 500m: distortion and overlay -// 1500m: overlay, detail, dust, fog -// 2000m: overlay, detail, snow, fog - -float noise_01m; -float noise_05m = Noise2D(rawPos.xy, 0.5); -float noise_1m = Noise2D(rawPos.xy, 1.0); -float noise_2m = Noise2D(rawPos.xy, 2.0); -float noise_10m = Noise2D(rawPos.xy, 10.0); -float noise_5m = Noise2D(rawPos.xy ,5.0); - - -float noisegrad_10m; -float noisegrad_5m; - -float noise_50m = Noise2D(rawPos.xy, 50.0);; -float noise_250m; -float noise_500m = Noise2D(rawPos.xy, 500.0); -float noise_1500m = Noise2D(rawPos.xy, 1500.0); -float noise_2000m = Noise2D(rawPos.xy, 2000.0); - - - - - -// - - -// get the texels - - //texel = texture2D(texture, gl_TexCoord[0].st); - //mix_texel = texture2D(mix_texture, gl_TexCoord[0].st * 5.0); - texel = texture2D(texture, rawPos * 1.0/size_base); - mix_texel = texture2D(mix_texture, rawPos * 1.0/size_overlay); - grain_texel = texture2D(grain_texture, rawPos * 1.0/size_grain); - vec4 nmap = texture2D(NormalTex, gl_TexCoord[0].st * 8.0); - //vec4 nmap = texture2D(NormalTex, rawPos * 0.01); - vec3 N = nmap.rgb * 2.0 - 1.0; - - float distortion_factor = 1.0; - vec2 stprime; - int flag = 1; - int mix_flag = 1; - float noise_term; - float snow_alpha; - - - //noise_term = smoothstep(overlay_limit ,1.0,noise_1m); - //noise_term = smoothstep(overlay_limit, 1.0, 0.5 * noise_1m + 0.5 * noise_10m); - noise_term = strength_05m * noise_05m; - noise_term += strength_1m * noise_1m; - noise_term += strength_2m * noise_2m; - noise_term += strength_5m * noise_5m; - noise_term += strength_10m * noise_10m; - - - - if (bias_center == 1) - { - float centerness = smoothstep(0.02, 0.1, (0.14 - abs(gl_TexCoord[0].s - 0.14))); - centerness *= smoothstep(0.05, 0.15, gl_TexCoord[0].t); - centerness = 1.0 - centerness; - - noise_term *= (1.0 - bias_center_strength) + bias_center_strength * centerness; - noise_term = clamp(noise_term, 0.0, 1.0); - } - - float filtered_noise_term = smoothstep(filter_threshold, filter_threshold + filter_transition, noise_term); - - texel = mix(texel, mix_texel, filtered_noise_term); - - texel.rgb = mix(texel.rgb, grain_texel.rgb, grain_strength * grain_texel.a * (1.0 - noise_term));// * (1.0-smoothstep(2000.0,5000.0, dist))); - - - - //float view_angle = abs(dot(normal, normalize(ecViewdir))); - - //if ((quality_level > 3)&&(relPos.z + eye_alt +500.0 > snowlevel)) - if (quality_level > 3) - { - float sfactor; - noise_01m = Noise2D(rawPos.xy,0.1); - snow_texel = vec4 (0.95, 0.95, 0.95, 1.0) * (0.9 + 0.1* noise_50m + 0.1* (1.0 - noise_10m) ); - snow_texel.a = 1.0; - noise_term = 0.1 * (noise_50m-0.5); - sfactor = 1.0;//sqrt(2.0 * (1.0-steepness)/0.03) + abs(ct)/0.15; - noise_term = noise_term + 0.2 * (noise_10m -0.5) * (1.0 - smoothstep(10000.0*sfactor, 16000.0*sfactor, dist) ) ; - noise_term = noise_term + 0.3 * (noise_5m -0.5) * (1.0 - smoothstep(1200.0 * sfactor, 2000.0 * sfactor, dist) ) ; - noise_term = noise_term + 0.3 * (noise_1m -0.5) * (1.0 - smoothstep(500.0 * sfactor, 1000.0 *sfactor, dist) ); - noise_term = noise_term + 0.3 * (noise_01m -0.5) * (1.0 - smoothstep(20.0 * sfactor, 100.0 *sfactor, dist) ); - snow_texel.a = snow_texel.a * 0.2+0.8* smoothstep(0.2,0.8, 0.3 +noise_term + 0.2*snow_thickness_factor +0.0001*(relPos.z +eye_alt -snowlevel) ); - - } - - -const vec4 dust_color = vec4 (0.76, 0.71, 0.56, 1.0); -const vec4 lichen_color = vec4 (0.17, 0.20, 0.06, 1.0);; -//float snow_alpha; - -if (quality_level > 3) - { - - // mix vegetation - texel = mix(texel, lichen_color, 0.4 * lichen_cover_factor + 0.8 * lichen_cover_factor * 0.5 * (noise_10m + (1.0 - noise_5m)) ); - // mix dust - texel = mix(texel, 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) ); - - // mix snow - if (relPos.z + eye_alt +500.0 > snowlevel) - { - snow_alpha = smoothstep(0.75, 0.85, abs(steepness)); - texel = mix(texel, snow_texel, snow_texel.a* smoothstep(snowlevel, snowlevel+200.0, snow_alpha * (relPos.z + eye_alt)+ (noise_2000m + 0.1 * noise_10m -0.55) *400.0)); - } - } - - - -// get distribution of water when terrain is wet - -float water_threshold1; -float water_threshold2; -float water_factor =0.0; - - -if ((dist < 5000.0)&& (quality_level > 3) && (wetness>0.0)) - { - water_threshold1 = 1.0-0.5* wetness; - water_threshold2 = 1.0 - 0.3 * wetness; - //water_factor = smoothstep(water_threshold1, water_threshold2 , (0.3 * (2.0 * (1.0-noise_10m) + (1.0 -noise_5m)) * (1.0 - smoothstep(2000.0, 5000.0, dist))) - 5.0 * (1.0 -steepness)); - water_factor = smoothstep(water_threshold1, water_threshold2 , 0.5 * (noise_5m + (1.0 -noise_1m))) * (1.0 - smoothstep(1000.0, 3000.0, dist)); - } - -// darken wet terrain - - texel.rgb = texel.rgb * (1.0 - 0.6 * wetness - 0.1 * water_factor); - - -// light computations - - - vec4 light_specular = gl_LightSource[0].specular; - - // 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 = normal;//vec3 (nvec.x, nvec.y, sqrt(1.0 -pow(nvec.x,2.0) - pow(nvec.y,2.0) )); - n = normalize(n); - - NdotL = dot(n, lightDir); - - if (quality_level > 4) - { - NdotL = NdotL + (3.0 * N.r + 0.1 * (noise_01m-0.5))* (1.0 - water_factor) * relief_strength; - //NdotL = NdotL + 3.0 * N.r + 0.1 * (noise_01m-0.5) ; - } - if (NdotL > 0.0) { - if (cloud_shadow_flag == 1) - {NdotL = NdotL * shadow_func(relPos.x, relPos.y, 1.0, dist);} - color += diffuse_term * NdotL; - NdotHV = max(dot(n, halfVector), 0.0); - //if (gl_FrontMaterial.shininess > 0.0) - specular.rgb = ((gl_FrontMaterial.specular.rgb + (water_factor * vec3 (1.0, 1.0, 1.0))) - * light_specular.rgb - * pow(NdotHV, gl_FrontMaterial.shininess + (20.0 * water_factor))); - } - color.a = 1.0;//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); - - vec3 secondary_light = vec3 (0.0,0.0,0.0); - - if (use_searchlight == 1) - { - secondary_light.rgb += 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); - } - color.rgb +=secondary_light * light_distance_fading(dist); - - fragColor = color * texel + specular; - - -float lightArg = (terminator-yprime_alt)/100000.0; - -vec3 hazeColor = get_hazeColor(lightArg); - - -// Rayleigh color shifts - - if ((quality_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); - fragColor.rgb = rayleigh_out_shift(fragColor.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); - fragColor.rgb = mix(fragColor.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; - - - - -// 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 (quality_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 (quality_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 -{ - - - // 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(n,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.rgb *= eqColorFactor * eShade; -hazeColor.rgb = max(hazeColor.rgb, minLight.rgb); - -fragColor.rgb = mix(hazeColor +secondary_light * fog_backscatter(mvisibility) , fragColor.rgb,transmission); - -} - -fragColor.rgb = filter_combined(fragColor.rgb); - -gl_FragColor = fragColor; -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; -} - diff --git a/Compositor/Shaders/ALS/filters.frag b/Compositor/Shaders/ALS/filters.frag deleted file mode 100644 index cb69c2a31..000000000 --- a/Compositor/Shaders/ALS/filters.frag +++ /dev/null @@ -1,146 +0,0 @@ -// -*-C++-*- - -// This is a library of filter functions - -// Thorsten Renk 2016 - -#version 120 - -uniform float gamma; -uniform float brightness; -uniform float delta_T; -uniform float osg_SimulationTime; -uniform float fact_grey; -uniform float fact_black; - -uniform bool use_filtering; -uniform bool use_night_vision; -uniform bool use_IR_vision; - -uniform int display_xsize; -uniform int display_ysize; - -float rand2D(in vec2 co); -float Noise2D(in vec2 coord, in float wavelength); - -vec3 gamma_correction (in vec3 color) { - - -float value = length(color)/1.732; -return pow(value, gamma) * color; - -} - -vec3 brightness_adjust (in vec3 color) { - -return clamp(brightness * color, 0.0, 1.0); - -} - -vec3 night_vision (in vec3 color) { - -float value = length(color)/1.732; - -vec2 center = vec2 (float(display_xsize) * 0.5, float(display_ysize) * 0.5); -float noise = Noise2D( vec2 (gl_FragCoord.x + 100.0 * osg_SimulationTime, gl_FragCoord.y + 300.0 * osg_SimulationTime), 4.0); - -float fade = 1.0 - smoothstep( 0.3 * display_ysize, 0.55 * display_ysize, length(gl_FragCoord.xy -center)); - -return vec3 (0.0, 1.0, 0.0) * value * (0.5 + 0.5 * noise) * fade; - -} - - -vec3 IR_vision (in vec3 color) { - -float value = length(color)/1.732; -value = 1.0 - value; - -float T_mapped = smoothstep(-10.0, 10.0, delta_T); - -float gain = mix(T_mapped, value, 0.5); -//float gain = 0.2 * T_mapped + 0.8 * value * T_mapped; -if (delta_T < -10.0) {gain = 0.0;} - - -return vec3 (0.7, 0.7, 0.7) * gain; - -} - - -vec3 moonlight_perception (in vec3 light) { - -return light; - -} - - -vec3 g_force (in vec3 color) { - -vec2 center = vec2 (float(display_xsize) * 0.5, float(display_ysize) * 0.5); - -float greyout_band_width = 0.2; -float blackout_band_width = 0.3; - -float f_grey = 1.0 - fact_grey; - -float greyout = smoothstep( f_grey * display_ysize, (f_grey + greyout_band_width) * display_ysize, length(gl_FragCoord.xy -center)); - -float tgt_brightness = (1.0 - 0.5 * greyout); - -float noise = Noise2D( vec2 (gl_FragCoord.x + 100.0 * osg_SimulationTime, -gl_FragCoord.y + 300.0 * osg_SimulationTime), 8.0); - -float f_black = 1.0 - fact_black; - -noise *= (1.0 - smoothstep(0.0, 0.5, f_black)); - -color = mix(color, vec3 (1.0, 1.0, 1.0) * mix(length(color), -tgt_brightness, greyout) , 0.9* greyout + 0.6 * noise); -color *= tgt_brightness; - -float blackout = 1.0 - smoothstep( f_black * display_ysize, (f_black + blackout_band_width) * display_ysize, length(gl_FragCoord.xy -center)); - -color *= blackout; - -return color; - -} - -vec3 filter_combined (in vec3 color) { - - // Apply some dithering to eliminate banding caused by rendering to a - // 32 bpp framebuffer - float dither_noise = rand2D(gl_FragCoord.xy); - color += mix(-0.5/255.0, 0.5/255.0, dither_noise); - -if (use_filtering == false) - { - return color; - } - -color = g_force(color); - - -if (use_night_vision) - { - color = brightness_adjust(color); - color = night_vision(color); - } - -else if (use_IR_vision) - { - float IR_brightness = min(1.0/(brightness+0.01), 5.0); - color = clamp(IR_brightness * color, 0.0, 1.0); - color = IR_vision(color); - } -else - { - color = brightness_adjust(color); - } - -return gamma_correction (color); - -} - - diff --git a/Compositor/Shaders/ALS/filters.vert b/Compositor/Shaders/ALS/filters.vert deleted file mode 100644 index 5027e7d6c..000000000 --- a/Compositor/Shaders/ALS/filters.vert +++ /dev/null @@ -1,11 +0,0 @@ -// -*-C++-*- - -// This is a library of filter functions for the vertex shader - -// Thorsten Renk 2017 - -vec3 moonlight_perception (in vec3 light) { - -return light; - -} diff --git a/Compositor/Shaders/ALS/flutter.vert b/Compositor/Shaders/ALS/flutter.vert deleted file mode 100644 index 1708a9357..000000000 --- a/Compositor/Shaders/ALS/flutter.vert +++ /dev/null @@ -1,315 +0,0 @@ -// -*-C++-*- -// © Vivian Meazza - 2011 -// adapted to Atmospheric Light Scattering by Thorsten Renk 2013 - -// 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 vec3 relPos; - -varying float yprime_alt; -varying float mie_angle; - -varying float flogz; - -uniform int colorMode; -uniform float osg_SimulationTime; -uniform float Offset, AmpFactor, WindE, WindN, spd, hdg; -uniform sampler3D Noise; -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 moonlight; - -// 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 earthShade; - -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)); -} - -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() - { - vec4 light_diffuse; - vec4 light_ambient; - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight; - - - float yprime; - float lightArg; - float intensity; - float vertex_alt; - float scattering; - - - - 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; - // logarithmic depth - flogz = 1.0 + gl_Position.w; - - //do the colour and fog - vec4 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; - } - - - // 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); - - - // 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.a = 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.xyz); - - light_ambient.rgb = intensity * normalize(mix(light_ambient.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 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.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 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 = vec4 (1.0, 1.0, 1.0, 0.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_diffuse.a = 1.0; - - light_ambient.r = 0.316 + lightArg * 0.016; - 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; - } - - light_diffuse = light_diffuse * scattering; - yprime_alt = -sqrt(2.0 * EarthRadius * hazeLayerAltitude); -} - - - - - - diffuse_term = diffuse_color * light_diffuse; - vec4 ambient_term = ambient_color * light_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); - - } diff --git a/Compositor/Shaders/ALS/generic-base.vert b/Compositor/Shaders/ALS/generic-base.vert deleted file mode 100644 index e52450c0f..000000000 --- a/Compositor/Shaders/ALS/generic-base.vert +++ /dev/null @@ -1,254 +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 vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; -varying vec4 ecPosition; - -varying float yprime_alt; -varying float mie_angle; - -varying float flogz; - -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 moonlight; - - -void setupShadows(vec4 eyeSpacePos); - -// 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 earthShade; - -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_diffuse; - 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; - -// this code is copied from default.vert - - ecPosition = gl_ModelViewMatrix * gl_Vertex; - gl_Position = ftransform(); - // logarithmic depth - flogz = 1.0 + gl_Position.w; - 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); - - - // 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.a = 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.xyz); - - light_ambient.rgb = intensity * normalize(mix(light_ambient.rgb, 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.rgb = intensity * normalize(mix(light_diffuse.rgb, 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 = vec4 (1.0, 1.0, 1.0, 0.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_diffuse.a = 1.0; - - light_ambient.r = 0.316 + lightArg * 0.016; - 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; - } - - light_diffuse = light_diffuse * scattering; - yprime_alt = -sqrt(2.0 * EarthRadius * hazeLayerAltitude); -} - - -// default lighting based on texture and material using the light we have just computed - - diffuse_term = diffuse_color* light_diffuse; - vec4 constant_term = gl_FrontMaterial.emission + ambient_color * - (gl_LightModel.ambient + light_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; - - setupShadows(gl_ModelViewMatrix * gl_Vertex); -} - - - - diff --git a/Compositor/Shaders/ALS/glass.frag b/Compositor/Shaders/ALS/glass.frag deleted file mode 100644 index 1d8110896..000000000 --- a/Compositor/Shaders/ALS/glass.frag +++ /dev/null @@ -1,260 +0,0 @@ -// -*-C++-*- -#version 120 - -varying vec2 rawPos; -varying vec2 nPos; -varying vec3 vertPos; -varying vec3 normal; -varying vec3 refl_vec; -varying vec3 light_diffuse; -varying float splash_angle; -varying float Mie; -varying float ambient_fraction; - -varying float flogz; - -uniform float fg_Fcoef; - -uniform sampler2D texture; -uniform sampler2D frost_texture; -uniform sampler2D func_texture; -uniform samplerCube cube_texture; -uniform samplerCube cube_light_texture; - -uniform vec4 tint; -uniform vec3 overlay_color; - - -uniform float rain_norm; -uniform float ground_splash_norm; -uniform float frost_level; -uniform float fog_level; -uniform float reflection_strength; -uniform float overlay_alpha; -uniform float overlay_glare; -uniform float splash_x; -uniform float splash_y; -uniform float splash_z; -uniform float lightmap_r_factor; -uniform float lightmap_g_factor; -uniform float lightmap_b_factor; -uniform float lightmap_a_factor; -uniform float osg_SimulationTime; - -uniform int use_reflection; -uniform int use_reflection_lightmap; -uniform int use_mask; -uniform int use_wipers; -uniform int use_overlay; -uniform int adaptive_mapping; -uniform int lightmap_multi; - -uniform vec3 lightmap_r_color; -uniform vec3 lightmap_g_color; -uniform vec3 lightmap_b_color; -uniform vec3 lightmap_a_color; - -float DotNoise2D(in vec2 coord, in float wavelength, in float fractionalMaxDotSize, in float dot_density); -float DropletNoise2D(in vec2 coord, in float wavelength, in float fractionalMaxDotSize, in float dot_density); -float Noise2D(in vec2 coord, in float wavelength); -vec3 filter_combined (in vec3 color) ; - -void main() -{ - -vec4 texel; -vec4 frost_texel; -vec4 func_texel; - -texel = texture2D(texture, gl_TexCoord[0].st); -texel *=gl_Color; - -vec2 frost_coords; - -if (adaptive_mapping == 1) {frost_coords = gl_TexCoord[0].st * 7.0;} -else if (adaptive_mapping ==2) {frost_coords = nPos * 7.0;} -else {frost_coords = vertPos.xy * 7.0;} - -frost_texel = texture2D(frost_texture, frost_coords); -func_texel = texture2D(func_texture, gl_TexCoord[0].st); - - - -float noise_003m = Noise2D(vertPos.xy, 0.03); -float noise_0003m = Noise2D(vertPos.xy, 0.003); - - -// environment reflection, including a lightmap for the reflections - -vec4 reflection = textureCube(cube_texture, refl_vec); -vec4 reflection_lighting = textureCube(cube_light_texture, refl_vec); - -vec3 lightmapcolor = vec3(0.0, 0.0, 0.0); - - -if (use_reflection_lightmap == 1) - { - vec4 lightmapFactor = vec4(lightmap_r_factor, lightmap_g_factor, lightmap_b_factor, lightmap_a_factor); - lightmapFactor = lightmapFactor * reflection_lighting; - 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 = reflection_lighting.rgb * lightmap_r_color * lightmapFactor.r; - } - - } - -float lightmap_intensity = length(lightmapcolor); -float light_fraction = clamp(lightmap_intensity / (length(light_diffuse.rgb) + 0.01), 0.0, 5.0); - -if (light_fraction < 1.0) {light_fraction = smoothstep(0.7, 1.0, light_fraction);} - - -if (use_reflection ==1) - { - // to determine whether what we see reflected is currently in light, we make the somewhat drastic - // assumption that its normal will be opposite to the glass normal - // (which is mostly truish in a normal cockpit) - float reflection_shade = ambient_fraction + (1.0-ambient_fraction) * max(0.0, dot (normalize(normal), normalize(gl_LightSource[0].position.xyz))); - - texel.rgb = mix(texel.rgb, reflection.rgb, (reflection_strength * reflection_shade * (1.0-Mie))); - - } - -//texel.rgb = mix(texel.rgb, lightmapcolor.rgb, lightmap_intensity); - -// overlay pattern - -if ((use_mask == 1) && (use_overlay==1)) - { - vec4 overlay_texel = vec4(overlay_color, overlay_alpha); - overlay_texel.rgb *= light_diffuse.rgb* (1.0 + (1.0 + overlay_glare)*Mie); - overlay_texel.a *=(1.0 + overlay_glare* Mie); - texel = mix(texel, overlay_texel, func_texel.b * overlay_texel.a); - } - - -// frost - -float fth = (1.0-frost_level) * 0.4 + 0.3; -float fbl = 0.2 * frost_level; - - -float frost_factor = (fbl + (1.0-fbl)* smoothstep(fth,fth+0.2,noise_003m)) * (4.0 + 4.0* Mie); - - -float background_frost = 0.5 * smoothstep(0.7,1.0,frost_level); -frost_texel.rgb = mix(frost_texel.rgb, vec3 (0.5,0.5,0.5), (1.0- smoothstep(0.0,0.02,frost_texel.a))); -frost_texel.a =max(frost_texel.a, background_frost * (1.0- smoothstep(0.0,0.02,frost_texel.a))); - -frost_texel *= vec4(light_diffuse.rgb,0.5) * (1.0 + 3.0 * Mie); - -frost_factor = max(frost_factor, 0.8*background_frost); - - -texel.rgb = mix(texel.rgb, frost_texel.rgb, frost_texel.a * frost_factor * smoothstep(0.0,0.1,frost_level)); -texel.a = max(texel.a, frost_texel.a * frost_level); - -// rain splashes - -vec3 splash_vec = vec3 (splash_x, splash_y, splash_z); -float splash_speed = length(splash_vec); - - -float rain_factor = 0.0; - -float rnorm = max(rain_norm, ground_splash_norm); - -if (rnorm > 0.0) - { - float droplet_size = (0.5 + 0.8 * rnorm) * (1.0 - 0.1 * splash_speed); - vec2 rainPos = vec2 (rawPos.x * splash_speed, rawPos.y / splash_speed ); - rainPos.y = rainPos.y - 0.1 * smoothstep(1.0,2.0, splash_speed) * osg_SimulationTime; - if (splash_angle> 0.0) - { - // the dynamically impacting raindrops - - float time_shape = 1.0; - float base_rate = 6.0 + 3.0 * rnorm + 4.0 * (splash_speed - 1.0); - float base_density = 0.6 * rnorm + 0.4 * (splash_speed -1.0); - if ((use_mask ==1)&&(use_wipers==1)) {base_density *= (1.0 - 0.5 * func_texel.g);} - - float time_fact1 = (sin(base_rate*osg_SimulationTime)); - float time_fact2 = (sin(base_rate*osg_SimulationTime + 1.570)); - float time_fact3 = (sin(base_rate*osg_SimulationTime + 3.1415)); - float time_fact4 = (sin(base_rate*osg_SimulationTime + 4.712)); - - time_fact1 = smoothstep(0.0,1.0, time_fact1); - time_fact2 = smoothstep(0.0,1.0, time_fact2); - time_fact3 = smoothstep(0.0,1.0, time_fact3); - time_fact4 = smoothstep(0.0,1.0, time_fact4); - - rain_factor += DotNoise2D(rawPos.xy, 0.02 * droplet_size ,0.5, base_density ) * time_fact1; - rain_factor += DotNoise2D(rainPos.xy, 0.03 * droplet_size,0.4, base_density) * time_fact2; - rain_factor += DotNoise2D(rawPos.xy, 0.04 * droplet_size ,0.3, base_density)* time_fact3; - rain_factor += DotNoise2D(rainPos.xy, 0.05 * droplet_size ,0.25, base_density)* time_fact4; - } - - - // the static pattern of small droplets created by the splashes - - float sweep = min(1./splash_speed,1.0); - if ((use_mask ==1)&&(use_wipers==1)) {sweep *= (1.0 - func_texel.g);} - if (adaptive_mapping ==2) {rainPos = nPos;} - rain_factor += DropletNoise2D(rainPos.xy, 0.02 * droplet_size ,0.5, 0.6* rnorm * sweep); - rain_factor += DotNoise2D(rainPos.xy, 0.012 * droplet_size ,0.7, 0.6* rnorm * sweep); - } - -rain_factor = smoothstep(0.1,0.2, rain_factor) * (1.0 - smoothstep(0.4,1.0, rain_factor) * (0.2+0.8*noise_0003m)); - - -vec4 rainColor = vec4 (0.2,0.2, 0.2, 0.6 - 0.3 * smoothstep(1.0,2.0, splash_speed)); -rainColor.rgb *= length(light_diffuse)/1.73; - - - -// glass tint - - -vec4 outerColor = mix(texel, rainColor, rain_factor); -// now mix illuminated reflections in - -vec3 reflLitColor = reflection.rgb * lightmapcolor.rgb; - -outerColor.rgb = mix(outerColor.rgb, reflLitColor, clamp(reflection_strength * light_fraction,0.0,1.0)); -outerColor.a = max(outerColor.a, 0.1 * light_fraction * reflection_strength); - -outerColor *= tint; - - - - -// fogging - this is inside the glass - -vec4 fog_texel = vec4 (0.6,0.6,0.6, fog_level); - -if (use_mask == 1) {fog_texel.a = fog_texel.a * func_texel.r;} - -fog_texel *= vec4(light_diffuse.rgb,1.0); -fog_texel.rgb *= (1.0 + 3.0 * Mie); -fog_texel.a *= min((1.0 + 0.5 * Mie), 0.85); - - -vec4 fragColor; - -fragColor.rgb = mix(outerColor.rgb, fog_texel.rgb, fog_texel.a); -fragColor.a = max(outerColor.a, fog_texel.a); - -fragColor.rgb = filter_combined(fragColor.rgb); - -gl_FragColor = clamp(fragColor,0.0,1.0); -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; - -} diff --git a/Compositor/Shaders/ALS/glass.vert b/Compositor/Shaders/ALS/glass.vert deleted file mode 100644 index 886677eab..000000000 --- a/Compositor/Shaders/ALS/glass.vert +++ /dev/null @@ -1,143 +0,0 @@ -// -*-C++-*- -#version 120 - -varying vec2 rawPos; -varying vec2 nPos; -varying vec3 vertPos; -varying vec3 normal; -varying vec3 light_diffuse; -varying vec3 refl_vec; -varying float splash_angle; -varying float Mie; -varying float ambient_fraction; - -varying float flogz; - -uniform float ground_scattering; -uniform float hazeLayerAltitude; -uniform float moonlight; -uniform float terminator; -uniform float splash_x; -uniform float splash_y; -uniform float splash_z; - -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() -{ - -vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); -vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight; - -// geometry for lighting -vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0); -vec3 relPos = gl_Vertex.xyz - ep.xyz; -vec3 lightFull = (gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz; -vec3 lightHorizon = normalize(vec3(lightFull.x,lightFull.y, 0.0)); -float dist = length(relPos); -float vertex_alt = max(gl_Vertex.z,100.0); -float scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_alt); -float yprime_alt = - sqrt(2.0 * EarthRadius * vertex_alt); -float earthShade = 0.6 * (1.0 - smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt)) + 0.4; -float lightArg = (terminator-yprime_alt)/100000.0; - -// light computation - -vec3 light_ambient; - -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; - -float intensity; - -if (earthShade < 0.5) - { - intensity = length(light_ambient.xyz); - - light_ambient.rgb = intensity * normalize(mix(light_ambient.rgb, 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.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, 1.0 -smoothstep(0.4, 0.7,earthShade) )); - } - - -float MieFactor = dot(normalize(lightFull), normalize(relPos)); -Mie = smoothstep(0.9,1.0, MieFactor) * earthShade * earthShade * scattering; - - -// get a reflection vector for cube map - -vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex; -normal = normalize(gl_NormalMatrix * gl_Normal); -vec4 reflect_eye = vec4(reflect(ecPosition.xyz, normal), 0.0); -vec3 reflVec_stat = normalize(gl_ModelViewMatrixInverse * reflect_eye).xyz; -refl_vec = reflVec_stat; - -// get a projection plane orthogonal to the splash vector - -vec3 splash_vec = vec3 (splash_x, splash_y, splash_z); -vec3 corrected_splash = normalize(splash_vec); - -float angle = abs(dot(corrected_splash, gl_Normal)); - - -//corrected_splash = normalize(corrected_splash + 0.4* gl_Normal ); - - -vec3 base_1 = vec3 (-corrected_splash.y, corrected_splash.x, 0.0); -vec3 base_2 = cross (corrected_splash, base_1); - -base_1 = normalize(base_1); -base_2 = normalize(base_2); - -rawPos = vec2 (dot(gl_Vertex.xyz, base_1), dot(gl_Vertex.xyz, base_2)); - -base_1 = vec3 (-gl_Normal.y, gl_Normal.x, 0.0); -base_2 = cross(gl_Normal, base_1); - -base_1 = normalize(base_1); -base_2 = normalize(base_2); - -nPos = vec2 (dot(gl_Vertex.xyz, base_1), dot(gl_Vertex.xyz, base_2)); - -vertPos = gl_Vertex.xyz; - -splash_angle = dot(gl_Normal, corrected_splash); - -ambient_fraction = length(light_ambient.rgb)/(length(light_diffuse.rgb +light_ambient.rgb ) + 0.01); - - -gl_Position = ftransform(); -// logarithmic depth -flogz = 1.0 + gl_Position.w; - -vec4 diffuse_color = gl_FrontMaterial.diffuse; -vec4 ambient_color = gl_FrontMaterial.ambient; - -vec4 constant_term = gl_FrontMaterial.emission + ambient_color * vec4 (light_diffuse.rgb + light_ambient.rgb,1.0); -constant_term.a = min(diffuse_color.a, ambient_color.a); - -gl_FrontColor = constant_term; -gl_BackColor = gl_FrontColor; - -} diff --git a/Compositor/Shaders/ALS/grass.frag b/Compositor/Shaders/ALS/grass.frag deleted file mode 100755 index 2767e7afb..000000000 --- a/Compositor/Shaders/ALS/grass.frag +++ /dev/null @@ -1,180 +0,0 @@ -// -*-C++-*- -#version 120 - -#define BLADE_FRACTION 0.1 -#define MAX_DISTANCE 1000.0 - -uniform float fg_Fcoef; - -uniform float visibility; -uniform float scattering; -uniform float overlay_bias; -uniform float season; -uniform float max_height; -uniform float grass_density; -uniform float grass_modulate_height_min; - -uniform float wind_x; -uniform float wind_y; - -uniform float wash_x; -uniform float wash_y; -uniform float wash_strength; - -uniform int grass_modulate_by_overlay; -uniform int grass_groups; -uniform int wind_effects; - -uniform sampler2D colorTex; -uniform sampler2D densityTex; - -uniform float osg_SimulationTime; - -varying vec2 g_rawpos; // Horizontal position in model space -varying float g_distance_to_eye; // Distance to the camera. Layers were disregarded -varying float g_layer; // The layer where the fragment lives (0-1 range) - -varying float flogz; - -float rand2D(in vec2 co); -float Noise2D(in vec2 co, in float wavelength); -vec3 filter_combined (in vec3 color) ; - -float getShadowing(); - - -float map(float s, float a1, float a2, float b1, float b2) -{ - return b1+(s-a1)*(b2-b1)/(a2-a1); -} - -float decodeBinary(float n, float layer) -{ - return float(mod(floor(n*pow(0.5, layer)), 2.0)); -} - - -float bladeNoise2D(in float x, in float y, in float dDensity, in float layer, in float d_factor, in float h_factor) -{ - float integer_x = x - fract(x); - float fractional_x = x - integer_x; - - float integer_y = y - fract(y); - float fractional_y = y - integer_y; - - if (rand2D(vec2(integer_x+1.0, integer_y +1.0)) > dDensity) - {return 0.0;} - - float hfact = 0.7 + 0.3 * (rand2D(vec2(integer_x, integer_y + 2.0))); - hfact *= h_factor; - - if (layer > hfact) {return 0.0;} - - float xoffset = (rand2D(vec2(integer_x, integer_y)) -0.5); - float yoffset = (rand2D(vec2(integer_x+1.0, integer_y)) - 0.5); - - float xbend = (rand2D(vec2(integer_x+1.0, integer_y + 1.0)) - 0.5); - float ybend = (rand2D(vec2(integer_x, integer_y + 1.0)) - 0.5); - float fraction = BLADE_FRACTION * (0.5 + 0.5 * (1.0 - smoothstep(0.5, 1.0, layer))); - - float bend = 0.5 * layer * layer; - - vec2 truePos = vec2 (0.5 + xoffset * (1.0 - 2.0 * BLADE_FRACTION) + xbend * bend, 0.5 + yoffset * (1.0 -2.0 * BLADE_FRACTION) + ybend * bend); - - float distance = length(truePos - vec2(fractional_x, fractional_y)); - return 1.0 - step (fraction * d_factor, distance); -} - -float BladeNoise2D(in vec2 coord, in float wavelength, in float dDensity, in float layer, in float d_factor, in float h_factor) -{ -return bladeNoise2D(coord.x/wavelength, coord.y/wavelength, dDensity, layer, d_factor, h_factor); -} - -void main() -{ - - if (season > 1.6) {discard;} - if (g_distance_to_eye > MAX_DISTANCE) {discard;} - - vec2 texCoord = gl_TexCoord[0].st; - - if (wind_effects > 1) - { - - vec2 eyePos = (gl_ModelViewMatrixInverse * vec4 (0.0, 0.0, 0.0, 1.0)).xy; - - vec2 washDir = vec2 (wash_x, wash_y) - (g_rawpos - eyePos); - float washStrength = 20.0 * min(14.0 * wash_strength/(length(washDir) + 1.0), 1.0); - washStrength *= (1.0 - 0.8 * sin(20.0 * osg_SimulationTime + length(washDir) + dot(normalize(washDir), vec2(1.0, 0.0)))); - - vec2 windDir = normalize(vec2 (max(wind_x, 0.1), wind_y) + washStrength * vec2 (-washDir.y, washDir.x)); - - float windStrength = 0.5 * length(vec2 (wind_x, wind_y)) + washStrength; - float windAmplitude = 1.0 + 0.3 * windStrength; - float sineTerm = sin(0.7 * windStrength * osg_SimulationTime + 0.05 * (g_rawpos.x + g_rawpos.y)); - sineTerm = sineTerm + sin(0.6 * windStrength * osg_SimulationTime + 0.04 * (g_rawpos.x + g_rawpos.y)); - sineTerm = sineTerm + sin(0.44 * windStrength * osg_SimulationTime + 0.05 * (g_rawpos.x + g_rawpos.y)); - sineTerm = sineTerm/3.0; - sineTerm = 5.0 * sineTerm * sineTerm; - - float windDisplacement = pow(g_layer/32.0, 2.0) * clamp((windStrength + windAmplitude * sineTerm), -35.0, 35.0); - - texCoord += (windDisplacement * windDir); - } - - - - - float noise_1m = Noise2D(g_rawpos.xy, 1.0); - float noise_2m = Noise2D(g_rawpos.xy, 2.0); ; - float noise_10m = Noise2D(g_rawpos.xy, 10.0); - - float h_factor; - float overlay_mix = smoothstep(0.45, 0.65, overlay_bias + (0.5 * noise_1m + 0.1 * noise_2m + 0.4 * noise_10m)); - - if (grass_modulate_by_overlay == 1) - {h_factor = grass_modulate_height_min + (1.0 - grass_modulate_height_min) * (1.0 - overlay_mix) ;} - else - {h_factor = 1.0;} - - float value = 0.0; - - float d_fade =smoothstep(100.0, MAX_DISTANCE, g_distance_to_eye); - float d_factor = 1.0 + 1.0 * d_fade; - d_factor *= clamp(max_height/0.3,0.5, 1.0); - - float bladeFlag = BladeNoise2D(texCoord, 0.015, grass_density, g_layer, d_factor, h_factor); - if (grass_groups >1) {bladeFlag += BladeNoise2D(texCoord, 0.01, grass_density, g_layer, d_factor, h_factor);} - if (grass_groups >2) {bladeFlag += BladeNoise2D(texCoord, 0.007, grass_density, g_layer, d_factor, h_factor);} - - - if (bladeFlag > 0.0) {value = 1.0;} - else {discard;} - - vec3 texel = texture2D(colorTex, texCoord).rgb; - - // autumn coloring - - texel.r = min(1.0, (1.0 + 2.5 * 0.1 * season) * texel.r); - texel.g = texel.g; - texel.b = max(0.0, (1.0 - 4.0 * 0.1 * season) * texel.b); - float intensity = length(texel.rgb) * (1.0 - 0.5 * smoothstep(1.1,2.0,season)) * mix(0.3, 1.0, getShadowing()); - texel.rgb = intensity * normalize(mix(texel.rgb, vec3(0.23,0.17,0.08), smoothstep(1.1,2.0, season))); - - float base_alpha = clamp(0.4 * max_height/0.3, 0.4, 1.0); - value*= base_alpha * (1.0 - d_fade); - - value *= 1.0 - smoothstep(visibility* 0.5, visibility, g_distance_to_eye); - value= clamp(value, 0.0, 1.0); - - texel *= length(gl_LightSource[0].diffuse.rgb)/1.73 * scattering; - texel = clamp(texel, 0.0, 1.0); - - - vec4 fragColor = vec4 (texel, value); - fragColor.rgb = filter_combined(fragColor.rgb); - - gl_FragColor = fragColor; - // logarithmic depth - gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; -} diff --git a/Compositor/Shaders/ALS/grass.geom b/Compositor/Shaders/ALS/grass.geom deleted file mode 100755 index 2384a0901..000000000 --- a/Compositor/Shaders/ALS/grass.geom +++ /dev/null @@ -1,74 +0,0 @@ -// -*-C++-*- -#version 120 -#extension GL_EXT_geometry_shader4 : enable - -#define MAX_LAYERS 20 -#define MIN_LAYERS 8 -#define MAX_MINUS_MIN_LAYERS 12 - -uniform float max_height; - -varying in vec3 v_normal[3]; - -varying out vec2 g_rawpos; -varying out float g_distance_to_eye; -varying out float g_layer; - -varying out float flogz; - - -uniform mat4 fg_LightMatrix_csm0; -uniform mat4 fg_LightMatrix_csm1; -uniform mat4 fg_LightMatrix_csm2; -uniform mat4 fg_LightMatrix_csm3; -varying out vec4 lightSpacePos[4]; -void setupShadows(vec4 eyeSpacePos) -{ - lightSpacePos[0] = fg_LightMatrix_csm0 * eyeSpacePos; - lightSpacePos[1] = fg_LightMatrix_csm1 * eyeSpacePos; - lightSpacePos[2] = fg_LightMatrix_csm2 * eyeSpacePos; - lightSpacePos[3] = fg_LightMatrix_csm3 * eyeSpacePos; -} - -float min3(in float a, in float b, in float c) -{ - float m = a; - if (m > b) m = b; - if (m > c) m = c; - return m; -} - -void main() -{ - float distances[3]; - distances[0] = -(gl_ModelViewMatrix * gl_PositionIn[0]).z; - distances[1] = -(gl_ModelViewMatrix * gl_PositionIn[1]).z; - distances[2] = -(gl_ModelViewMatrix * gl_PositionIn[2]).z; - float minDistance = min3(distances[0], distances[1], distances[2]); - //float avgDistance = (distances[0]+distances[1]+distances[2])*0.33; - - int numLayers = MIN_LAYERS + int(smoothstep(500.0, 50.0, minDistance) * float(MAX_MINUS_MIN_LAYERS)); - - float deltaLayer = 1.0 / float(numLayers); - float currDeltaLayer = deltaLayer * 0.5; - - for (int layer = 0; layer < numLayers; ++layer) { - for (int i = 0; i < 3; ++i) { - vec4 pos = gl_PositionIn[i] + vec4(v_normal[i] * currDeltaLayer * max_height, 0.0); - g_rawpos = gl_PositionIn[i].xy; - g_distance_to_eye = distances[i]; - g_layer = currDeltaLayer; - - setupShadows(gl_ModelViewMatrix * pos); - - gl_Position = gl_ModelViewProjectionMatrix * pos; - // logarithmic depth - flogz = 1.0 + gl_Position.w; - gl_TexCoord[0] = gl_TexCoordIn[i][0]; - EmitVertex(); - } - EndPrimitive(); - - currDeltaLayer += deltaLayer; - } -} diff --git a/Compositor/Shaders/ALS/grass.vert b/Compositor/Shaders/ALS/grass.vert deleted file mode 100755 index 9a315e7c7..000000000 --- a/Compositor/Shaders/ALS/grass.vert +++ /dev/null @@ -1,17 +0,0 @@ -// -*-C++-*- -#version 120 - -// The UV scale controls the grass thickness. Lower numbers thicken the blades -// while higher numbers make them thinner. -#define UV_SCALE 10.0 - -varying vec3 v_normal; - -void main() -{ - - gl_Position = gl_Vertex; - - gl_TexCoord[0] = gl_MultiTexCoord0 * UV_SCALE; - v_normal = gl_Normal; -} diff --git a/Compositor/Shaders/ALS/hazes.frag b/Compositor/Shaders/ALS/hazes.frag deleted file mode 100644 index e8b457071..000000000 --- a/Compositor/Shaders/ALS/hazes.frag +++ /dev/null @@ -1,103 +0,0 @@ -// -*-C++-*- -#version 120 - -uniform float air_pollution; - -// standard ALS fog function with exp(-d/D) fading and cutoff at low altitude and exp(-d^2/D^2) at high altitude - -const float AtmosphericScaleHeight = 8500.0; - -float fog_func (in float targ, in float alt) -{ - - -float fade_mix; - -// for large altitude > 30 km, we switch to some component of quadratic distance fading to -// create the illusion of improved visibility range - -targ = 1.25 * targ * smoothstep(0.04,0.06,targ); // need to sync with the distance to which terrain is drawn - - -if (alt < 30000.0) - {return exp(-targ - targ * targ * targ * targ);} -else if (alt < 50000.0) - { - fade_mix = (alt - 30000.0)/20000.0; - return fade_mix * exp(-targ*targ - pow(targ,4.0)) + (1.0 - fade_mix) * exp(-targ - pow(targ,4.0)); - } -else - { - return exp(- targ * targ - pow(targ,4.0)); - } - -} - -// altitude correction for exponential drop in atmosphere density - -float alt_factor(in float eye_alt, in float vertex_alt) -{ -float h0 = AtmosphericScaleHeight; -float h1 = min(eye_alt,vertex_alt); -float h2 = max(eye_alt,vertex_alt); - - -if ((h2-h1) < 200.0) // use a Taylor-expanded version - { - return 0.5 * (exp(-h2/h0) + exp(-h1/h0)); - } -else - { - return h0/(h2-h1) * (exp(-h1/h0) - exp(-h2/h0)); - } -} - - -// Rayleigh in-scatter function - -float rayleigh_in_func(in float dist, in float air_pollution, in float avisibility, in float eye_alt, in float vertex_alt) -{ - -float fade_length = avisibility * (2.5 - 2.2 * sqrt(air_pollution)); - -fade_length = fade_length / alt_factor(eye_alt, vertex_alt); - -return 1.0-exp(-dist/max(15000.0,fade_length)); -} - - -// Rayleigh out-scattering color shift - -vec3 rayleigh_out_shift(in vec3 color, in float outscatter) -{ -color.r = color.r * (1.0 - 0.4 * outscatter); -color.g = color.g * (1.0 - 0.8 * outscatter); -color.b = color.b * (1.0 - 1.6 * outscatter); - -return color; -} - -// the generalized logistic function used to compute lightcurves - -float light_curve (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 > 30.0) {return e;} -if (x < -15.0) {return 0.0;} - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - -// the haze color function - -vec3 get_hazeColor(in float lightArg) -{ -vec3 hazeColor; -hazeColor.r = light_curve(lightArg, 8.305e-06, 0.161, 4.827-3.0 *air_pollution, 3.04e-05, 1.0); -hazeColor.g = light_curve(lightArg, 3.931e-06, 0.264, 3.827, 7.93e-06, 1.0); -hazeColor.b = light_curve(lightArg, 1.330e-05, 0.264, 1.527+ 2.0*air_pollution, 1.08e-05, 1.0); - -return hazeColor; -} diff --git a/Compositor/Shaders/ALS/hud.frag b/Compositor/Shaders/ALS/hud.frag deleted file mode 100644 index e3b856ddf..000000000 --- a/Compositor/Shaders/ALS/hud.frag +++ /dev/null @@ -1,294 +0,0 @@ -// -*-C++-*- -#version 120 - -varying vec2 rawPos; -varying vec2 nPos; -varying vec3 vertPos; -varying vec3 normal; -varying vec3 refl_vec; -varying vec3 light_diffuse; -varying float splash_angle; -varying float Mie; -varying float ambient_fraction; - -varying float flogz; - -uniform float fg_Fcoef; - -uniform sampler2D texture; -uniform sampler2D frost_texture; -uniform sampler2D func_texture; -uniform samplerCube cube_texture; -uniform samplerCube cube_light_texture; - -uniform vec4 tint; -uniform vec3 overlay_color; - - -uniform float rain_norm; -uniform float ground_splash_norm; -uniform float frost_level; -uniform float fog_level; -uniform float reflection_strength; -uniform float overlay_alpha; -uniform float overlay_glare; -uniform float splash_x; -uniform float splash_y; -uniform float splash_z; -uniform float lightmap_r_factor; -uniform float lightmap_g_factor; -uniform float lightmap_b_factor; -uniform float lightmap_a_factor; -uniform float osg_SimulationTime; - -uniform float sample_res; -uniform float sample_far; -uniform float hud_brightness; - -uniform int use_reflection; -uniform int use_reflection_lightmap; -uniform int use_mask; -uniform int use_wipers; -uniform int use_overlay; -uniform int adaptive_mapping; -uniform int lightmap_multi; - -uniform vec3 lightmap_r_color; -uniform vec3 lightmap_g_color; -uniform vec3 lightmap_b_color; -uniform vec3 lightmap_a_color; - -float DotNoise2D(in vec2 coord, in float wavelength, in float fractionalMaxDotSize, in float dot_density); -float DropletNoise2D(in vec2 coord, in float wavelength, in float fractionalMaxDotSize, in float dot_density); -float Noise2D(in vec2 coord, in float wavelength); -vec3 filter_combined (in vec3 color) ; - -void main() -{ - -vec4 texel; - - - -vec4 frost_texel; -vec4 func_texel; - - -texel = texture2D(texture, gl_TexCoord[0].st); - -texel+= texture2D(texture, vec2 (gl_TexCoord[0].s + sample_res, gl_TexCoord[0].t)); -texel+= texture2D(texture, vec2 (gl_TexCoord[0].s - sample_res, gl_TexCoord[0].t)); -texel+= texture2D(texture, vec2 (gl_TexCoord[0].s, gl_TexCoord[0].t + sample_res)); -texel+= texture2D(texture, vec2 (gl_TexCoord[0].s, gl_TexCoord[0].t - sample_res)); - -texel+= 0.75* texture2D(texture, vec2 (gl_TexCoord[0].s + sample_far * sample_res, gl_TexCoord[0].t+ sample_far * sample_res)); -texel+= 0.75* texture2D(texture, vec2 (gl_TexCoord[0].s - sample_far * sample_res, gl_TexCoord[0].t+ sample_far * sample_res)); -texel+= 0.75* texture2D(texture, vec2 (gl_TexCoord[0].s + sample_far * sample_res, gl_TexCoord[0].t- sample_far * sample_res)); -texel+= 0.75* texture2D(texture, vec2 (gl_TexCoord[0].s - sample_far * sample_res, gl_TexCoord[0].t- sample_far * sample_res)); - -texel+= 0.5 * texture2D(texture, vec2 (gl_TexCoord[0].s + 2.0 * sample_far * sample_res, gl_TexCoord[0].t - sample_res)); -texel+= 0.5 * texture2D(texture, vec2 (gl_TexCoord[0].s - 2.0 * sample_far * sample_res, gl_TexCoord[0].t + sample_res)); -texel+= 0.5 * texture2D(texture, vec2 (gl_TexCoord[0].s - sample_res, gl_TexCoord[0].t + 2.0 * sample_far * sample_res)); -texel+= 0.5 * texture2D(texture, vec2 (gl_TexCoord[0].s + sample_res, gl_TexCoord[0].t - 2.0 * sample_far * sample_res)); - -texel/=10.0; - -float threshold_high = max(hud_brightness, 0.05) * 0.7; -float threshold_low = max(hud_brightness, 0.05) * 0.4; -float threshold_mid = max(hud_brightness, 0.05) * 0.5; - -texel.rgb = mix(texel.rgb, vec3 (1.0, 1.0, 1.0), smoothstep(threshold_mid, threshold_high, texel.a)); -texel.rgb = mix(texel.rgb, vec3 (0.0, 0.0, 0.0), 1.0 - smoothstep(0.0, threshold_low, texel.a)); - -texel *=gl_Color; - -vec2 frost_coords; - -if (adaptive_mapping == 1) {frost_coords = gl_TexCoord[0].st * 7.0;} -else if (adaptive_mapping ==2) {frost_coords = nPos * 7.0;} -else {frost_coords = vertPos.xy * 7.0;} - -frost_texel = texture2D(frost_texture, frost_coords); -func_texel = texture2D(func_texture, gl_TexCoord[0].st * 2.0); - - - -float noise_003m = Noise2D(vertPos.xy, 0.03); -float noise_0003m = Noise2D(vertPos.xy, 0.003); - - -// environment reflection, including a lightmap for the reflections - -vec4 reflection = textureCube(cube_texture, refl_vec); -vec4 reflection_lighting = textureCube(cube_light_texture, refl_vec); - -vec3 lightmapcolor = vec3(0.0, 0.0, 0.0); - - -if (use_reflection_lightmap == 1) - { - vec4 lightmapFactor = vec4(lightmap_r_factor, lightmap_g_factor, lightmap_b_factor, lightmap_a_factor); - lightmapFactor = lightmapFactor * reflection_lighting; - 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 = reflection_lighting.rgb * lightmap_r_color * lightmapFactor.r; - } - - } - -float lightmap_intensity = length(lightmapcolor); -float light_fraction = clamp(lightmap_intensity / (length(light_diffuse.rgb) + 0.01), 0.0, 5.0); - -if (light_fraction < 1.0) {light_fraction = smoothstep(0.7, 1.0, light_fraction);} - - -if (use_reflection ==1) - { - // to determine whether what we see reflected is currently in light, we make the somewhat drastic - // assumption that its normal will be opposite to the glass normal - // (which is mostly truish in a normal cockpit) - float reflection_shade = ambient_fraction + (1.0-ambient_fraction) * max(0.0, dot (normalize(normal), normalize(gl_LightSource[0].position.xyz))); - - texel.rgb = mix(texel.rgb, reflection.rgb, (reflection_strength * reflection_shade * (1.0-Mie))); - - } - -//texel.rgb = mix(texel.rgb, lightmapcolor.rgb, lightmap_intensity); - -// overlay pattern - -if ((use_mask == 1) && (use_overlay==1)) - { - vec4 overlay_texel = vec4(overlay_color, overlay_alpha); - overlay_texel.rgb *= light_diffuse.rgb* (1.0 + (1.0 + overlay_glare)*Mie); - overlay_texel.a *=(1.0 + overlay_glare* Mie); - texel = mix(texel, overlay_texel, func_texel.b * overlay_texel.a); - } - - -// frost - -float fth = (1.0-frost_level) * 0.4 + 0.3; -float fbl = 0.2 * frost_level; - - -float frost_factor = (fbl + (1.0-fbl)* smoothstep(fth,fth+0.2,noise_003m)) * (4.0 + 4.0* Mie); - - -float background_frost = 0.5 * smoothstep(0.7,1.0,frost_level); -frost_texel.rgb = mix(frost_texel.rgb, vec3 (0.5,0.5,0.5), (1.0- smoothstep(0.0,0.02,frost_texel.a))); -frost_texel.a =max(frost_texel.a, background_frost * (1.0- smoothstep(0.0,0.02,frost_texel.a))); - -frost_texel *= vec4(light_diffuse.rgb,0.5) * (1.0 + 3.0 * Mie); - -frost_factor = max(frost_factor, 0.8*background_frost); - - -texel.rgb = mix(texel.rgb, frost_texel.rgb, frost_texel.a * frost_factor * smoothstep(0.0,0.1,frost_level)); -texel.a = max(texel.a, frost_texel.a * frost_level); - -// rain splashes - -vec3 splash_vec = vec3 (splash_x, splash_y, splash_z); -float splash_speed = length(splash_vec); - - -float rain_factor = 0.0; - -float rnorm = max(rain_norm, ground_splash_norm); - -if (rnorm > 0.0) - { - float droplet_size = (0.5 + 0.8 * rnorm) * (1.0 - 0.1 * splash_speed); - vec2 rainPos = vec2 (rawPos.x * splash_speed, rawPos.y / splash_speed ); - rainPos.y = rainPos.y - 0.1 * smoothstep(1.0,2.0, splash_speed) * osg_SimulationTime; - if (splash_angle> 0.0) - { - // the dynamically impacting raindrops - - float time_shape = 1.0; - float base_rate = 6.0 + 3.0 * rnorm + 4.0 * (splash_speed - 1.0); - float base_density = 0.6 * rnorm + 0.4 * (splash_speed -1.0); - if ((use_mask ==1)&&(use_wipers==1)) {base_density *= (1.0 - 0.5 * func_texel.g);} - - float time_fact1 = (sin(base_rate*osg_SimulationTime)); - float time_fact2 = (sin(base_rate*osg_SimulationTime + 1.570)); - float time_fact3 = (sin(base_rate*osg_SimulationTime + 3.1415)); - float time_fact4 = (sin(base_rate*osg_SimulationTime + 4.712)); - - time_fact1 = smoothstep(0.0,1.0, time_fact1); - time_fact2 = smoothstep(0.0,1.0, time_fact2); - time_fact3 = smoothstep(0.0,1.0, time_fact3); - time_fact4 = smoothstep(0.0,1.0, time_fact4); - - rain_factor += DotNoise2D(rawPos.xy, 0.02 * droplet_size ,0.5, base_density ) * time_fact1; - rain_factor += DotNoise2D(rainPos.xy, 0.03 * droplet_size,0.4, base_density) * time_fact2; - rain_factor += DotNoise2D(rawPos.xy, 0.04 * droplet_size ,0.3, base_density)* time_fact3; - rain_factor += DotNoise2D(rainPos.xy, 0.05 * droplet_size ,0.25, base_density)* time_fact4; - } - - - // the static pattern of small droplets created by the splashes - - float sweep = min(1./splash_speed,1.0); - if ((use_mask ==1)&&(use_wipers==1)) {sweep *= (1.0 - func_texel.g);} - if (adaptive_mapping ==2) {rainPos = nPos;} - rain_factor += DropletNoise2D(rainPos.xy, 0.02 * droplet_size ,0.5, 0.6* rnorm * sweep); - rain_factor += DotNoise2D(rainPos.xy, 0.012 * droplet_size ,0.7, 0.6* rnorm * sweep); - } - -rain_factor = smoothstep(0.1,0.2, rain_factor) * (1.0 - smoothstep(0.4,1.0, rain_factor) * (0.2+0.8*noise_0003m)); - - -vec4 rainColor = vec4 (0.2,0.2, 0.2, 0.6 - 0.3 * smoothstep(1.0,2.0, splash_speed)); -rainColor.rgb *= length(light_diffuse)/1.73; - - - -// glass tint - - -vec4 outerColor = mix(texel, rainColor, rain_factor); -// now mix illuminated reflections in - -vec3 reflLitColor = reflection.rgb * lightmapcolor.rgb; - -outerColor.rgb = mix(outerColor.rgb, reflLitColor, clamp(reflection_strength * light_fraction,0.0,1.0)); -outerColor.a = max(outerColor.a, 0.1 * light_fraction * reflection_strength); - -outerColor *= tint; - - - - -// fogging - this is inside the glass - -vec4 fog_texel = vec4 (0.6,0.6,0.6, fog_level); - -if (use_mask == 1) {fog_texel.a = fog_texel.a * func_texel.r;} - -fog_texel *= vec4(light_diffuse.rgb,1.0); -fog_texel.rgb *= (1.0 + 3.0 * Mie); -fog_texel.a *= min((1.0 + 0.5 * Mie), 0.85); - - -vec4 fragColor; - -fragColor.rgb = mix(outerColor.rgb, fog_texel.rgb, fog_texel.a); -fragColor.a = max(outerColor.a, fog_texel.a); - -fragColor.rgb = filter_combined(fragColor.rgb); - - -gl_FragColor = clamp(fragColor,0.0,1.0); -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; - -} diff --git a/Compositor/Shaders/ALS/hud.vert b/Compositor/Shaders/ALS/hud.vert deleted file mode 100644 index 6e41507a2..000000000 --- a/Compositor/Shaders/ALS/hud.vert +++ /dev/null @@ -1,144 +0,0 @@ -// -*-C++-*- -#version 120 - -varying vec2 rawPos; -varying vec2 nPos; -varying vec3 vertPos; -varying vec3 normal; -varying vec3 light_diffuse; -varying vec3 refl_vec; -varying float splash_angle; -varying float Mie; -varying float ambient_fraction; - -varying float flogz; - -uniform float ground_scattering; -uniform float hazeLayerAltitude; -uniform float moonlight; -uniform float terminator; -uniform float splash_x; -uniform float splash_y; -uniform float splash_z; - -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() -{ - -vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); -vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight; - -// geometry for lighting -vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0); -vec3 relPos = gl_Vertex.xyz - ep.xyz; -vec3 lightFull = (gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz; -vec3 lightHorizon = normalize(vec3(lightFull.x,lightFull.y, 0.0)); -float dist = length(relPos); -float vertex_alt = max(gl_Vertex.z,100.0); -float scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_alt); -float yprime_alt = - sqrt(2.0 * EarthRadius * vertex_alt); -float earthShade = 0.6 * (1.0 - smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt)) + 0.4; -float lightArg = (terminator-yprime_alt)/100000.0; - -// light computation - -vec3 light_ambient; - -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; - -float intensity; - -if (earthShade < 0.5) - { - intensity = length(light_ambient.xyz); - - light_ambient.rgb = intensity * normalize(mix(light_ambient.rgb, 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.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, 1.0 -smoothstep(0.4, 0.7,earthShade) )); - } - - -float MieFactor = dot(normalize(lightFull), normalize(relPos)); -Mie = smoothstep(0.9,1.0, MieFactor) * earthShade * earthShade * scattering; - - -// get a reflection vector for cube map - -vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex; -normal = -normalize(gl_NormalMatrix * gl_Normal); -vec4 reflect_eye = vec4(reflect(ecPosition.xyz, normal), 0.0); -vec3 reflVec_stat = normalize(gl_ModelViewMatrixInverse * reflect_eye).xyz; -refl_vec = reflVec_stat; - -// get a projection plane orthogonal to the splash vector - -vec3 splash_vec = vec3 (splash_x, splash_y, splash_z); -vec3 corrected_splash = normalize(splash_vec); - -float angle = abs(dot(corrected_splash, gl_Normal)); - - -//corrected_splash = normalize(corrected_splash + 0.4* gl_Normal ); - - -vec3 base_1 = vec3 (-corrected_splash.y, corrected_splash.x, 0.0); -vec3 base_2 = cross (corrected_splash, base_1); - -base_1 = normalize(base_1); -base_2 = normalize(base_2); - -rawPos = vec2 (dot(gl_Vertex.xyz, base_1), dot(gl_Vertex.xyz, base_2)); - -base_1 = vec3 (-gl_Normal.y, gl_Normal.x, 0.0); -base_2 = cross(gl_Normal, base_1); - -base_1 = normalize(base_1); -base_2 = normalize(base_2); - -nPos = vec2 (dot(gl_Vertex.xyz, base_1), dot(gl_Vertex.xyz, base_2)); - -vertPos = gl_Vertex.xyz; - -splash_angle = dot(gl_Normal, corrected_splash); - -ambient_fraction = length(light_ambient.rgb)/(length(light_diffuse.rgb +light_ambient.rgb ) + 0.01); - - -gl_Position = ftransform(); -// logarithmic depth -flogz = 1.0 + gl_Position.w; -gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; - -vec4 diffuse_color = gl_FrontMaterial.diffuse; -vec4 ambient_color = gl_FrontMaterial.ambient; - -vec4 constant_term = gl_FrontMaterial.emission + ambient_color * vec4 (light_diffuse.rgb + light_ambient.rgb,1.0); -constant_term.a = min(diffuse_color.a, ambient_color.a); - -gl_FrontColor = constant_term; -gl_BackColor = gl_FrontColor; - -} diff --git a/Compositor/Shaders/ALS/light.frag b/Compositor/Shaders/ALS/light.frag deleted file mode 100644 index d90b2f0bc..000000000 --- a/Compositor/Shaders/ALS/light.frag +++ /dev/null @@ -1,237 +0,0 @@ -// -*-C++-*- -#version 120 - -uniform float fg_Fcoef; - -uniform sampler2D texture; - -uniform float light_color_base_r; -uniform float light_color_base_g; -uniform float light_color_base_b; - -uniform float light_color_center_r; -uniform float light_color_center_g; -uniform float light_color_center_b; - -uniform float intensity_scale; - -uniform float pointing_x; -uniform float pointing_y; -uniform float pointing_z; - -uniform float outer_angle; -uniform float inner_angle; -uniform float zero_angle; -uniform float outer_gain; - -uniform float visibility; -uniform float avisibility; -uniform float hazeLayerAltitude; -uniform float eye_alt; -uniform float terminator; - -uniform float osg_SimulationTime; - -uniform bool is_directional; -uniform bool is_strobe; - -varying vec3 vertex; -varying vec3 relPos; -varying vec3 normal; - -varying float flogz; - -float Noise2D(in vec2 coord, in float wavelength); -float fog_func (in float targ, in float alt); - -float shape (in vec3 coord, in float noise, in float fade, in float transmission, in float glare, in float lightArg) -{ - float r = length (coord) / max(fade, 0.2); - - float angle = noise * 6.2832; - - float sinphi = dot(vec2 (sin(angle),cos(angle)), normalize(coord.yz)); - float sinterm = sin(mod((sinphi-3.0) * (sinphi-3.0),6.2832)); - float ray = 0.0; - if (sinterm == 0.0) - {ray = 0.0;} - else - //{ray = clamp(pow(sinterm,10.0),0.0,1.0); - {ray = sinterm * sinterm * sinterm * sinterm * sinterm * sinterm * sinterm * sinterm * sinterm * sinterm; - ray *= exp(-40.0 * r * r) * smoothstep(0.8, 1.0,fade) * smoothstep(0.7, 1.0, glare); - } - - - - float base = exp(-80.0*r*r ); - float halo = 0.2 * exp(-10.0 * r * r) * (1.0 - smoothstep(-5.0, 0.0, lightArg)); - float fogEffect = (1.0-smoothstep(0.4,0.8,transmission)); - //fogEffect = 1.0; - - //float offset = 0.0; - //offset *=0.3; - //vec2 offset_vec = vec2 (1.0, 0.0); - //offset_vec *= offset; - - // vec2 coord_reduced1 = vec2(coord.y- 1.2* offset_vec.x, coord.z - 1.2 * offset_vec.y); - //vec2 coord_reduced2 = vec2(coord.y- 2.0 * offset_vec.x, coord.z - 2.0 * offset_vec.y); - //vec3 coord_reduced = coord; - //r = min(length (coord_reduced1), 0.8* length(coord_reduced2)); - //r /= 1.0 - 0.3 * smoothstep(0.0, 0.3, offset); - - float intensity = clamp(base + halo + ray,0.0,1.0) + 0.2 * fogEffect * (1.0-smoothstep(0.3, 0.6,r)); - - intensity *=fade; - -return intensity; -} - - -float directional_fade (in float direction) -{ - -float arg = clamp(direction, 0.0, 1.0); -float ia = (1.0 - inner_angle); -float oa = (1.0 - outer_angle); -float za = (1.0 - zero_angle); - -if (direction > ia) {return 1.0;} -else if (direction > oa) - {return outer_gain + (1.0-outer_gain) * (direction - oa) / (ia - oa);} -else if (direction > za) - {return outer_gain * (direction - za) / (oa - za);} -else {return 0.0;} - -} - -float strobe_fade (in float fade) -{ - -float time_arg1 = sin(4.0 * osg_SimulationTime); -float time_arg2 = sin(4.0 * osg_SimulationTime - 0.4); - -return fade * 0.825 * (pow(time_arg1, 40.0) + pow(time_arg2, 8.0)); - -} - - -void main() -{ - -float noise = 0.0; - -vec3 light_color_base = vec3 (light_color_base_r, light_color_base_g, light_color_base_b); -vec3 light_color_center = vec3 (light_color_center_r, light_color_center_g, light_color_center_b); - -vec3 pointing_vec = vec3 (pointing_x, pointing_y, pointing_z); -vec3 viewDir = normalize(relPos); - -// fogging - -float dist = length(relPos); -float delta_z = hazeLayerAltitude - eye_alt; -float transmission; -float vAltitude; -float delta_zv; -float H; -float distance_in_layer; -float transmission_arg; - - // angle with horizon - float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist; - - - 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,min(visibility, avisibility)) * 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)) - { - 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; - } - } - - - - transmission_arg = (dist-distance_in_layer)/avisibility; - if (visibility < avisibility) - { - transmission_arg = transmission_arg + (distance_in_layer/visibility); - } - else - { - transmission_arg = transmission_arg + (distance_in_layer/avisibility); - } - - - - transmission = fog_func(transmission_arg, 0.0); - float lightArg = terminator/100000.0; - - -float r = length(vertex); -float mix_factor = 0.3 + 0.7 * smoothstep(0.0, 0.5, r); - -// directionality - -vec3 nViewDir = normalize(viewDir); -vec3 nPointingVec = normalize(pointing_vec); -float direction = dot (nViewDir, nPointingVec ); - -float fade; -vec2 offset = vec2 (0.0, 0.0); - -if (is_directional) - { - fade = directional_fade(direction); - } -else - {fade = 1.0;} - - - -// time evolution - -if (is_strobe) {fade = strobe_fade (fade);} - -fade *= intensity_scale; - -// disc size correction for daylight - -// shape of the light disc -float glare = length(light_color_center)/1.7321 * (1.0 - smoothstep(-5.0, 10.0, lightArg)); -float intensity = shape(vertex, noise, fade, transmission, glare, lightArg); - -// coloring of the light disc -vec3 light_color = mix(light_color_base, light_color_center, intensity*intensity); - - -gl_FragColor = vec4 (light_color.rgb, intensity * transmission ); -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; - -} diff --git a/Compositor/Shaders/ALS/light.vert b/Compositor/Shaders/ALS/light.vert deleted file mode 100644 index f6c0710c0..000000000 --- a/Compositor/Shaders/ALS/light.vert +++ /dev/null @@ -1,90 +0,0 @@ -// -*-C++-*- - -#version 120 - -// doing directionality is surprisingly complicated - with just the vector and the eye we can't -// do a spherical billboard, but the animation itself operates before the shader, so -// the model-coordinate to eye relationship is always the same -// thus we need to use pitch, yaw and roll to get the current model space coordinates - -uniform float pitch; -uniform float roll; -uniform float hdg; - - -varying vec3 vertex; -varying vec3 relPos; -varying vec3 normal; - -varying float flogz; - - -void main() -{ - -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); - - vec3 absu = abs(u); - vec3 r = normalize(vec3(-u.y, u.x, 0.0)); - vec3 w = cross(u, r); - -vertex = gl_Vertex.xyz; -relPos = vertex - ep.xyz; -normal = gl_NormalMatrix * gl_Normal; - - 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; - gl_Position.xyz += gl_Vertex.z * w; - gl_Position = gl_ModelViewProjectionMatrix * gl_Position; - // logarithmic depth - flogz = 1.0 + gl_Position.w; - -//gl_Position = ftransform(); -gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; - -gl_FrontColor = vec4 (1.0,1.0,1.0,1.0); -gl_BackColor = gl_FrontColor; -} - -/* - -void rotationMatrixPR(in float sinRx, in float cosRx, in float sinRy, in float cosRy, out mat4 rotmat) -{ - rotmat = mat4( cosRy , sinRx * sinRy , cosRx * sinRy, 0.0, - 0.0 , cosRx , -sinRx * cosRx, 0.0, - -sinRy, sinRx * cosRy, cosRx * cosRy , 0.0, - 0.0 , 0.0 , 0.0 , 1.0 ); -} - -void rotationMatrixH(in float sinRz, in float cosRz, out mat4 rotmat) -{ - rotmat = mat4( cosRz, -sinRz, 0.0, 0.0, - sinRz, cosRz, 0.0, 0.0, - 0.0 , 0.0 , 1.0, 0.0, - 0.0 , 0.0 , 0.0, 1.0 ); -} - -//prepare rotation matrix -mat4 RotMatPR; -mat4 RotMatH; -float _roll = roll; -if (_roll>90.0 || _roll < -90.0) {_roll = -_roll;} -float cosRx = cos(radians(_roll)); -float sinRx = sin(radians(_roll)); -float cosRy = cos(radians(-pitch)); -float sinRy = sin(radians(-pitch)); -float cosRz = cos(radians(hdg)); -float sinRz = sin(radians(hdg)); -rotationMatrixPR(sinRx, cosRx, sinRy, cosRy, RotMatPR); -rotationMatrixH(sinRz, cosRz, RotMatH); - -vec3 model_x = (RotMatH * RotMatPR * vec4 (1.0, 0.0, 0.0, 0.0)).xyz; -vec3 model_y = (RotMatH * RotMatPR * vec4 (0.0, 1.0, 0.0, 0.0)).xyz; -vec3 model_z = (RotMatH * RotMatPR * vec4 (0.0, 0.0, 1.0, 0.0)).xyz; - -vec3 pointingVec = normalize(pointing_x * model_x + pointing_y * model_y + pointing_z * model_z); -pointing_angle = dot (viewDir, pointingVec);*/ diff --git a/Compositor/Shaders/ALS/lightspot.frag b/Compositor/Shaders/ALS/lightspot.frag deleted file mode 100644 index 5a033d4fd..000000000 --- a/Compositor/Shaders/ALS/lightspot.frag +++ /dev/null @@ -1,108 +0,0 @@ -// -*-C++-*- -#version 120 - -uniform float eyerel_x1; -uniform float eyerel_y1; -uniform float eyerel_z1; -uniform float lightspot_r1; -uniform float lightspot_g1; -uniform float lightspot_b1; -uniform float eyerel_x2; -uniform float eyerel_y2; -uniform float eyerel_z2; -uniform float lightspot_r2; -uniform float lightspot_g2; -uniform float lightspot_b2; -uniform float eyerel_x3; -uniform float eyerel_y3; -uniform float eyerel_z3; -uniform float lightspot_r3; -uniform float lightspot_g3; -uniform float lightspot_b3; -uniform float eyerel_x4; -uniform float eyerel_y4; -uniform float eyerel_z4; -uniform float lightspot_r4; -uniform float lightspot_g4; -uniform float lightspot_b4; -uniform float eyerel_x5; -uniform float eyerel_y5; -uniform float eyerel_z5; -uniform float lightspot_r5; -uniform float lightspot_g5; -uniform float lightspot_b5; -uniform float lightspot_project1; -uniform float lightspot_project2; -uniform float lightspot_dir1; -uniform float lightspot_dir2; -uniform float lightspot_size1; -uniform float lightspot_size2; -uniform float lightspot_size3; -uniform float lightspot_size4; -uniform float lightspot_size5; - -uniform int num_lightspots; - -vec3 lightspot(vec3 relPos) -{ - - -if (num_lightspots == 0) - { - return vec3 (0.0, 0.0, 0.0); - } - -// first projectable spot - -vec3 eye_rel = vec3 (eyerel_x1, eyerel_y1, eyerel_z1); -vec3 difference_vec = relPos - eye_rel; - -mat2 rotMat = mat2 (cos(lightspot_dir1), sin(lightspot_dir1), -sin(lightspot_dir1), cos(lightspot_dir1)); - -difference_vec.xy = rotMat * difference_vec.xy; -difference_vec.x/= (1.0 + lightspot_project1); - -float lightspot_arg = (1.0 - smoothstep(lightspot_size1/3.0, lightspot_size1, length(difference_vec))) * (1.0 - 0.5* smoothstep(lightspot_size1/3.0, lightspot_size1/(1.0+lightspot_project1), -difference_vec.x)); - -vec3 lightspot_color = vec3 (lightspot_r1,lightspot_g1, lightspot_b1 ) * lightspot_arg; - -// second projectable spot - -eye_rel = vec3 (eyerel_x2, eyerel_y2, eyerel_z2); -difference_vec = relPos - eye_rel; - -rotMat = mat2 (cos(lightspot_dir2), sin(lightspot_dir2), -sin(lightspot_dir2), cos(lightspot_dir2)); - -difference_vec.xy = rotMat * difference_vec.xy; -difference_vec.x/= (1.0 + lightspot_project2); - -lightspot_arg = (1.0 - smoothstep(lightspot_size2/3.0, lightspot_size2, length(difference_vec))) * (1.0 - 0.5* smoothstep(lightspot_size2/3.0, lightspot_size2/(1.0+lightspot_project2), -difference_vec.x)); - -lightspot_color += vec3 (lightspot_r2,lightspot_g2, lightspot_b2 ) * lightspot_arg; - -if (num_lightspots < 3) - { - return lightspot_color ; - } - -// spherical spot - -eye_rel = vec3 (eyerel_x3, eyerel_y3, eyerel_z3); -lightspot_arg = (1.0 - smoothstep(lightspot_size3/3.0, lightspot_size3, length(relPos - eye_rel))); -lightspot_color += vec3 (lightspot_r3,lightspot_g3, lightspot_b3 ) * lightspot_arg; - -// spherical spot - -eye_rel = vec3 (eyerel_x4, eyerel_y4, eyerel_z4); -lightspot_arg = (1.0 - smoothstep(lightspot_size4/3.0, lightspot_size4, length(relPos - eye_rel))); -lightspot_color += vec3 (lightspot_r4,lightspot_g4, lightspot_b4 ) * lightspot_arg; - -// spherical spot - -eye_rel = vec3 (eyerel_x5, eyerel_y5, eyerel_z5); -lightspot_arg = (1.0 - smoothstep(lightspot_size5/3.0, lightspot_size5, length(relPos - eye_rel))); -lightspot_color += vec3 (lightspot_r5,lightspot_g5, lightspot_b5 ) * lightspot_arg; - -return lightspot_color; - -} diff --git a/Compositor/Shaders/ALS/model-base.frag b/Compositor/Shaders/ALS/model-base.frag deleted file mode 100644 index 14a28e390..000000000 --- a/Compositor/Shaders/ALS/model-base.frag +++ /dev/null @@ -1,333 +0,0 @@ -// -*-C++-*- -#version 120 - -// written by Thorsten Renk, Oct 2011, based on default.frag -// Ambient term comes in gl_Color.rgb. -varying vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; -varying vec4 ecPosition; - -uniform float fg_Fcoef; - -uniform sampler2D texture; - - -varying float yprime_alt; -varying float mie_angle; - -varying float flogz; - - -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 cloud_self_shading; -uniform float air_pollution; -uniform float landing_light1_offset; -uniform float landing_light2_offset; -uniform float landing_light3_offset; - -uniform int quality_level; -uniform int tquality_level; -uniform int use_searchlight; -uniform int use_landing_light; -uniform int use_alt_landing_light; - - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - -float alt; -float eShade; - - -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(); -vec3 addClusteredLightsContribution(vec3 inputColor, vec3 v, vec3 N); - -float luminance(vec3 color) -{ - return dot(vec3(0.212671, 0.715160, 0.072169), color); -} - - -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 > 30.0) {return e;} -if (x < -15.0) {return 0.0;} - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - -// this determines how light is attenuated in the distance -// physically this should be exp(-arg) but for technical reasons we use a sharper cutoff -// for distance > visibility - - - - -void main() -{ - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); -// this is taken from default.frag - 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 fragColor; - vec4 specular = vec4(0.0); - float intensity; - - float effective_scattering = min(scattering, cloud_self_shading); - - eShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt); - vec4 light_specular = gl_LightSource[0].specular * (eShade - 0.1); - - // 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) { - float shadowmap = getShadowing(); - color += diffuse_term * NdotL * shadowmap; - NdotHV = max(dot(n, halfVector), 0.0); - if (gl_FrontMaterial.shininess > 0.0) - specular.rgb = (gl_FrontMaterial.specular.rgb - * light_specular.rgb - * pow(NdotHV, gl_FrontMaterial.shininess) - * shadowmap); - } - 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); - - float dist = length(relPos); - vec3 secondary_light = vec3 (0.0,0.0,0.0); - - if ((quality_level > 5) && (tquality_level > 5)) - { - 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); - } - if (dist > 2.0) // we don't want to light the cockpit... - {color.rgb +=secondary_light * light_distance_fading(dist);} - } - - texel = texture2D(texture, gl_TexCoord[0].st); - fragColor = color * texel + specular; - - -float lightArg = (terminator-yprime_alt)/100000.0; - -vec3 hazeColor = get_hazeColor(lightArg); - - -// Rayleigh color shift due to in-scattering - - if ((quality_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); - fragColor.rgb = rayleigh_out_shift(fragColor.rgb,outscatter); - 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); - fragColor.rgb = mix(fragColor.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; - -// 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; - -//float scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, relPos.z + eye_alt); - -if (visibility < avisibility) - { - 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 - { - 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; - - - - - - - -// 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)) ); - } - -// high altitude desaturation of the haze color - -intensity = length(hazeColor); -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 -//intensity = length(hazeColor); -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(normal,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); - -// determine the right mix of transmission and haze - - -fragColor.rgb = mix(hazeColor + secondary_light * fog_backscatter(mvisibility), fragColor.rgb,transmission); - - - -} - -fragColor.rgb = addClusteredLightsContribution(fragColor.rgb, ecPosition.xyz, normal); -fragColor.rgb = filter_combined(fragColor.rgb); - -gl_FragColor = fragColor; -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; -} - diff --git a/Compositor/Shaders/ALS/model-interior-base.frag b/Compositor/Shaders/ALS/model-interior-base.frag deleted file mode 100644 index 03052f1c0..000000000 --- a/Compositor/Shaders/ALS/model-interior-base.frag +++ /dev/null @@ -1,188 +0,0 @@ -// -*-C++-*- -#version 120 - -// written by Thorsten Renk, Oct 2015 - -varying vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; - -uniform float fg_Fcoef; - -uniform sampler2D texture; -uniform samplerCube cube_texture; - -varying float yprime_alt; -varying float mie_angle; - -varying float flogz; - - -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 cloud_self_shading; -uniform float angle; -uniform float threshold_low; -uniform float threshold_high; -uniform float emit_intensity; -uniform float light_radius; - -uniform vec3 offset_vec; -uniform vec3 scale_vec; -uniform vec3 tag_color; -uniform vec3 emit_color; -uniform vec3 light_filter_one; -uniform vec3 light_filter_two; - -uniform int quality_level; -uniform int tquality_level; -uniform int use_searchlight; -uniform int implicit_lightmap_enabled; -uniform int use_flashlight; - - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - -float alt; -float eShade; - - -float fog_func (in float targ, in float 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 get_hazeColor(in float light_arg); -vec3 flashlight(in vec3 color, in float radius); -vec3 filter_combined (in vec3 color) ; - -float luminance(vec3 color) -{ - return dot(vec3(0.212671, 0.715160, 0.072169), color); -} - - -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 > 30.0) {return e;} -if (x < -15.0) {return 0.0;} - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - -// this determines how light is attenuated in the distance -// physically this should be exp(-arg) but for technical reasons we use a sharper cutoff -// for distance > visibility - - - - -void main() -{ - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); -// this is taken from default.frag - 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 fragColor; - vec4 specular = vec4(0.0); - float intensity; - - float effective_scattering = min(scattering, cloud_self_shading); - - eShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt); - vec4 light_specular = gl_LightSource[0].specular * (eShade - 0.1); - - // 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); - - // lookup on the opacity map - vec3 light_vec = normalize((gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz); - //vec3 light_vec = vec3 (-1.0,0.0,0.0); - - vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0); - vec3 scaled_pos = relPos + ep.xyz; - - //vec3 lookup_vec = normalize(- normalize(light_vec) + relPos); - scaled_pos -= offset_vec; - float rangle = radians(angle); - mat2 rotMat = mat2 (cos(rangle), -sin(rangle), sin(rangle), cos(rangle)); - scaled_pos.xy *=rotMat; - - scaled_pos /= scale_vec; - - //vec3 lookup_pos = dot(base1,scaled_pos) * base1 + dot(base2,scaled_pos) * base2; - vec3 lookup_pos = scaled_pos - light_vec * dot(light_vec, scaled_pos); - - vec3 lookup_vec = normalize(normalize(light_vec) + lookup_pos); - vec4 opacity = textureCube(cube_texture, lookup_vec); - - - vec4 diffuse = diffuse_term; - NdotL = dot(n, lightDir); - //NdotL = dot(n, (gl_ModelViewMatrix * vec4 (light_vec,0.0)).xyz); - if (NdotL > 0.0) { - - diffuse.rgb += 2.0 * diffuse.rgb * (1.0 - opacity.a); - color += diffuse * NdotL * opacity; - NdotHV = max(dot(n, halfVector), 0.0); - if (gl_FrontMaterial.shininess > 0.0) - specular.rgb = (gl_FrontMaterial.specular.rgb - * light_specular.rgb - * pow(NdotHV, gl_FrontMaterial.shininess)); - } - color.a = diffuse.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); - - vec3 secondary_light = vec3 (0.0,0.0,0.0); - - if (use_flashlight == 1) - { - secondary_light.rgb += flashlight(light_filter_one, light_radius); - } - if (use_flashlight == 2) - { - secondary_light.rgb += flashlight(light_filter_two, light_radius); - } - float dist = length(relPos); - color.rgb += secondary_light * light_distance_fading(dist); - - texel = texture2D(texture, gl_TexCoord[0].st); - fragColor = color * texel + specular; - - // implicit lightmap - the user gets to select - - if (implicit_lightmap_enabled == 1) - { - float cdiff = (length(texel.rgb - tag_color)); - float enhance = 1.0 - smoothstep(threshold_low, threshold_high, cdiff); - fragColor.rgb = fragColor.rgb + enhance * emit_color * emit_intensity; - } - - -fragColor.rgb = filter_combined(fragColor.rgb); - -gl_FragColor = fragColor; -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; -} - diff --git a/Compositor/Shaders/ALS/model-interior-detailed.frag b/Compositor/Shaders/ALS/model-interior-detailed.frag deleted file mode 100644 index fda1d5bbf..000000000 --- a/Compositor/Shaders/ALS/model-interior-detailed.frag +++ /dev/null @@ -1,248 +0,0 @@ -// -*-C++-*- -#version 120 - -// written by Thorsten Renk, Oct 2015 - -varying vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; -varying vec3 rawpos; - - -uniform float fg_Fcoef; - -uniform sampler2D texture; -uniform sampler2D lightmap_texture; -uniform sampler2D grain_texture; -uniform samplerCube cube_texture; - - -varying float yprime_alt; -varying float mie_angle; - -varying float flogz; - - -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 cloud_self_shading; -uniform float angle; -uniform float threshold_low; -uniform float threshold_high; -uniform float emit_intensity; -uniform float light_radius; -uniform float lightmap_r_factor; -uniform float lightmap_g_factor; -uniform float lightmap_b_factor; -uniform float lightmap_a_factor; -uniform float grain_magnification; - -uniform vec3 offset_vec; -uniform vec3 scale_vec; -uniform vec3 tag_color; -uniform vec3 emit_color; -uniform vec3 light_filter_one; -uniform vec3 light_filter_two; -uniform vec3 lightmap_r_color; -uniform vec3 lightmap_g_color; -uniform vec3 lightmap_b_color; -uniform vec3 lightmap_a_color; - -uniform int quality_level; -uniform int tquality_level; -uniform int use_searchlight; -uniform int implicit_lightmap_enabled; -uniform int use_flashlight; -uniform int lightmap_enabled; -uniform int lightmap_multi; -uniform int grain_texture_enabled; - - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - -float alt; -float eShade; - - -float fog_func (in float targ, in float 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 addLights(in vec3 color1, in vec3 color2); -vec3 flashlight(in vec3 color, in float radius); -vec3 filter_combined (in vec3 color) ; - -float luminance(vec3 color) -{ - return dot(vec3(0.212671, 0.715160, 0.072169), color); -} - - -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 > 30.0) {return e;} -if (x < -15.0) {return 0.0;} - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - -// this determines how light is attenuated in the distance -// physically this should be exp(-arg) but for technical reasons we use a sharper cutoff -// for distance > visibility - - - - -void main() -{ - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); -// this is taken from default.frag - 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 fragColor; - vec3 specular = vec3(0.0); - float intensity; - - float effective_scattering = min(scattering, cloud_self_shading); - - eShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt); - vec4 light_specular = gl_LightSource[0].specular * (eShade - 0.1); - - // 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); - - // lookup on the opacity map - vec3 light_vec = normalize((gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz); - //vec3 light_vec = vec3 (-1.0,0.0,0.0); - - vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0); - vec3 scaled_pos = relPos + ep.xyz; - - //vec3 lookup_vec = normalize(- normalize(light_vec) + relPos); - scaled_pos -= offset_vec; - float rangle = radians(angle); - mat2 rotMat = mat2 (cos(rangle), -sin(rangle), sin(rangle), cos(rangle)); - scaled_pos.xy *=rotMat; - - scaled_pos /= scale_vec; - - //vec3 lookup_pos = dot(base1,scaled_pos) * base1 + dot(base2,scaled_pos) * base2; - vec3 lookup_pos = scaled_pos - light_vec * dot(light_vec, scaled_pos); - - vec3 lookup_vec = normalize(normalize(light_vec) + lookup_pos); - vec4 opacity = textureCube(cube_texture, lookup_vec); - - - vec4 diffuse = diffuse_term; - NdotL = dot(n, lightDir); - //NdotL = dot(n, (gl_ModelViewMatrix * vec4 (light_vec,0.0)).xyz); - if (NdotL > 0.0) { - - diffuse.rgb += 2.0 * diffuse.rgb * (1.0 - opacity.a); - color += diffuse * NdotL * opacity; - - //NdotHV = max(dot(n, halfVector), 0.0); - if (gl_FrontMaterial.shininess > 0.0) { - vec3 ecViewDir = (gl_ModelViewMatrix * (ep - vec4(rawpos, 1.0))).xyz; - vec3 HV = normalize(normalize(gl_LightSource[0].position.xyz) + normalize(ecViewDir)); - NdotHV = max(0.0, dot(n,HV)); - specular = (gl_FrontMaterial.specular.rgb - * (light_specular.rgb+2.0*light_specular.rgb*(1.0-opacity.a)) - * pow(NdotHV, gl_FrontMaterial.shininess)*opacity.rgb); - } - } - color.a = diffuse.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); - - vec3 secondary_light = vec3 (0.0,0.0,0.0); - - if (use_flashlight == 1) - { - secondary_light.rgb += flashlight(light_filter_one, light_radius); - } - if (use_flashlight == 2) - { - secondary_light.rgb += flashlight(light_filter_two, light_radius); - } - float dist = length(relPos); - color.rgb += secondary_light * light_distance_fading(dist); - - texel = texture2D(texture, gl_TexCoord[0].st); - - if (grain_texture_enabled ==1) - { - vec4 grainTexel = texture2D(grain_texture, gl_TexCoord[0].st * grain_magnification); - texel.rgb = mix(texel.rgb, grainTexel.rgb, grainTexel.a ); - } - - - fragColor = color * texel; - fragColor.rgb += specular.rgb; - - // implicit lightmap - the user gets to select a color which is then made emissive - - if (implicit_lightmap_enabled == 1) - { - float cdiff = (length(texel.rgb - tag_color)); - float enhance = 1.0 - smoothstep(threshold_low, threshold_high, cdiff); - fragColor.rgb = fragColor.rgb + enhance * emit_color * emit_intensity; - } - - // explicit lightmap - - vec3 lightmapcolor = vec3(0.0, 0.0, 0.0); - - - if (lightmap_enabled == 1) - { - vec4 lightmapTexel = texture2D(lightmap_texture, gl_TexCoord[0].st); - 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 ; - - lightmapcolor = lightmap_r_color * lightmapFactor.r; - lightmapcolor = addLights(lightmapcolor, lightmap_g_color * lightmapFactor.g); - lightmapcolor = addLights(lightmapcolor, lightmap_b_color * lightmapFactor.b); - lightmapcolor = addLights(lightmapcolor, lightmap_a_color * lightmapFactor.a); - } - else - { - lightmapcolor = lightmapTexel.rgb * lightmap_r_color * lightmapFactor.r; - } - fragColor.rgb = max(fragColor.rgb, lightmapcolor.rgb * gl_FrontMaterial.diffuse.rgb * smoothstep(0.0, 1.0, texel.rgb*.5 + lightmapcolor.rgb*.5)); - } - -fragColor.rgb = filter_combined(fragColor.rgb); - -gl_FragColor = fragColor; -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; - -} - diff --git a/Compositor/Shaders/ALS/model-interior-detailed.vert b/Compositor/Shaders/ALS/model-interior-detailed.vert deleted file mode 100644 index 8b40fe0e7..000000000 --- a/Compositor/Shaders/ALS/model-interior-detailed.vert +++ /dev/null @@ -1,308 +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 vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; -varying vec3 rawpos; - -varying float yprime_alt; -varying float mie_angle; - -varying float flogz; - -uniform int colorMode; -uniform int irradiance_map_type; -uniform int ra_irradiance_map_type; - -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 moonlight; -uniform float irradiance_map_strength; -uniform float ra_irradiance_map_strength; -uniform float scattering; -uniform float residual_ambience_r; -uniform float residual_ambience_g; -uniform float residual_ambience_b; - - -// 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 earthShade; - -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() -{ - rawpos = gl_Vertex.xyz; - vec4 light_diffuse; - 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 eff_scattering; - -// this code is copied from default.vert - - //vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex; - gl_Position = ftransform(); - // logarithmic depth - flogz = 1.0 + gl_Position.w; - 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); - eff_scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_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.a = 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.xyz); - - light_ambient.rgb = intensity * normalize(mix(light_ambient.rgb, 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.rgb = intensity * normalize(mix(light_diffuse.rgb, 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 = vec4 (1.0, 1.0, 1.0, 0.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_diffuse.a = 1.0; - - light_ambient.r = 0.316 + lightArg * 0.016; - 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; - } - - light_diffuse = light_diffuse * smoothstep(0.5, 1.0, scattering); - yprime_alt = -sqrt(2.0 * EarthRadius * hazeLayerAltitude); -} - -// irradiance mapping for ambient light - - float ambient_irradiance_factor = 1.0; - float steepness = dot(normalize(gl_Normal), vec3 (0.0, 0.0, 1.0)); - - - if (irradiance_map_type == 1) // maximum irradiance from zenith - { - ambient_irradiance_factor = (1.0 - irradiance_map_strength) + 1.3 * irradiance_map_strength * (0.5 + 0.5 * steepness); - } - else if (irradiance_map_type == 2) //maximum irradiance from sides - { - ambient_irradiance_factor = (1.0 - irradiance_map_strength) + 1.3 * irradiance_map_strength * (1.0 - abs(steepness)); - } - else if (irradiance_map_type == 3) // maximum irradiance from +x direction - { - float forwardness = dot(normalize(gl_Normal), vec3 (-1.0, 0.0, 0.0)); - - ambient_irradiance_factor = (1.0 - irradiance_map_strength) + 1.5 * irradiance_map_strength * (1.0 - abs(steepness)) * (0.5 + 0.5 * forwardness); - } - - light_ambient = light_ambient * ambient_irradiance_factor; - -// residual ambience - comes with its own irradiance map - - vec3 residual_ambience = vec3 (residual_ambience_r, residual_ambience_g, residual_ambience_b); - - ambient_irradiance_factor = 1.0; - - if (ra_irradiance_map_type == 1) // maximum irradiance from zenith - { - ambient_irradiance_factor = (1.0 - ra_irradiance_map_strength) + 1.3 * ra_irradiance_map_strength * (0.5 + 0.5 * steepness); - } - else if (ra_irradiance_map_type == 2) //maximum irradiance from sides - { - ambient_irradiance_factor = (1.0 - ra_irradiance_map_strength) + 1.3 * ra_irradiance_map_strength * (1.0 - abs(steepness)); - } - else if (ra_irradiance_map_type == 3) // maximum irradiance from +x direction - { - float forwardness = dot(normalize(gl_Normal), vec3 (-1.0, 0.0, 0.0)); - - ambient_irradiance_factor = (1.0 - ra_irradiance_map_strength) + 1.5 * ra_irradiance_map_strength * (1.0 - abs(steepness)) * (0.5 + 0.5 * forwardness); - } - - // make sure the residual ambience is only visible when it's dark enough - float residual_fraction = length(residual_ambience.rgb) / (length(light_ambient.rgb + residual_ambience.rgb) + 0.01); - - light_ambient.rgb += residual_ambience.rgb * ambient_irradiance_factor * smoothstep(0.4, 0.6, residual_fraction); - -// default lighting based on texture and material using the light we have just computed - - diffuse_term = diffuse_color* light_diffuse; - vec4 constant_term = gl_FrontMaterial.emission + ambient_color * - (gl_LightModel.ambient + light_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; - -} - - - - diff --git a/Compositor/Shaders/ALS/model-interior-display.frag b/Compositor/Shaders/ALS/model-interior-display.frag deleted file mode 100644 index 3582ad5ca..000000000 --- a/Compositor/Shaders/ALS/model-interior-display.frag +++ /dev/null @@ -1,368 +0,0 @@ -// -*-C++-*- -#version 120 - -// written by Thorsten Renk, Oct 2017 - -varying vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; - - -uniform float fg_Fcoef; - -uniform sampler2D texture; -uniform sampler2D dust_texture; -uniform sampler2D lightmap_texture; -uniform sampler2D grain_texture; -uniform samplerCube cube_texture; - - -varying float yprime_alt; -varying float mie_angle; - -varying float flogz; - - -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 cloud_self_shading; -uniform float angle; -uniform float threshold_low; -uniform float threshold_high; -uniform float emit_intensity; -uniform float light_radius; -uniform float dirt_factor; -uniform float lightmap_r_factor; -uniform float lightmap_g_factor; -uniform float lightmap_b_factor; -uniform float lightmap_a_factor; -uniform float grain_magnification; -uniform float sample_res; - - -uniform float contrast; - -uniform vec3 offset_vec; -uniform vec3 scale_vec; -uniform vec3 tag_color; -uniform vec3 emit_color; -uniform vec3 light_filter_one; -uniform vec3 light_filter_two; -uniform vec3 lightmap_r_color; -uniform vec3 lightmap_g_color; -uniform vec3 lightmap_b_color; -uniform vec3 lightmap_a_color; - - -uniform int quality_level; -uniform int tquality_level; -uniform int use_searchlight; -uniform int implicit_lightmap_enabled; -uniform int use_flashlight; -uniform int lightmap_enabled; -uniform int lightmap_multi; -uniform int grain_texture_enabled; - - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - -float alt; -float eShade; - - -float fog_func (in float targ, in float 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 addLights(in vec3 color1, in vec3 color2); -vec3 flashlight(in vec3 color, in float radius); -vec3 filter_combined (in vec3 color) ; - -float luminance(vec3 color) -{ - return dot(vec3(0.212671, 0.715160, 0.072169), color); -} - - -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 > 30.0) {return e;} -if (x < -15.0) {return 0.0;} - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - -// bloom effect on the display texture - - -vec4 find_max (in vec4 texel1, in vec4 texel2, in vec4 texel3, in vec4 texel4) -{ - -float r = max(texel1.r, texel2.r); -r = max(r, texel3.r); -r = max(r, texel4.r); - -float g = max(texel1.g, texel2.g); -g = max(g, texel3.g); -g = max(g, texel4.g); - -float b = max(texel1.b, texel2.b); -b = max(b, texel3.b); -b = max(b, texel4.b); - -float a = max(texel1.a, texel2.a); -a = max(a, texel3.a); -a = max(a, texel4.a); - -//float a = (texel1.a + texel2.a + texel3.a + texel4.a)/4.0; - -return vec4 (r,g,b,a); -} - -vec4 get_blurred_texel (in vec4 direct_light) -{ - - - -float fade0 = smoothstep(0.5, 1.0,contrast); -float fade1 = 0.25 * contrast * contrast; -float fade2 = 0.25 * contrast * contrast; - -//fade0 = 1.0; -//fade1 = 1.0; -//fade2 = 1.0; - -float desaturation_brightness = 1.0; - -float sample_far = 2.0; -float curr_sample_res = sample_res * contrast; - -vec4 texel = texture2D(texture, gl_TexCoord[0].st); - -vec4 texel1 = texture2D(texture, vec2 (gl_TexCoord[0].s + curr_sample_res, gl_TexCoord[0].t)); -vec4 texel2 = texture2D(texture, vec2 (gl_TexCoord[0].s - curr_sample_res, gl_TexCoord[0].t)); -vec4 texel3 = texture2D(texture, vec2 (gl_TexCoord[0].s, gl_TexCoord[0].t + curr_sample_res)); -vec4 texel4 = texture2D(texture, vec2 (gl_TexCoord[0].s, gl_TexCoord[0].t - curr_sample_res)); - -vec4 sample_texel = find_max (texel1, texel2, texel3, texel4); - -texel.rgb += fade0 * sample_texel.rgb; - - -texel1 = texture2D(texture, vec2 (gl_TexCoord[0].s + sample_far * curr_sample_res, gl_TexCoord[0].t+ sample_far * curr_sample_res)); -texel2 = texture2D(texture, vec2 (gl_TexCoord[0].s - sample_far * curr_sample_res, gl_TexCoord[0].t+ sample_far * curr_sample_res)); -texel3 = texture2D(texture, vec2 (gl_TexCoord[0].s + sample_far * curr_sample_res, gl_TexCoord[0].t- sample_far * curr_sample_res)); -texel4 = texture2D(texture, vec2 (gl_TexCoord[0].s - sample_far * curr_sample_res, gl_TexCoord[0].t- sample_far * curr_sample_res)); - -sample_texel = find_max (texel1, texel2, texel3, texel4); - -texel.rgb += fade1 * sample_texel.rgb; - - - -texel1 = texture2D(texture, vec2 (gl_TexCoord[0].s + 2.0 * sample_far * curr_sample_res, gl_TexCoord[0].t - curr_sample_res)); -texel2 = texture2D(texture, vec2 (gl_TexCoord[0].s - 2.0 * sample_far * curr_sample_res, gl_TexCoord[0].t + curr_sample_res)); -texel3 = texture2D(texture, vec2 (gl_TexCoord[0].s - curr_sample_res, gl_TexCoord[0].t + 2.0 * sample_far * curr_sample_res)); -texel4 = texture2D(texture, vec2 (gl_TexCoord[0].s + curr_sample_res, gl_TexCoord[0].t - 2.0 * sample_far * curr_sample_res)); - -sample_texel = find_max (texel1, texel2, texel3, texel4); - -texel.rgb += fade2 * sample_texel.rgb; - - -texel1 = texture2D(texture, vec2 (gl_TexCoord[0].s + 2.5 * sample_far * curr_sample_res, gl_TexCoord[0].t + 2.5 * sample_far * curr_sample_res)); -texel2 = texture2D(texture, vec2 (gl_TexCoord[0].s - 2.5 * sample_far * curr_sample_res, gl_TexCoord[0].t + 2.5 * sample_far * curr_sample_res)); -texel3 = texture2D(texture, vec2 (gl_TexCoord[0].s + 2.5 * sample_far * curr_sample_res, gl_TexCoord[0].t - 2.5 * sample_far * curr_sample_res)); -texel4 = texture2D(texture, vec2 (gl_TexCoord[0].s - 2.5 * sample_far * curr_sample_res, gl_TexCoord[0].t - 2.5 * sample_far * curr_sample_res)); - -sample_texel = find_max (texel1, texel2, texel3, texel4); - -texel.rgb += fade2 * sample_texel.rgb; - - - -texel.rgb/= (1.0 + 1.0 * fade0 + 1.0 * fade1 + 2.0 * fade2); -texel.a = smoothstep(0.0, 0.1, length(texel.rgb)); - -texel.a *= (1.0 - 0.9 * smoothstep(0.0, 1.0, length(direct_light.rgb)/1.73 * 4.0 *( 0.5 - contrast)) ); - -float threshold_high = max(desaturation_brightness, 0.05) * 1.0; -float threshold_mid = max(desaturation_brightness, 0.05) * 0.6; - -float pixel_brightness = max(texel.r, texel.g); -pixel_brightness = max(pixel_brightness, texel.b); -pixel_brightness *= contrast; - - -texel.rgb = mix(texel.rgb, vec3 (1.0, 1.0, 1.0), 0.9 * smoothstep(threshold_mid, threshold_high, pixel_brightness)); - - -return texel; -} - - -void main() -{ - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); -// this is taken from default.frag - 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 fragColor; - vec4 specular = vec4(0.0); - float intensity; - - float effective_scattering = min(scattering, cloud_self_shading); - - eShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt); - vec4 light_specular = gl_LightSource[0].specular * (eShade - 0.1); - - // 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); - - // lookup on the opacity map - vec3 light_vec = normalize((gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz); - //vec3 light_vec = vec3 (-1.0,0.0,0.0); - - vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0); - vec3 scaled_pos = relPos + ep.xyz; - - //vec3 lookup_vec = normalize(- normalize(light_vec) + relPos); - scaled_pos -= offset_vec; - float rangle = radians(angle); - mat2 rotMat = mat2 (cos(rangle), -sin(rangle), sin(rangle), cos(rangle)); - scaled_pos.xy *=rotMat; - - scaled_pos /= scale_vec; - - //vec3 lookup_pos = dot(base1,scaled_pos) * base1 + dot(base2,scaled_pos) * base2; - vec3 lookup_pos = scaled_pos - light_vec * dot(light_vec, scaled_pos); - - vec3 lookup_vec = normalize(normalize(light_vec) + lookup_pos); - vec4 opacity = textureCube(cube_texture, lookup_vec); - - - vec4 diffuse = diffuse_term; - NdotL = dot(n, lightDir); - //NdotL = dot(n, (gl_ModelViewMatrix * vec4 (light_vec,0.0)).xyz); - if (NdotL > 0.0) { - - diffuse.rgb += 2.0 * diffuse.rgb * (1.0 - opacity.a); - color += diffuse * NdotL * opacity; - NdotHV = max(dot(n, halfVector), 0.0); - if (gl_FrontMaterial.shininess > 0.0) - specular.rgb = (gl_FrontMaterial.specular.rgb - * light_specular.rgb - * pow(NdotHV, gl_FrontMaterial.shininess)); - } - color.a = diffuse.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); - - vec3 secondary_light = vec3 (0.0,0.0,0.0); - - if (use_flashlight == 1) - { - secondary_light.rgb += flashlight(light_filter_one, light_radius); - } - if (use_flashlight == 2) - { - secondary_light.rgb += flashlight(light_filter_two, light_radius); - } - float dist = length(relPos); - color.rgb += secondary_light * light_distance_fading(dist); - - //texel = texture2D(texture, gl_TexCoord[0].st); - - texel = get_blurred_texel(diffuse * max(0.0, NdotL) * opacity); - - if (grain_texture_enabled ==1) - { - vec4 grainTexel = texture2D(grain_texture, gl_TexCoord[0].st * grain_magnification); - texel.rgb = mix(texel.rgb, grainTexel.rgb, grainTexel.a ); - } - - - - fragColor = color * texel + specular; - - // explicit lightmap - - vec3 lightmapcolor = vec3(0.0, 0.0, 0.0); - - - if (lightmap_enabled == 1) - { - vec4 lightmapTexel = texture2D(lightmap_texture, gl_TexCoord[0].st); - 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; - lightmapcolor = addLights(lightmapcolor, lightmap_g_color * lightmapFactor.g); - lightmapcolor = addLights(lightmapcolor, lightmap_b_color * lightmapFactor.b); - lightmapcolor = addLights(lightmapcolor, lightmap_a_color * lightmapFactor.a); - - } - else - { - lightmapcolor = lightmapTexel.rgb * lightmap_r_color * lightmapFactor.r; - } - - - // implicit lightmap - the user gets to select a color which is then made emissive - - if (implicit_lightmap_enabled == 1) - { - float cdiff = (length(texel.rgb - tag_color)); - float enhance = 1.0 - smoothstep(threshold_low, threshold_high, cdiff); - enhance *= (1.0 - length(lightmapcolor.rgb)/1.73); - fragColor.rgb = fragColor.rgb + enhance * emit_color * emit_intensity; - } - - - fragColor.rgb = max(fragColor.rgb, lightmapcolor.rgb * gl_FrontMaterial.diffuse.rgb * smoothstep(0.0, 1.0, texel.rgb*.5 + lightmapcolor.rgb*.5)); - } - - // add visible dust for glancing sun angle - - vec4 dustTexel = texture2D(dust_texture, gl_TexCoord[0].st); - dustTexel.rgb *= diffuse.rgb; - dustTexel.a = clamp(dustTexel.a * dirt_factor * (1.0 - 0.4 * max(0.0,NdotL)) * (length(opacity.rgb)/1.76),0.0,1.0); - fragColor.rgb = mix(fragColor.rgb, dustTexel.rgb, dustTexel.a ); - fragColor.a = max(fragColor.a, dustTexel.a); - - -fragColor.rgb = filter_combined(fragColor.rgb); - -gl_FragColor = fragColor; -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; - - -} - diff --git a/Compositor/Shaders/ALS/model-transparent.frag b/Compositor/Shaders/ALS/model-transparent.frag deleted file mode 100644 index 6aa49a409..000000000 --- a/Compositor/Shaders/ALS/model-transparent.frag +++ /dev/null @@ -1,51 +0,0 @@ -// -*-C++-*- - -// Ambient term comes in gl_Color.rgb. -#version 120 - -varying vec4 diffuse_term; -varying vec3 normal; - -varying float flogz; - -uniform float fg_Fcoef; - -uniform sampler2D texture; - -void main() -{ - vec3 n; - float NdotL, NdotHV; - 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); - - // 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); - fragColor = color * texel + specular; - - gl_FragColor = fragColor; - // logarithmic depth - gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; -} diff --git a/Compositor/Shaders/ALS/model-transparent.vert b/Compositor/Shaders/ALS/model-transparent.vert deleted file mode 100644 index fc69445af..000000000 --- a/Compositor/Shaders/ALS/model-transparent.vert +++ /dev/null @@ -1,65 +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 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 flogz; - -uniform int colorMode; - -////fog "include"//////// -//uniform int fogType; -// -//void fog_Func(int type); -///////////////////////// - -void main() -{ - gl_Position = ftransform(); - // logarithmic depth - flogz = 1.0 + gl_Position.w; - 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); - //fog_Func(fogType); -} diff --git a/Compositor/Shaders/ALS/model-ultra.frag b/Compositor/Shaders/ALS/model-ultra.frag deleted file mode 100644 index fc9915f07..000000000 --- a/Compositor/Shaders/ALS/model-ultra.frag +++ /dev/null @@ -1,691 +0,0 @@ -// -*- mode: C; -*- -// Licence: GPL v2 -// Authors: Frederic Bouvier and Gijs de Rooy -// with major additions and revisions by -// Emilian Huminiuc and Vivian Meazza 2011 -// ported to Atmospheric Light Scattering -// by Thorsten Renk, 2013 -#version 120 - -varying vec3 VBinormal; -varying vec3 VNormal; -varying vec3 VTangent; -varying vec3 rawpos; -varying vec3 reflVec; -varying vec3 vViewVec; -varying vec3 vertVec; - -varying float alpha; - -varying float flogz; - -uniform float fg_Fcoef; - -uniform sampler2D BaseTex; -uniform sampler2D LightMapTex; -uniform sampler2D NormalTex; -uniform sampler2D ReflMapTex; -uniform sampler2D ReflGradientsTex; -uniform sampler3D ReflNoiseTex; -uniform samplerCube Environment; -uniform sampler2D GrainTex; - -uniform int dirt_enabled; -uniform int dirt_multi; -uniform int dirt_modulates_reflection; -uniform int lightmap_enabled; -uniform int lightmap_multi; -uniform int nmap_dds; -uniform int nmap_enabled; -uniform int refl_enabled; -uniform int refl_type; -uniform int refl_map; -uniform int grain_texture_enabled; -uniform int rain_enabled; -uniform int cloud_shadow_flag; -uniform int use_searchlight; -uniform int use_landing_light; -uniform int use_alt_landing_light; -uniform int snow_enabled; -uniform int building_flag; - -uniform float amb_correction; -uniform float dirt_b_factor; -uniform float dirt_g_factor; -uniform float dirt_r_factor; -uniform float dirt_reflection_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_fresnel_factor; -uniform float refl_noise; -uniform float refl_rainbow; -uniform float grain_magnification; -uniform float wetness; -uniform float rain_norm; - -uniform float avisibility; -uniform float cloud_self_shading; -uniform float eye_alt; -uniform float ground_scattering; -uniform float hazeLayerAltitude; -uniform float moonlight; -uniform float overcast; -uniform float scattering; -uniform float terminator; -uniform float terrain_alt; -uniform float visibility; -uniform float air_pollution; -uniform float snowlevel; -uniform float snow_thickness_factor; - -uniform float osg_SimulationTime; -uniform mat4 osg_ViewMatrix; - -uniform float landing_light1_offset; -uniform float landing_light2_offset; -uniform float landing_light3_offset; - -uniform bool use_IR_vision; - -// constants needed by the light and fog computations ################################################### - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - -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; - -float DotNoise2D(in vec2 coord, in float wavelength, in float fractionalMaxDotSize, in float dot_density); -float Noise2D(in vec2 coord, in float wavelength); -float shadow_func (in float x, in float y, in float noise, in float dist); -float fog_func (in float targ, in float altitude); -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 lightArg); -vec3 searchlight(); -vec3 landing_light(in float offset, in float offsetv); -vec3 filter_combined (in vec3 color) ; -vec3 moonlight_perception (in vec3 light) ; -vec3 addLights(in vec3 color1, in vec3 color2); - -float getShadowing(); - - -float light_func (in float x, in float a, in float b, in float c, in float d, in float e) - { - if (x > 30.0) {return e;} - if (x < -15.0) {return 0.0;} - return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); - } - - - - - -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); - - vec4 grainTexel; - - vec3 mixedcolor; - vec3 N = vec3(0.0,0.0,1.0); - - - float pf = 0.0; - float pf1 = 0.0; - ///some generic light scattering parameters - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight; - moonLightColor = moonlight_perception(moonLightColor); - float alt = eye_alt; - float effective_scattering = min(scattering, cloud_self_shading); - - - /// BEGIN geometry for light - - vec3 up; - - if (building_flag == 1) // osg_ViewMatrix contains the transforms of animations, but doesn't work for random buildings - { - up = (gl_ModelViewMatrix * vec4(0.0,0.0,1.0,0.0)).xyz; - } - else - { - up = (osg_ViewMatrix * vec4(0.0,0.0,1.0,0.0)).xyz; - } - //vec4 worldPos3D = (osg_ViewMatrixInverse * vec4 (0.0,0.0,0.0, 1.0)); - //worldPos3D.a = 0.0; - //vec3 up = (osg_ViewMatrix * worldPos3D).xyz; - float dist = length(vertVec); - float vertex_alt = max(100.0,dot(up, vertVec) + alt); - float vertex_scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_alt); - - - vec3 lightHorizon = gl_LightSource[0].position.xyz - up * dot(up,gl_LightSource[0].position.xyz); - float yprime = -dot(vertVec, lightHorizon); - float yprime_alt = yprime - sqrt(2.0 * EarthRadius * vertex_alt); - float lightArg = (terminator-yprime_alt)/100000.0; - - float earthShade = 0.6 * (1.0 - smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt)) + 0.4; - - float mie_angle; - if (lightArg < 10.0) - {mie_angle = (0.5 * dot(normalize(vertVec), normalize(gl_LightSource[0].position.xyz)) ) + 0.5;} - else - {mie_angle = 1.0;} - - float fog_vertex_alt = max(vertex_alt,hazeLayerAltitude); - float fog_yprime_alt = yprime_alt; - if (fog_vertex_alt > hazeLayerAltitude) - { - if (dist > 0.8 * avisibility) - { - fog_vertex_alt = mix(fog_vertex_alt, hazeLayerAltitude, smoothstep(0.8*avisibility, avisibility, dist)); - fog_yprime_alt = yprime -sqrt(2.0 * EarthRadius * fog_vertex_alt); - } - } - else - { - fog_vertex_alt = hazeLayerAltitude; - fog_yprime_alt = yprime -sqrt(2.0 * EarthRadius * fog_vertex_alt); - } - - float fog_lightArg = (terminator-fog_yprime_alt)/100000.0; - float fog_earthShade = 0.9 * smoothstep(terminator_width+ terminator, -terminator_width + terminator, fog_yprime_alt) + 0.1; - float delta_z = hazeLayerAltitude - eye_alt; - - - float ct = dot(normalize(up), normalize(vertVec)); - vec3 relPos = (gl_ModelViewMatrixInverse * vec4 (vertVec,0.0)).xyz; - - /// END geometry for light - - - /// BEGIN light - vec4 light_diffuse; - vec4 light_ambient; - float intensity; - - 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.a = 1.0; - light_diffuse = light_diffuse * vertex_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; - - if (earthShade < 0.5) - { - intensity = length(light_ambient.rgb); - light_ambient.rgb = intensity * normalize(mix(light_ambient.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.8,earthShade) )); - light_ambient.rgb = light_ambient.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade)); - - intensity = length(light_diffuse.rgb); - light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.7,earthShade) )); - } - - vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0); - vec3 ecViewDir = (gl_ModelViewMatrix * (ep - vec4(rawpos, 1.0))).xyz; - vec3 HV = normalize(normalize(gl_LightSource[0].position.xyz) + normalize(ecViewDir)); - - /// END light - - /// BEGIN grain overlay - if (grain_texture_enabled ==1) - { - grainTexel = texture2D(GrainTex, gl_TexCoord[0].st * grain_magnification); - texel.rgb = mix(texel.rgb, grainTexel.rgb, grainTexel.a ); - } - else if (grain_texture_enabled == 2) - { - grainTexel = texture2D(GrainTex, rawpos.xy * grain_magnification); - texel.rgb = mix(texel.rgb, grainTexel.rgb, grainTexel.a ); - } - - /// END grain overlay - - /// BEGIN snowcover - - vec4 snow_texel = vec4 (0.95, 0.95, 0.95, 1.0); - - if (snow_enabled == 1) - { - float noise_1m = Noise2D(rawpos.xy, 1.0); - float noise_5m = Noise2D(rawpos.xy, 5.0); - - float noise_term = 0.5 * (noise_5m - 0.5); - noise_term += 0.5 * (noise_1m - 0.5); - snow_texel.a = snow_texel.a * 0.2+0.8* smoothstep(0.2,0.8, 0.3 +noise_term + 0.5*snow_thickness_factor +0.0001*(relPos.z +eye_alt -snowlevel) ); - - snow_texel.a *= smoothstep(0.5, 0.7,dot(VNormal, up)); - - - float noise_2000m = 0.0; - float noise_10m = 0.0; - - - texel.rgb = mix(texel.rgb, snow_texel.rgb, snow_texel.a* smoothstep(snowlevel, snowlevel+200.0, 1.0 * (relPos.z + eye_alt)+ (noise_2000m + 0.1 * noise_10m -0.55) *400.0)); - } - - /// END snowcover - - vec3 reflVecN; - - ///BEGIN bump - if (nmap_enabled > 0){ - N = nmap.rgb * 2.0 - 1.0; - // this is exact only for viewing under 90 degrees but much faster than the real solution - reflVecN = normalize (N.x * VTangent + N.y * VBinormal + N.z * reflVec); - N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal); - if (nmap_dds > 0) - N = -N; - } else { - N = normalize(VNormal); - reflVecN = reflVec; - } - ///END bump - - - - vec4 reflection = textureCube(Environment, reflVecN ); - vec3 viewVec = normalize(vViewVec); - float v = abs(dot(viewVec, normalize(VNormal)));// Map a rainbowish color - vec4 fresnel = texture2D(ReflGradientsTex, vec2(v, 0.75)); - vec4 rainbow = texture2D(ReflGradientsTex, vec2(v, 0.25)); - - 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))); - float nDotHV = max(0.0, dot(N,HV)); - //glare on the backside of tranparent objects - if ((gl_FrontMaterial.diffuse.a < 1.0 || texel.a < 1.0) - && dot(N, normalize(gl_LightSource[0].position.xyz)) < 0.0) { - nDotVP = max(0.0, dot(-N, normalize(gl_LightSource[0].position.xyz)) * (1.0 -texel.a) ); - nDotHV = max(0.0, dot(-N, HV) * (1.0 -texel.a) ); - } - - float nDotVP1 = 0.0; - float nDotHV1 = 0.0; - - - // try specular reflection of sky irradiance - nDotVP1 = max(0.0, dot(N, up)); - nDotHV1 = max(0.0, dot(N, normalize(normalize(up) + normalize(-vertVec)))); - - - if (nDotVP == 0.0) - {pf = 0.0;} - else - {pf = pow(nDotHV, gl_FrontMaterial.shininess);} - - if (nDotVP1 == 0.0) - {pf1 = 0.0;} - else - {pf1 = pow(nDotHV1, 0.5*gl_FrontMaterial.shininess);} - - - float shadowmap = getShadowing(); - light_diffuse *= shadowmap; - - if (cloud_shadow_flag == 1) - { - float cloud_shadow_factor = shadow_func(relPos.x, relPos.y, 1.0, dist); - cloud_shadow_factor = 1.0 - ((1.0 - cloud_shadow_factor) * (1.0 - smoothstep (-100.0, 100.0, vertex_alt - hazeLayerAltitude))); - light_diffuse = light_diffuse * cloud_shadow_factor; - } - - 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); - } - - - vec4 Diffuse = light_diffuse * nDotVP; - Diffuse.rgb += secondary_light * light_distance_fading(dist); - if (use_IR_vision) - { - Diffuse.rgb = max(Diffuse.rgb, vec3 (0.5, 0.5, 0.5)); - } - - ///BEGIN reflection correction by dirt - - float refl_d = 1.0; - - if ((dirt_enabled == 1) && (dirt_modulates_reflection == 1)) - { - refl_d = 1.0 - (reflmap.r * dirt_r_factor * (1.0 - dirt_reflection_factor)); - } - - ///END reflection correction by dirt - - - vec4 Specular = gl_FrontMaterial.specular * light_diffuse * pf + gl_FrontMaterial.specular * light_ambient * pf1; - Specular+= gl_FrontMaterial.specular * pow(max(0.0,-dot(N,normalize(vertVec))),gl_FrontMaterial.shininess) * vec4(secondary_light,1.0); - - Specular *= refl_d; - Specular *= shadowmap; - - vec4 color = gl_Color + Diffuse * gl_FrontMaterial.diffuse; - color = clamp( color, 0.0, 1.0 ); - - //////////////////////////////////////////////////////////////////// - //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 - //float pam = (map.a * -2) + 1; //reverse map - 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; - } - - // enhance low angle reflection by a fresnel term - float fresnel_enhance = (1.0-smoothstep(0.0,0.4, dot(N,-normalize(vertVec)))) * refl_fresnel_factor; - - reflFactor+=fresnel_enhance; - - reflFactor = clamp(reflFactor, 0.0, 1.0); - - // add fringing fresnel and rainbow effects and modulate by reflection - vec4 reflcolor = mix(reflection, rainbow, refl_rainbow * v); - //vec4 reflcolor = reflection; - vec4 reflfrescolor = mix(reflcolor, fresnel, refl_fresnel * v); - vec4 noisecolor = mix(reflfrescolor, noisevec, refl_noise); - //vec4 raincolor = vec4(noisecolor.rgb * reflFactor, 1.0); - vec4 raincolor = vec4(noisecolor.rgb, 1.0); - raincolor += Specular; - raincolor *= light_diffuse; - - if (refl_type == 1) - {mixedcolor = mix(texel, raincolor, reflFactor * refl_d).rgb;} - else if (refl_type == 2) - {mixedcolor = ((texel +(reflcolor * reflFactor * refl_d))-(0.5*reflFactor * refl_d)).rgb;} - - } else { - mixedcolor = texel.rgb; - } - ///////////////////////////////////////////////////////////////////// - //END reflect - ///////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////// - //begin DIRT - ////////////////////////////////////////////////////////////////////// - if (dirt_enabled >= 1){ - vec3 dirtFactorIn = vec3 (dirt_r_factor, dirt_g_factor, dirt_b_factor); - vec3 dirtFactor = reflmap.rgb * dirtFactorIn.rgb; - //dirtFactor.r = smoothstep(0.0, 1.0, dirtFactor.r); - mixedcolor.rgb = mix(mixedcolor.rgb, dirt_r_color, smoothstep(0.0, 1.0, dirtFactor.r)); - if (dirt_multi > 0) { - //dirtFactor.g = smoothstep(0.0, 1.0, dirtFactor.g); - //dirtFactor.b = smoothstep(0.0, 1.0, dirtFactor.b); - 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)); - } - } - ////////////////////////////////////////////////////////////////////// - //END Dirt - ////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////// - //begin WETNESS - ////////////////////////////////////////////////////////////////////// - - if (rain_enabled >0.0) - { - texel.rgb = texel.rgb * (1.0 - 0.6 * wetness); - float rain_factor = 0.0; - - float rain_orientation = max(dot(VNormal, up),0.0); - - if ((rain_norm > 0.0) && (rain_orientation > 0.0)) - { - rain_factor += DotNoise2D(rawpos.xy, 0.2 ,0.5, rain_norm) * abs(sin(6.0*osg_SimulationTime)); - rain_factor += DotNoise2D(rawpos.xy, 0.3 ,0.4, rain_norm) * abs(sin(6.0*osg_SimulationTime + 2.094)); - rain_factor += DotNoise2D(rawpos.xy, 0.4 ,0.3, rain_norm)* abs(sin(6.0*osg_SimulationTime + 4.188)); - } - - - - // secondary reflection of sky irradiance in water film - float fresnelW = ((0.8 * wetness) ) * (1.0-smoothstep(0.0,0.4, dot(N,-normalize(vertVec)) * 1.0 - 0.2 * rain_factor * wetness)); - float sky_factor = (1.0-ct*ct); - vec3 sky_light = vec3 (1.0,1.0,1.0) * length(light_diffuse.rgb) * (1.0-effective_scattering); - Specular.rgb += sky_factor * fresnelW * sky_light; - } - ///////////////////////////////////////////////////////////////////// - //end WETNESS - ////////////////////////////////////////////////////////////////////// - - - // 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; - vec4 ambient = gl_LightModel.ambient + light_ambient; - vec4 ambient_Correction = vec4(ambient.rg, ambient.b * 0.6, 1.0) - * ambient_offset ; - ambient_Correction = clamp(ambient_Correction, -1.0, 1.0); - - color.a = texel.a * alpha; - vec4 fragColor = vec4(color.rgb * mixedcolor + ambient_Correction.rgb, color.a); - - fragColor += Specular * nmap.a; - - ////////////////////////////////////////////////////////////////////// - // 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 ; - - lightmapcolor = lightmap_r_color * lightmapFactor.r; - lightmapcolor = addLights(lightmapcolor, lightmap_g_color * lightmapFactor.g); - lightmapcolor = addLights(lightmapcolor, lightmap_b_color * lightmapFactor.b); - lightmapcolor = addLights(lightmapcolor, lightmap_a_color * lightmapFactor.a); - - - } else { - lightmapcolor = lightmapTexel.rgb * lightmap_r_color * lightmapFactor.r; - } - fragColor.rgb = max(fragColor.rgb, lightmapcolor * gl_FrontMaterial.diffuse.rgb * smoothstep(0.0, 1.0, mixedcolor*.5 + lightmapcolor*.5)); - } - ////////////////////////////////////////////////////////////////////// - // END lightmap - ///////////////////////////////////////////////////////////////////// - - - /// BEGIN fog amount - - float transmission; - float vAltitude; - float delta_zv; - float H; - float distance_in_layer; - float transmission_arg; - float eqColorFactor; - - float mvisibility = min(visibility, avisibility); - - if (dist > 0.04 * mvisibility) - { - 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; - } - } - - transmission_arg = (dist-distance_in_layer)/avisibility; - - - if (visibility < avisibility) - { - transmission_arg = transmission_arg + (distance_in_layer/visibility); - eqColorFactor = 1.0 - 0.1 * delta_zv/visibility - (1.0 -effective_scattering); - } - else - { - transmission_arg = transmission_arg + (distance_in_layer/avisibility); - eqColorFactor = 1.0 - 0.1 * delta_zv/avisibility - (1.0 -effective_scattering); - } - transmission = fog_func(transmission_arg, alt); - if (eqColorFactor < 0.2) eqColorFactor = 0.2; - } - else - { - eqColorFactor = 1.0; - transmission = 1.0; - } - - /// END fog amount - - /// BEGIN fog color - - vec3 hazeColor = get_hazeColor(fog_lightArg); - - float rShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt + 420000.0); - float lightIntensity = length(hazeColor * effective_scattering) * rShade; - - if (transmission< 1.0) - { - - - - if (fog_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); - hazeColor = intensity * normalize (mix(hazeColor, intensity * vec3 (1.0,1.0,1.0), 0.7* smoothstep(5000.0, 50000.0, alt))); - - hazeColor.r = hazeColor.r * 0.83; - hazeColor.g = hazeColor.g * 0.9; - - 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,fog_earthShade) )); - hazeColor = intensity * normalize(mix(hazeColor, shadedFogColor, (1.0-smoothstep(0.5,0.9,eqColorFactor)))); - - float shadow = mix( min(1.0 + dot(VNormal,gl_LightSource[0].position.xyz),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)); - } - else - { - hazeColor = vec3 (1.0, 1.0, 1.0); - } - - if (use_IR_vision) - { - //hazeColor.rgb = max(hazeColor.rgb, vec3 (0.5, 0.5, 0.5)); - } - - - /// END fog color - fragColor = clamp(fragColor, 0.0, 1.0); - //hazeColor = clamp(hazeColor, 0.0, 1.0); - - ///BEGIN Rayleigh fog /// - - // Rayleigh color shift due to out-scattering - 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); - fragColor.rgb = rayleigh_out_shift(fragColor.rgb,outscatter); - - 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); - fragColor.rgb = mix(fragColor.rgb, rayleighColor,rayleighStrength); - - /// END Rayleigh fog - - // 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 * fog_earthShade; - hazeColor.rgb = max(hazeColor.rgb, minLight.rgb); - - - fragColor.rgb = mix(hazeColor +secondary_light * fog_backscatter(mvisibility), fragColor.rgb,transmission); - - - fragColor.rgb = filter_combined(fragColor.rgb); - gl_FragColor = fragColor; - // logarithmic depth - gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; - } diff --git a/Compositor/Shaders/ALS/model-ultra.vert b/Compositor/Shaders/ALS/model-ultra.vert deleted file mode 100644 index 096522889..000000000 --- a/Compositor/Shaders/ALS/model-ultra.vert +++ /dev/null @@ -1,123 +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 float alpha; - -varying float flogz; - -attribute vec3 tangent; -attribute vec3 binormal; - -uniform float pitch; -uniform float roll; -uniform float hdg; -uniform int refl_dynamic; -uniform int nmap_enabled; -uniform int shader_qual; - -//////Fog Include/////////// -// uniform int fogType; -// void fog_Func(int type); -//////////////////////////// - -void setupShadows(vec4 eyeSpacePos); - -void rotationMatrixPR(in float sinRx, in float cosRx, in float sinRy, in float cosRy, out mat4 rotmat) -{ - rotmat = mat4( cosRy , sinRx * sinRy , cosRx * sinRy, 0.0, - 0.0 , cosRx , -sinRx * cosRx, 0.0, - -sinRy, sinRx * cosRy, cosRx * cosRy , 0.0, - 0.0 , 0.0 , 0.0 , 1.0 ); -} - -void rotationMatrixH(in float sinRz, in float cosRz, out mat4 rotmat) -{ - rotmat = mat4( cosRz, -sinRz, 0.0, 0.0, - sinRz, cosRz, 0.0, 0.0, - 0.0 , 0.0 , 1.0, 0.0, - 0.0 , 0.0 , 0.0, 1.0 ); -} - -void main(void) -{ - rawpos = gl_Vertex.xyz; - vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex; - //fog_Func(fogType); - - VNormal = normalize(gl_NormalMatrix * gl_Normal); - - vec3 n = normalize(gl_Normal); - vec3 tempTangent = cross(n, vec3(1.0,0.0,0.0)); - vec3 tempBinormal = cross(n, tempTangent); - - if (nmap_enabled > 0){ - tempTangent = tangent; - tempBinormal = binormal; - } - - VTangent = normalize(gl_NormalMatrix * tempTangent); - VBinormal = normalize(gl_NormalMatrix * tempBinormal); - vec3 t = tempTangent; - vec3 b = tempBinormal; - - // 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); - vec3 reflVec_stat = normalize(gl_ModelViewMatrixInverse * reflect_eye).xyz; - if (refl_dynamic > 0){ - //prepare rotation matrix - mat4 RotMatPR; - mat4 RotMatH; - float _roll = roll; - if (_roll>90.0 || _roll < -90.0) - { - _roll = -_roll; - } - float cosRx = cos(radians(_roll)); - float sinRx = sin(radians(_roll)); - float cosRy = cos(radians(-pitch)); - float sinRy = sin(radians(-pitch)); - float cosRz = cos(radians(hdg)); - float sinRz = sin(radians(hdg)); - rotationMatrixPR(sinRx, cosRx, sinRy, cosRy, RotMatPR); - rotationMatrixH(sinRz, cosRz, RotMatH); - vec3 reflVec_dyn = (RotMatH * (RotMatPR * normalize(gl_ModelViewMatrixInverse * reflect_eye))).xyz; - - reflVec = reflVec_dyn; - } else { - reflVec = reflVec_stat; - } - - - gl_FrontColor = gl_FrontMaterial.emission + gl_Color - * (gl_LightModel.ambient + gl_LightSource[0].ambient); - - gl_Position = ftransform(); - // logarithmic depth - flogz = 1.0 + gl_Position.w; - gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; - - setupShadows(ecPosition); -} diff --git a/Compositor/Shaders/ALS/model-wingflex-organic.vert b/Compositor/Shaders/ALS/model-wingflex-organic.vert deleted file mode 100644 index b15d3d9a3..000000000 --- a/Compositor/Shaders/ALS/model-wingflex-organic.vert +++ /dev/null @@ -1,172 +0,0 @@ -// -*- mode: C; -*- -// Licence: GPL v2 -// based on -// © Emilian Huminiuc and Vivian Meazza 2011 -// addition for wingflex mesh distortion by Thorsten Renk 2015 - -#version 120 - -varying vec3 rawpos; -varying vec3 VNormal; -varying vec3 VTangent; -varying vec3 VBinormal; -varying vec3 vViewVec; -varying vec3 reflVec; -varying vec3 vertVec; - -varying float alpha; - -varying float flogz; - -attribute vec3 tangent; -attribute vec3 binormal; - -uniform float pitch; -uniform float roll; -uniform float hdg; -uniform float wingflex_alpha; -uniform float wingflex_trailing_alpha; -uniform float wingsweep_factor; -uniform int refl_dynamic; -uniform int nmap_enabled; -uniform int shader_qual; -uniform int rembrandt_enabled; - -//////Fog Include/////////// -// uniform int fogType; -// void fog_Func(int type); -//////////////////////////// - -void rotationMatrixPR(in float sinRx, in float cosRx, in float sinRy, in float cosRy, out mat4 rotmat) -{ - rotmat = mat4( cosRy , sinRx * sinRy , cosRx * sinRy, 0.0, - 0.0 , cosRx , -sinRx * cosRx, 0.0, - -sinRy, sinRx * cosRy, cosRx * cosRy , 0.0, - 0.0 , 0.0 , 0.0 , 1.0 ); -} - -void rotationMatrixH(in float sinRz, in float cosRz, out mat4 rotmat) -{ - rotmat = mat4( cosRz, -sinRz, 0.0, 0.0, - sinRz, cosRz, 0.0, 0.0, - 0.0 , 0.0 , 1.0, 0.0, - 0.0 , 0.0 , 0.0, 1.0 ); -} - -void main(void) -{ - vec4 vertex = gl_Vertex; - - - float body_width = 0.7; - float arm_reach = 4.8; - - float x_factor = max((abs(vertex.x) - body_width),0); - float y_factor = max(vertex.y,0.0); - float flex_factor1 = wingflex_alpha * (1.0 - wingsweep_factor); - float flex_factor2 = wingflex_trailing_alpha * (1.0 -wingsweep_factor); - - - if (flex_factor1<0.0) {flex_factor1 *=0.7;} - if (flex_factor2<0.0) {flex_factor1 *=0.7;} - - // basic flapping motion is linear to arm_reach, then parabolic - - float intercept_point = 0.1 * arm_reach * arm_reach * flex_factor1; - - if (x_factor < arm_reach) - { - vertex.z += x_factor/arm_reach * intercept_point; - } - - else - { - vertex.z += 0.1 * x_factor * x_factor * flex_factor1; - } - - // upward stroke is slightly forward-swept, downward stroke a bit backward - vertex.y += -0.25 * abs(x_factor) * flex_factor1; - - //trailing edge lags the motion - vertex.z += 0.2 * y_factor * x_factor * flex_factor2; - - - // if the wings are folded, we sweep them back - vertex.y += 0.5 * x_factor * wingsweep_factor; - float sweep_x = 0.5; - if (vertex.x > 0.0) {sweep_x = - 0.5;} - - vertex.x+= sweep_x * (1.0 + 0.5 *x_factor) * wingsweep_factor; - - - rawpos = vertex.xyz; - vec4 ecPosition = gl_ModelViewMatrix * vertex; - - VNormal = normalize(gl_NormalMatrix * gl_Normal); - - vec3 n = normalize(gl_Normal); - vec3 tempTangent = cross(n, vec3(1.0,0.0,0.0)); - vec3 tempBinormal = cross(n, tempTangent); - - if (nmap_enabled > 0){ - tempTangent = tangent; - tempBinormal = binormal; - } - - VTangent = normalize(gl_NormalMatrix * tempTangent); - VBinormal = normalize(gl_NormalMatrix * tempBinormal); - vec3 t = tempTangent; - vec3 b = tempBinormal; - - // 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); - vec3 reflVec_stat = normalize(gl_ModelViewMatrixInverse * reflect_eye).xyz; - if (refl_dynamic > 0){ - //prepare rotation matrix - mat4 RotMatPR; - mat4 RotMatH; - float _roll = roll; - if (_roll>90.0 || _roll < -90.0) - { - _roll = -_roll; - } - float cosRx = cos(radians(_roll)); - float sinRx = sin(radians(_roll)); - float cosRy = cos(radians(-pitch)); - float sinRy = sin(radians(-pitch)); - float cosRz = cos(radians(hdg)); - float sinRz = sin(radians(hdg)); - rotationMatrixPR(sinRx, cosRx, sinRy, cosRy, RotMatPR); - rotationMatrixH(sinRz, cosRz, RotMatH); - vec3 reflVec_dyn = (RotMatH * (RotMatPR * normalize(gl_ModelViewMatrixInverse * reflect_eye))).xyz; - - reflVec = reflVec_dyn; - } else { - reflVec = reflVec_stat; - } - - if(rembrandt_enabled < 1){ - gl_FrontColor = gl_FrontMaterial.emission + gl_Color - * (gl_LightModel.ambient + gl_LightSource[0].ambient); - } else { - gl_FrontColor = gl_Color; - } - gl_Position = gl_ModelViewProjectionMatrix * vertex; - // logarithmic depth - flogz = 1.0 + gl_Position.w; - //gl_Position = ftransform(); - gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; -} diff --git a/Compositor/Shaders/ALS/noise.frag b/Compositor/Shaders/ALS/noise.frag deleted file mode 100644 index 60448a0e7..000000000 --- a/Compositor/Shaders/ALS/noise.frag +++ /dev/null @@ -1,293 +0,0 @@ -// -*-C++-*- - -// This is a library of noise functions, taking a coordinate vector and a wavelength -// as input and returning a number [0:1] as output. - -// * Noise2D(in vec2 coord, in float wavelength) is 2d Perlin noise -// * Noise3D(in vec3 coord, in float wavelength) is 3d Perlin noise -// * DotNoise2D(in vec2 coord, in float wavelength, in float fractionalMaxDotSize, in float dDensity) -// is sparse dot noise and takes a dot density parameter -// * DropletNoise2D(in vec2 coord, in float wavelength, in float fractionalMaxDotSize, in float dDensity) -// is sparse dot noise modified to look like liquid and takes a dot density parameter -// * VoronoiNoise2D(in vec2 coord, in float wavelength, in float xrand, in float yrand) -// is a function mapping the terrain into random domains, based on Voronoi tiling of a regular grid -// distorted with xrand and yrand -// * SlopeLines2D(in vec2 coord, in vec2 gradDir, in float wavelength, in float steepness) -// computes a semi-random set of lines along the direction of steepest descent, allowing to -// simulate e.g. water erosion patterns -// * Strata3D(in vec3 coord, in float wavelength, in float variation) -// computers a vertically stratified random pattern, appropriate e.g. for rock textures - -// Thorsten Renk 2014 - -#version 120 - - -float rand2D(in vec2 co){ - return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); -} - -float rand3D(in vec3 co){ - return fract(sin(dot(co.xyz ,vec3(12.9898,78.233,144.7272))) * 43758.5453); -} - -float cosine_interpolate(in float a, in float b, in float x) -{ - float ft = x * 3.1415927; - float f = (1.0 - cos(ft)) * .5; - - return a*(1.0-f) + b*f; -} - -float simple_interpolate(in float a, in float b, in float x) -{ -return a + smoothstep(0.0,1.0,x) * (b-a); -} - -float interpolatedNoise2D(in float x, in float y) -{ - float integer_x = x - fract(x); - float fractional_x = x - integer_x; - - float integer_y = y - fract(y); - float fractional_y = y - integer_y; - - float v1 = rand2D(vec2(integer_x, integer_y)); - float v2 = rand2D(vec2(integer_x+1.0, integer_y)); - float v3 = rand2D(vec2(integer_x, integer_y+1.0)); - float v4 = rand2D(vec2(integer_x+1.0, integer_y +1.0)); - - float i1 = simple_interpolate(v1 , v2 , fractional_x); - float i2 = simple_interpolate(v3 , v4 , fractional_x); - - return simple_interpolate(i1 , i2 , fractional_y); -} - -float interpolatedNoise3D(in float x, in float y, in float z) -{ - float integer_x = x - fract(x); - float fractional_x = x - integer_x; - - float integer_y = y - fract(y); - float fractional_y = y - integer_y; - - float integer_z = z - fract(z); - float fractional_z = z - integer_z; - - float v1 = rand3D(vec3(integer_x, integer_y, integer_z)); - float v2 = rand3D(vec3(integer_x+1.0, integer_y, integer_z)); - float v3 = rand3D(vec3(integer_x, integer_y+1.0, integer_z)); - float v4 = rand3D(vec3(integer_x+1.0, integer_y +1.0, integer_z)); - - float v5 = rand3D(vec3(integer_x, integer_y, integer_z+1.0)); - float v6 = rand3D(vec3(integer_x+1.0, integer_y, integer_z+1.0)); - float v7 = rand3D(vec3(integer_x, integer_y+1.0, integer_z+1.0)); - float v8 = rand3D(vec3(integer_x+1.0, integer_y +1.0, integer_z+1.0)); - - - float i1 = simple_interpolate(v1,v5, fractional_z); - float i2 = simple_interpolate(v2,v6, fractional_z); - float i3 = simple_interpolate(v3,v7, fractional_z); - float i4 = simple_interpolate(v4,v8, fractional_z); - - float ii1 = simple_interpolate(i1,i2,fractional_x); - float ii2 = simple_interpolate(i3,i4,fractional_x); - - - return simple_interpolate(ii1 , ii2 , fractional_y); -} - - -float Noise2D(in vec2 coord, in float wavelength) -{ -return interpolatedNoise2D(coord.x/wavelength, coord.y/wavelength); - -} - -float Noise3D(in vec3 coord, in float wavelength) -{ -return interpolatedNoise3D(coord.x/wavelength, coord.y/wavelength, coord.z/wavelength); -} - -float dotNoise2D(in float x, in float y, in float fractionalMaxDotSize, in float dDensity) -{ - float integer_x = x - fract(x); - float fractional_x = x - integer_x; - - float integer_y = y - fract(y); - float fractional_y = y - integer_y; - - if (rand2D(vec2(integer_x+1.0, integer_y +1.0)) > dDensity) - {return 0.0;} - - float xoffset = (rand2D(vec2(integer_x, integer_y)) -0.5); - float yoffset = (rand2D(vec2(integer_x+1.0, integer_y)) - 0.5); - float dotSize = 0.5 * fractionalMaxDotSize * max(0.25,rand2D(vec2(integer_x, integer_y+1.0))); - - - vec2 truePos = vec2 (0.5 + xoffset * (1.0 - 2.0 * dotSize) , 0.5 + yoffset * (1.0 -2.0 * dotSize)); - - float distance = length(truePos - vec2(fractional_x, fractional_y)); - - return 1.0 - smoothstep (0.3 * dotSize, 1.0* dotSize, distance); -} - -float DotNoise2D(in vec2 coord, in float wavelength, in float fractionalMaxDotSize, in float dDensity) -{ -return dotNoise2D(coord.x/wavelength, coord.y/wavelength, fractionalMaxDotSize, dDensity); -} - -float dropletNoise2D(in float x, in float y, in float fractionalMaxDotSize, in float dDensity) -{ - float integer_x = x - fract(x); - float fractional_x = x - integer_x; - - float integer_y = y - fract(y); - float fractional_y = y - integer_y; - - if (rand2D(vec2(integer_x+1.0, integer_y +1.0)) > dDensity) - {return 0.0;} - - float xoffset = (rand2D(vec2(integer_x, integer_y)) -0.5); - float yoffset = (rand2D(vec2(integer_x+1.0, integer_y)) - 0.5); - float dotSize = 0.5 * fractionalMaxDotSize * max(0.25,rand2D(vec2(integer_x, integer_y+1.0))); - - float x1offset = 2.0 * (rand2D(vec2(integer_x+5.0, integer_y)) -0.5); - float y1offset = 2.0 * (rand2D(vec2(integer_x, integer_y + 5.0)) - 0.5); - float x2offset = 2.0 * (rand2D(vec2(integer_x-5.0, integer_y)) -0.5); - float y2offset = 2.0 * (rand2D(vec2(integer_x-5.0, integer_y -5.0)) - 0.5); - float smear = (rand2D(vec2(integer_x + 3.0, integer_y)) -0.5); - - - vec2 truePos = vec2 (0.5 + xoffset * (1.0 - 4.0 * dotSize) , 0.5 + yoffset * (1.0 -4.0 * dotSize)); - vec2 secondPos = truePos + vec2 (dotSize * x1offset, dotSize * y1offset); - vec2 thirdPos = truePos + vec2 (dotSize * x2offset, dotSize * y2offset); - - float distance = length(truePos - vec2(fractional_x, fractional_y)); - float dist1 = length(secondPos - vec2(fractional_x, fractional_y)); - float dist2 = length(thirdPos - vec2(fractional_x, fractional_y)); - - return clamp(3.0 - smoothstep (0.3 * dotSize, 1.0* dotSize, distance) - smoothstep (0.3 * dotSize, 1.0* dotSize, dist1) - smoothstep ((0.1 + 0.5 * smear) * dotSize, 1.0* dotSize, dist2), 0.0,1.0); -} - -float DropletNoise2D(in vec2 coord, in float wavelength, in float fractionalMaxDotSize, in float dDensity) -{ -return dropletNoise2D(coord.x/wavelength, coord.y/wavelength, fractionalMaxDotSize, dDensity); -} - -float voronoiNoise2D(in float x, in float y, in float xrand, in float yrand) -{ - float integer_x = x - fract(x); - float fractional_x = x - integer_x; - - float integer_y = y - fract(y); - float fractional_y = y - integer_y; - - float val[4]; - - val[0] = rand2D(vec2(integer_x, integer_y)); - val[1] = rand2D(vec2(integer_x+1.0, integer_y)); - val[2] = rand2D(vec2(integer_x, integer_y+1.0)); - val[3] = rand2D(vec2(integer_x+1.0, integer_y+1.0)); - - float xshift[4]; - - xshift[0] = xrand * (rand2D(vec2(integer_x+0.5, integer_y)) - 0.5); - xshift[1] = xrand * (rand2D(vec2(integer_x+1.5, integer_y)) -0.5); - xshift[2] = xrand * (rand2D(vec2(integer_x+0.5, integer_y+1.0))-0.5); - xshift[3] = xrand * (rand2D(vec2(integer_x+1.5, integer_y+1.0))-0.5); - - float yshift[4]; - - yshift[0] = yrand * (rand2D(vec2(integer_x, integer_y +0.5)) - 0.5); - yshift[1] = yrand * (rand2D(vec2(integer_x+1.0, integer_y+0.5)) -0.5); - yshift[2] = yrand * (rand2D(vec2(integer_x, integer_y+1.5))-0.5); - yshift[3] = yrand * (rand2D(vec2(integer_x+1.5, integer_y+1.5))-0.5); - - - float dist[4]; - - dist[0] = sqrt((fractional_x + xshift[0]) * (fractional_x + xshift[0]) + (fractional_y + yshift[0]) * (fractional_y + yshift[0])); - dist[1] = sqrt((1.0 -fractional_x + xshift[1]) * (1.0-fractional_x+xshift[1]) + (fractional_y +yshift[1]) * (fractional_y+yshift[1])); - dist[2] = sqrt((fractional_x + xshift[2]) * (fractional_x + xshift[2]) + (1.0-fractional_y +yshift[2]) * (1.0-fractional_y + yshift[2])); - dist[3] = sqrt((1.0-fractional_x + xshift[3]) * (1.0-fractional_x + xshift[3]) + (1.0-fractional_y +yshift[3]) * (1.0-fractional_y + yshift[3])); - - - - int i, i_min; - float dist_min = 100.0; - for (i=0; i<4;i++) - { - if (dist[i] < dist_min) - { - dist_min = dist[i]; - i_min = i; - } - } - - return val[i_min]; - //return val[0]; - -} - -float VoronoiNoise2D(in vec2 coord, in float wavelength, in float xrand, in float yrand) -{ -return voronoiNoise2D(coord.x/wavelength, coord.y/wavelength, xrand, yrand); -} - -float slopeLines2D(in float x, in float y, in float sx, in float sy, in float steepness) -{ - float integer_x = x - fract(x); - float fractional_x = x - integer_x; - - float integer_y = y - fract(y); - float fractional_y = y - integer_y; - - vec2 O = vec2 (0.2 + 0.6* rand2D(vec2 (integer_x, integer_y+1)), 0.3 + 0.4* rand2D(vec2 (integer_x+1, integer_y))); - vec2 S = vec2 (sx, sy); - vec2 P = vec2 (-sy, sx); - vec2 X = vec2 (fractional_x, fractional_y); - - float radius = 0.0 + 0.3 * rand2D(vec2 (integer_x, integer_y)); - - float b = (X.y - O.y + O.x * S.y/S.x - X.x * S.y/S.x) / (P.y - P.x * S.y/S.x); - float a = (X.x - O.x - b*P.x)/S.x; - - return (1.0 - smoothstep(0.7 * (1.0-steepness), 1.2* (1.0 - steepness), 0.6* abs(a))) * (1.0 - smoothstep(0.0, 1.0 * radius,abs(b))); - - -} - - -float SlopeLines2D(in vec2 coord, in vec2 gradDir, in float wavelength, in float steepness) -{ -return slopeLines2D(coord.x/wavelength, coord.y/wavelength, gradDir.x, gradDir.y, steepness); -} - - -float strata3D(in float x, in float y, in float z, in float variation) -{ - float integer_x = x - fract(x); - float fractional_x = x - integer_x; - - float integer_y = y - fract(y); - float fractional_y = y - integer_y; - - float integer_z = z - fract(z); - float fractional_z = z - integer_z; - - float rand_value_low = rand3D(vec3(0.0, 0.0, integer_z)); - float rand_value_high = rand3D(vec3(0.0, 0.0, integer_z+1)); - - float rand_var = 0.5 - variation + 2.0 * variation * rand3D(vec3(integer_x, integer_y, integer_z)); - - - return (1.0 - smoothstep(rand_var -0.15, rand_var + 0.15, fract(z))) * rand_value_low + smoothstep(rand_var-0.15, rand_var + 0.15, fract(z)) * rand_value_high; - -} - - -float Strata3D(in vec3 coord, in float wavelength, in float variation) -{ -return strata3D(coord.x/wavelength, coord.y/wavelength, coord.z/wavelength, variation); -} diff --git a/Compositor/Shaders/ALS/planet-aurora.frag b/Compositor/Shaders/ALS/planet-aurora.frag deleted file mode 100644 index b05804701..000000000 --- a/Compositor/Shaders/ALS/planet-aurora.frag +++ /dev/null @@ -1,77 +0,0 @@ -// -*-C++-*- - -// Ambient term comes in gl_Color.rgb. -#version 120 - -varying vec3 vertex; -varying vec3 relVec; -varying vec3 normal; - - -uniform float strength; -uniform float ray_factor; -uniform float upper_alt_factor; -uniform float penetration_factor; -uniform float patchiness; -uniform float afterglow; -uniform float arc_id; -uniform float osg_SimulationTime; - -float Noise2D(in vec2 coord, in float wavelength); -vec3 filter_combined (in vec3 color) ; - -void main() -{ - - - -float vCoord = abs(vertex.z) - 0.02 * arc_id; - - - -float aurora_time = 0.001 * osg_SimulationTime + arc_id; - -float noise_01 = Noise2D( vec2(vertex.x +aurora_time, vertex.y), 0.05); -float blend_factor = smoothstep(0.935, 0.955, vCoord - 0.001 * noise_01 - 0.02 * (1.0-upper_alt_factor)); - -float blend_low = smoothstep(0.915, 0.925, vCoord - 0.001 * noise_01-0.00250 * penetration_factor); - -noise_01 = smoothstep(0.0 + 0.25 * patchiness, 1.0 - 0.25 *patchiness, noise_01 - 0.5 * (1.0-strength) * patchiness); - -float noise_02 = 0.7 + 0.3 * Noise2D( vec2 (vertex.x +vertex.y, aurora_time), 0.002); -noise_02 = mix(0.85, noise_02 , min((1.0-blend_factor) * ray_factor, 1.0)); - -float smoothness = 0.01 + 0.02 * (1.0 - ray_factor); - -float noise_03 = 0.05 * (0.5 - Noise2D ( vec2 (vertex.x + vertex.y, 2.0 * aurora_time), smoothness)); -noise_03 = mix(0.0, noise_03, upper_alt_factor); - - -vCoord += 0.00250 * penetration_factor; - -float vStrength = smoothstep(0.92, 0.94, vCoord) * (1.0 - smoothstep(0.94, 0.95 + 0.1 * upper_alt_factor, vCoord+noise_03)); - -vec3 auroraColor1 = vec3 (0.0, 0.2, 0.1); -vec3 auroraColor2 = vec3 (0.2, 0.0, 0.05); -vec3 auroraColor3 = vec3 (0.8, 0.3, 0.4); - - - -vec3 auroraColor = mix(auroraColor1, auroraColor2, blend_factor); -auroraColor = mix(auroraColor3, auroraColor, blend_low); - -float fade_factor = smoothstep(0.94, 0.97, vCoord - 0.001 * noise_01 - 0.02 * (1.0-upper_alt_factor)); -fade_factor = mix(1.0, fade_factor, afterglow); - -float view_angle = abs(dot(normalize(relVec), normalize(normal))); - -float angStrength = smoothstep(0.2, 0.6, view_angle); - - -float auroraStrength = vStrength * angStrength * noise_01 * noise_02 * strength * fade_factor; - -vec3 finalColor = vec3 (auroraColor.x, auroraColor.y, auroraColor.z); -finalColor.rgb = filter_combined(finalColor.rgb); - -gl_FragColor = vec4(finalColor.r, finalColor.g, finalColor.b, auroraStrength); -} diff --git a/Compositor/Shaders/ALS/planet-aurora.vert b/Compositor/Shaders/ALS/planet-aurora.vert deleted file mode 100644 index d9ef71973..000000000 --- a/Compositor/Shaders/ALS/planet-aurora.vert +++ /dev/null @@ -1,32 +0,0 @@ -#version 120 - -varying vec3 vertex; -varying vec3 normal; -varying vec3 relVec; - -uniform float fg_Fcoef; - -uniform float osg_SimulationTime; -uniform float arc_id; - - -void main() -{ - - normal = gl_Normal; - vertex = gl_Vertex.xyz; - vec3 ep = (gl_ModelViewMatrixInverse * vec4 (0.0, 0.0, 0.0, 1.0)).xyz; - relVec = vertex - ep; - - vec4 vert_out = gl_Vertex; - - float ang = dot(vert_out.xy, vec2 (0.0, 1.0)); - - vert_out.x *= (1.0 + 0.05 * sin(ang + 0.1 * osg_SimulationTime + arc_id)); - vert_out.y *= (1.0 + 0.05 * sin(ang + 0.12 * osg_SimulationTime + arc_id)); - - - gl_Position = gl_ModelViewProjectionMatrix * vert_out; - // logarithmic depth - gl_Position.z = (log2(max(1e-6, 1.0 + gl_Position.w)) * fg_Fcoef - 1.0) * gl_Position.w; -} diff --git a/Compositor/Shaders/ALS/planet-cloudlayer.frag b/Compositor/Shaders/ALS/planet-cloudlayer.frag deleted file mode 100644 index a50a73919..000000000 --- a/Compositor/Shaders/ALS/planet-cloudlayer.frag +++ /dev/null @@ -1,186 +0,0 @@ -// -*-C++-*- - -// Ambient term comes in gl_Color.rgb. -#version 120 - -varying vec4 diffuse_term; -varying vec3 normal; -varying vec3 ecViewDir; -varying vec3 VTangent; - -uniform float shade_effect; -uniform float sun_angle; -uniform float air_pollution; -uniform float moonlight; - -uniform float roi_x1; -uniform float roi_y1; -uniform float lightning; -uniform float cloudcover_bias; - -uniform bool use_overlay; -uniform bool use_cloud_normals; - -uniform sampler2D texture; -uniform sampler2D structure_texture; - -float Noise2D(in vec2 coord, in float wavelength); -vec3 filter_combined (in vec3 color) ; -vec3 moonlight_perception (in vec3 light); - -float add_cosines (in float cos1, in float cos2, in float sign) -{ - -float sin1 = sqrt(1.0 - pow(cos1, 2.0)); -float sin2 = sqrt(1.0 - pow(cos2, 2.0)); - -return cos1 * cos2 + sign * sin1 * sin2; - -} - -vec3 lightning_color (in vec2 coord) -{ - -vec2 roi1 = vec2 (roi_x1, roi_y1); - -float strength = 1.0 - smoothstep(0.0, 0.005, length(roi1 - coord)); - -return strength * vec3 (0.43, 0.57, 1.0); - -} - - -void main() -{ - vec3 n; - float NdotL, NdotHV, NdotLraw; - vec4 color = gl_Color; - vec3 lightDir = gl_LightSource[0].position.xyz; - - vec3 halfVector = normalize(normalize(lightDir) + normalize(ecViewDir)); - vec4 texel; - vec4 ref_texel; - vec4 structureTexel; - - vec4 fragColor; - vec4 specular = vec4(0.0, 0.0, 0.0, 0.0); - - n = normalize(normal); - - - vec3 light_specular = vec3 (1.0, 1.0, 1.0); - NdotL = dot(n, normalize(lightDir)); - NdotLraw = NdotL; - NdotL = smoothstep(-0.2,0.2,NdotL); - - float intensity = length(diffuse_term.rgb); - - vec3 dawn_color = mix (vec3 (1.0,0.7,0.4), vec3 (1.0,0.4,0.2), air_pollution); - - vec3 dawn = intensity * 1.2 * normalize (dawn_color); - - vec4 diff_term = mix(vec4(dawn, 1.0), diffuse_term, smoothstep(0.0, 0.45, NdotL)); - - - vec2 grad_dir = vec2 (1.0, 0.0); - - vec3 tangent = normalize(VTangent); - vec3 binormal = cross(n, tangent); - float NdotL2 = 1.0; - - texel = texture2D(texture, gl_TexCoord[0].st); - ref_texel = texel; - - float sign = -1.0; - float ml_fact = 1.0; - - - if (use_cloud_normals) - { - vec2 sun2d = vec2 (0.0, 1.0); - - float xOffset = -1.0 * dot(normalize(lightDir), tangent); - float yOffset = -1.0 * dot(normalize(lightDir), binormal); - - grad_dir = normalize (vec2 (xOffset, yOffset)); - - vec4 comp_texel = texture2D(texture, gl_TexCoord[0].st - 0.0005 * grad_dir); - - // parallax mapping - - xOffset = -1.0 * dot(ecViewDir, tangent); - yOffset = -1.0 * dot(ecViewDir, binormal); - - grad_dir = normalize (vec2 (xOffset, yOffset)); - - texel = texture2D(texture, gl_TexCoord[0].st - 0.0005 * grad_dir * ref_texel.a * 0.7); - - // relief shading based on gradient and parallax lookup - - float slope = shade_effect * (comp_texel.a - ref_texel.a) * texel.a; - if (slope < 0.0) {sign = 1.0;} - - vec2 snormal = normalize(vec2 (slope, 1.0)); - - NdotL2 = dot (snormal, sun2d); - NdotL = add_cosines(NdotL, NdotL2, sign ); - - ml_fact = 0.5 + 1.0 * add_cosines(0.0, NdotL2, sign); - - - } - - ref_texel = texel; - texel.a = pow(texel.a,1.0/cloudcover_bias); - texel.a = clamp(texel.a, 0.0, 1.0); - - - color += diff_term * max(NdotL, 0.15) ; - - - - - - color.rgb *= smoothstep(-0.2, -0.1, NdotLraw); - // - - float darkness_fact = 1.0 - smoothstep(0.0,0.2, length(color.rgb)); - color.rgb += lightning_color(gl_TexCoord[0].st) * (1.0 - texel.a) * lightning * darkness_fact; - - vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight; - moonLightColor = moonlight_perception (moonLightColor); - color.rgb += moonLightColor * ml_fact; - - color.a = 1.0;//diffuse_term.a; - color = clamp(color, 0.0, 1.0); - - structureTexel = texture2D(structure_texture, 20.0 * gl_TexCoord[0].st); - - float noise = Noise2D( gl_TexCoord[0].st, 0.01); - noise += Noise2D( gl_TexCoord[0].st, 0.005); - noise += Noise2D( gl_TexCoord[0].st, 0.002); - - - vec4 noiseTexel = vec4 (1.0,1.0,1.0, 0.5* noise * texel.a); - structureTexel = mix(structureTexel, noiseTexel,noiseTexel.a); - - structureTexel = mix(structureTexel, texel, clamp(1.5 * ref_texel.a * (cloudcover_bias - 1.0), 0.0, 1.0)); - - - if (use_overlay) - { - texel = vec4(structureTexel.rgb, smoothstep(0.0, 0.5,texel.a) * structureTexel.a); - //texel.a = pow(texel.a,1.0/cloudcover_bias); - - } - - texel.a = clamp((1.0 + darkness_fact) * texel.a, 0.0, 1.0); - - - fragColor = color * texel; - fragColor.rgb = filter_combined(fragColor.rgb); - - gl_FragColor = clamp(fragColor, 0.0, 1.0); - - -} diff --git a/Compositor/Shaders/ALS/planet-high.frag b/Compositor/Shaders/ALS/planet-high.frag deleted file mode 100644 index 9852493d9..000000000 --- a/Compositor/Shaders/ALS/planet-high.frag +++ /dev/null @@ -1,193 +0,0 @@ -// -*-C++-*- - -// Ambient term comes in gl_Color.rgb. -#version 120 - -varying vec4 diffuse_term; -varying vec3 normal; -varying vec3 ecViewDir; -varying vec3 VTangent; - -uniform float visibility; -uniform float air_pollution; -uniform float moonlight; -uniform float sun_angle; -uniform bool use_clouds; -uniform bool use_cloud_shadows; -uniform bool use_overlay; -uniform sampler2D texture; -uniform sampler2D shadowtex; -uniform sampler2D grain_texture; -uniform sampler2D normal_texture; - -float Noise2D(in vec2 coord, in float wavelength); -vec3 filter_combined (in vec3 color) ; -vec3 moonlight_perception (in vec3 light); - -void main() -{ - vec3 n; - float NdotL, NdotHV; - vec4 color = gl_Color; - vec3 lightDir = normalize(gl_LightSource[0].position.xyz); - - vec3 halfVector = normalize(lightDir + normalize(ecViewDir)); - vec4 texel; - vec4 shadowTexel; - vec4 grainTexel; - 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); - - float parallaxFactor = max(1.0 - dot(normalize(ecViewDir), n),0.0); - - vec3 VBinormal; - VBinormal = normalize(cross(normal, VTangent)); - - float xOffset1 = -1.0 * dot(ecViewDir, normalize(VTangent)); - float yOffset1 = -1.0 * dot(ecViewDir, VBinormal); - - vec2 grad_dir = normalize (vec2 (xOffset1, yOffset1)); - - vec4 nmap = texture2D(normal_texture, gl_TexCoord[0].st); - - - - - float hmap = 1.0 - nmap.a; - nmap = texture2D(normal_texture, gl_TexCoord[0].st - 0.0005 * grad_dir * hmap * 2.0 * parallaxFactor); - - // sanity processing for normal map when alpha is close to zero - nmap.rgb = normalize(nmap.rgb); - //if (nmap.b < 0.0) {nmap.b = -nmap.b;} - - vec3 N = nmap.rgb * 2.0 - 1.0; - N = normalize(N.x * normalize(VTangent) * 0.6 + N.y * VBinormal * 0.6 + N.z * n); - - - float xOffset = -0.005 * dot(lightDir, normalize(VTangent)); - float yOffset = -0.005 * dot(lightDir, VBinormal); - - - - - if ((use_cloud_shadows)&&(use_clouds)) - {shadowTexel = texture2D(shadowtex, vec2(gl_TexCoord[0].s-xOffset, gl_TexCoord[0].t-yOffset));} - else - {shadowTexel = vec4 (0.0,0.0,0.0,0.0);} - - texel = texture2D(texture, gl_TexCoord[0].st - 0.0005 * grad_dir * hmap * 2.0 * parallaxFactor); - float night_light = (1.0 -texel.a); - texel.a = 1.0; - grainTexel = texture2D(grain_texture, gl_TexCoord[0].st * 40.0); - - float noise = Noise2D( gl_TexCoord[0].st, 0.00005); - noise += Noise2D( gl_TexCoord[0].st, 0.0002); - noise += Noise2D( gl_TexCoord[0].st, 0.0001); - - noise= noise/3.0; - - - vec3 light_specular = vec3 (1.0, 1.0, 1.0); - NdotL = dot(N, lightDir); - float NdotLraw = NdotL; - // due to atmosphere scattering, we should make this harder - NdotL = smoothstep(-0.2 ,0.2,NdotL); - // fog does not feel normal map - float NdotLfog = smoothstep(-0.2 , 0.2, dot(n, lightDir)); - - float intensity = length(diffuse_term); - vec4 dawn = intensity * normalize (vec4 (1.0,0.5,0.3,1.0)); - vec4 diff_term = mix(dawn, diffuse_term, smoothstep(0.0, 0.3, NdotL)); - - - intensity = length(light_specular); - light_specular = mix(dawn.rgb, light_specular, smoothstep(0.0, 0.4, NdotL)); - - float oceanness = smoothstep(0.0, 0.1,length(texel.rgb - vec3 (0.007,0.019, 0.078))); - float specular_enhancement = 4.0 * (1.0 - oceanness); - - if (use_overlay) { - //texel.rgb = mix(texel.rgb, grainTexel.rgb, 0.4* grainTexel.a * oceanness); - texel.rgb = texel.rgb * (0.85 + 0.3 * noise); - texel.r = smoothstep(0.0, 0.95, texel.r); - texel.g = smoothstep(0.0, 0.95, texel.g); - texel.b = smoothstep(0.0, 0.95, texel.b); - float intensity = length(texel.rgb); - texel.rgb = mix(texel.rgb, intensity * vec3 (1.0,1.0,1.0), 0.3); - } - - //texel.rgb = vec3 (0.5,0.5,0.5); - - - - - if (NdotL > 0.0) { - color += diff_term * NdotL * (1.0-shadowTexel.a); - NdotHV = max(dot(n, halfVector), 0.0); - if (gl_FrontMaterial.shininess > 0.0) - specular.rgb = (gl_FrontMaterial.specular.rgb * specular_enhancement - * light_specular * (1.0-shadowTexel.a) - * pow(NdotHV, gl_FrontMaterial.shininess)); - } - - vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight; - moonLightColor = moonlight_perception (moonLightColor); - color.rgb += moonLightColor; - - 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); - - fragColor = color * texel + specular; - - - float night_light_factor = night_light * (1.0 - smoothstep(-0.3, 0.0, NdotLraw)); - - float noise_factor = (0.4 + 0.6* smoothstep(0.7 - 0.4* night_light,0.9 - 0.4 * night_light,noise)); - night_light_factor *= noise_factor; - - - vec3 light_color = vec3(1.0, 0.7, 0.3); - vec3 central_light_color = vec3 (1.0, 1.0, 1.0); - light_color = mix(light_color, central_light_color, smoothstep(0.3, 0.6,noise*noise * night_light)); - - fragColor.rgb += light_color * night_light_factor * 1.4; - - float angle = dot(normalize(ecViewDir), normalize(normal)); - float distance_through_atmosphere = min(10.0 / (abs(angle)+0.001),500.0); - - - float fogLighting = clamp(NdotLfog,0.0,1.0) * length(diff_term.rgb/1.73); - - vec4 fogColor = vec4 (0.83,0.9,1.0,1.0) * fogLighting; - vec3 rayleighColor = vec3 (0.17, 0.52, 0.87) * fogLighting; - - float heightFactor = exp(-hmap * 0.8); - distance_through_atmosphere *= heightFactor; - - float fogFactor = exp(-distance_through_atmosphere/(visibility/1000.0)); - float rayleighFactor = exp(-distance_through_atmosphere/(300.0 / (1.0 + 4.0 * air_pollution)) ); - - - - fragColor.rgb = mix(rayleighColor, fragColor.rgb, rayleighFactor); - fragColor = mix(fogColor, fragColor, fogFactor); - - fragColor.rgb = filter_combined(fragColor.rgb); - - - - - gl_FragColor = clamp(fragColor, 0.0, 1.0); - - -} diff --git a/Compositor/Shaders/ALS/planet.frag b/Compositor/Shaders/ALS/planet.frag deleted file mode 100644 index 6c42d5421..000000000 --- a/Compositor/Shaders/ALS/planet.frag +++ /dev/null @@ -1,151 +0,0 @@ -// -*-C++-*- - -// Ambient term comes in gl_Color.rgb. -#version 120 - -varying vec4 diffuse_term; -varying vec3 normal; -varying vec3 ecViewDir; -varying vec3 VTangent; - -uniform float visibility; -uniform float air_pollution; -uniform float sun_angle; -uniform bool use_clouds; -uniform bool use_cloud_shadows; -uniform bool use_overlay; -uniform sampler2D texture; -uniform sampler2D shadowtex; -uniform sampler2D grain_texture; - -float Noise2D(in vec2 coord, in float wavelength); -vec3 filter_combined (in vec3 color) ; - - -void main() -{ - vec3 n; - float NdotL, NdotHV; - vec4 color = gl_Color; - vec3 lightDir = normalize(gl_LightSource[0].position.xyz); - - vec3 halfVector = normalize(lightDir + normalize(ecViewDir)); - vec4 texel; - vec4 shadowTexel; - vec4 grainTexel; - 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); - - vec3 VBinormal; - VBinormal = cross(normal, VTangent); - - float xOffset = -0.005 * dot(lightDir, normalize(VTangent)); - float yOffset = -0.005 * dot(lightDir, normalize(VBinormal)); - - if ((use_cloud_shadows)&&(use_clouds)) - {shadowTexel = texture2D(shadowtex, vec2(gl_TexCoord[0].s-xOffset, gl_TexCoord[0].t-yOffset));} - else - {shadowTexel = vec4 (0.0,0.0,0.0,0.0);} - - texel = texture2D(texture, gl_TexCoord[0].st); - float night_light = (1.0 -texel.a); - texel.a = 1.0; - grainTexel = texture2D(grain_texture, gl_TexCoord[0].st * 40.0); - - float noise = Noise2D( gl_TexCoord[0].st, 0.00005); - noise += Noise2D( gl_TexCoord[0].st, 0.0002); - noise += Noise2D( gl_TexCoord[0].st, 0.0001); - - noise= noise/3.0; - - - vec3 light_specular = vec3 (1.0, 1.0, 1.0); - NdotL = dot(n, lightDir); - float NdotLraw = NdotL; - // due to atmosphere scattering, we should make this harder - NdotL = smoothstep(-0.2,0.2,NdotL); - - float intensity = length(diffuse_term); - vec4 dawn = intensity * normalize (vec4 (1.0,0.5,0.3,1.0)); - vec4 diff_term = mix(dawn, diffuse_term, smoothstep(0.0, 0.3, NdotL)); - - - intensity = length(light_specular); - light_specular = mix(dawn.rgb, light_specular, smoothstep(0.0, 0.4, NdotL)); - - float oceanness = smoothstep(0.0, 0.1,length(texel.rgb - vec3 (0.007,0.019, 0.078))); - float specular_enhancement = 4.0 * (1.0 - oceanness); - - if (use_overlay) { - //texel.rgb = mix(texel.rgb, grainTexel.rgb, 0.4* grainTexel.a * oceanness); - texel.rgb = texel.rgb * (0.85 + 0.3 * noise); - texel.r = smoothstep(0.0, 0.95, texel.r); - texel.g = smoothstep(0.0, 0.95, texel.g); - texel.b = smoothstep(0.0, 0.95, texel.b); - float intensity = length(texel.rgb); - texel.rgb = mix(texel.rgb, intensity * vec3 (1.0,1.0,1.0), 0.3); - } - - //texel.rgb = vec3 (0.5,0.5,0.5); - - - - - if (NdotL > 0.0) { - color += diff_term * NdotL * (1.0-shadowTexel.a); - NdotHV = max(dot(n, halfVector), 0.0); - if (gl_FrontMaterial.shininess > 0.0) - specular.rgb = (gl_FrontMaterial.specular.rgb * specular_enhancement - * light_specular * (1.0-shadowTexel.a) - * 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); - - fragColor = color * texel + specular; - - - float night_light_factor = night_light * (1.0 - smoothstep(-0.3, 0.0, NdotLraw)); - - float noise_factor = (0.4 + 0.6* smoothstep(0.7 - 0.4* night_light,0.9 - 0.4 * night_light,noise)); - night_light_factor *= noise_factor; - - - vec3 light_color = vec3(1.0, 0.7, 0.3); - vec3 central_light_color = vec3 (1.0, 1.0, 1.0); - light_color = mix(light_color, central_light_color, smoothstep(0.3, 0.6,noise*noise * night_light)); - - fragColor.rgb += light_color * night_light_factor * 1.4; - - float angle = dot(normalize(ecViewDir), normalize(normal)); - float distance_through_atmosphere = min(10.0 / (abs(angle)+0.001),500.0); - - float fogLighting = clamp(NdotL,0.0,1.0) * length(diff_term.rgb/1.73); - - - vec4 fogColor = vec4 (0.83,0.9,1.0,1.0) * fogLighting; - vec3 rayleighColor = vec3 (0.17, 0.52, 0.87) * fogLighting; - - - float fogFactor = exp(-distance_through_atmosphere/(visibility/1000.0)); - float rayleighFactor = exp(-distance_through_atmosphere/(300.0 / (1.0 + 4.0 * air_pollution)) ); - - fragColor.rgb = mix(rayleighColor, fragColor.rgb, rayleighFactor); - fragColor = mix(fogColor, fragColor, fogFactor); - - fragColor.rgb = filter_combined(fragColor.rgb); - - gl_FragColor = clamp(fragColor, 0.0, 1.0); - -} diff --git a/Compositor/Shaders/ALS/planet.vert b/Compositor/Shaders/ALS/planet.vert deleted file mode 100644 index 4d07fdb34..000000000 --- a/Compositor/Shaders/ALS/planet.vert +++ /dev/null @@ -1,73 +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 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 vec3 ecViewDir; -varying vec3 VTangent; - -uniform float fg_Fcoef; - -uniform int colorMode; - -attribute vec3 tangent;//, binormal; - - - -void main() -{ - - vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0); - ecViewDir = (gl_ModelViewMatrix * (ep - gl_Vertex)).xyz; - - gl_Position = ftransform(); - // logarithmic depth - gl_Position.z = (log2(max(1e-6, 1.0 + gl_Position.w)) * fg_Fcoef - 1.0) * gl_Position.w; - gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; - normal = gl_NormalMatrix * gl_Normal; - VTangent = gl_NormalMatrix * tangent; - 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; - } - vec4 light_diffuse = vec4 (1.0,1.0,1.0,1.0); - vec4 light_ambient = vec4 (0.03, 0.03, 0.03, 1.0); - - diffuse_term = diffuse_color * light_diffuse;//gl_LightSource[0].diffuse; - vec4 constant_term = gl_FrontMaterial.emission + ambient_color * - (gl_LightModel.ambient + light_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); - //fog_Func(fogType); -} diff --git a/Compositor/Shaders/ALS/rain-layer.frag b/Compositor/Shaders/ALS/rain-layer.frag deleted file mode 100644 index 2f33354b8..000000000 --- a/Compositor/Shaders/ALS/rain-layer.frag +++ /dev/null @@ -1,71 +0,0 @@ -#version 120 - -uniform float fg_Fcoef; - -uniform sampler2D baseTexture; -varying float fogFactor; -varying vec3 hazeColor; -varying vec3 relVector; - -varying float flogz; - -vec3 filter_combined (in vec3 color) ; - -uniform bool is_lightning; - -vec3 rainbow (in float index) -{ - -float red = max(1.0 - 2.0 * index,0.0); -float green; - -if (index < 0.5) - {green = 2.0 * index;} -else - {green = 1.0 - 2.0 *(index - 0.5);} - - - -float blue = max(2.0 * (index - 0.5), 0.0); - -red *= 1.3; -green *=0.6; - -return vec3 (red, green, blue) * hazeColor; -} - -void main(void) -{ - vec4 base = texture2D( baseTexture, gl_TexCoord[0].st); - vec4 finalColor = base * gl_Color; - - vec4 fragColor; - - - if (is_lightning==false) - { - vec3 nView = normalize(relVector); - vec3 lightFull = normalize((gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz); - - float calpha = dot(-lightFull, nView); - - float rainbow_shape = smoothstep(0.743 -0.03, 0.743, calpha) * (1.0 - smoothstep(0.743, 0.743+0.03, calpha)); - - float color_index = clamp((calpha - 0.713)/ 0.06,0.0,1.0); - - vec3 rainbow_color = rainbow(color_index); - finalColor.rgb = mix(finalColor.rgb, rainbow_color, 0.5* rainbow_shape); - - - fragColor.rgb = mix(hazeColor, finalColor.rgb, fogFactor ); - } - else - {fragColor.rgb = finalColor.rgb;} - fragColor.a = mix(0.0, finalColor.a, fogFactor); - - fragColor.rgb = filter_combined(fragColor.rgb); - - gl_FragColor = fragColor; - // logarithmic depth - gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; -} diff --git a/Compositor/Shaders/ALS/rain-layer.vert b/Compositor/Shaders/ALS/rain-layer.vert deleted file mode 100644 index 6d1ab5dc8..000000000 --- a/Compositor/Shaders/ALS/rain-layer.vert +++ /dev/null @@ -1,139 +0,0 @@ -// -*-C++-*- -#version 120 - -varying float fogFactor; -varying vec3 hazeColor; -varying vec3 relVector; - -varying float flogz; - -uniform float range; // From /sim/rendering/clouds3d-vis-range -uniform float scattering; -uniform float terminator; -uniform float altitude; -uniform float flash; -uniform float lightning_pos_x; -uniform float lightning_pos_y; -uniform float lightning_range; - - -float shade = 0.8; -float cloud_height = 1000.0; -const float EarthRadius = 5800000.0; - -// light_func is a generalized logistic function fit to the light intensity as a function -// of scaled terminator position obtained from Flightgear core - -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; -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - -void main(void) -{ - - 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); - - gl_Position = vec4(0.0, 0.0, 0.0, 1.0); - gl_Position.x = gl_Vertex.x; - gl_Position.y += gl_Vertex.y; - gl_Position.z += gl_Vertex.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); - - relVector = gl_Position.xyz - ep.xyz; - gl_Position = gl_ModelViewProjectionMatrix * gl_Position; - // logarithmic depth - flogz = 1.0 + gl_Position.w; - -// Light at the final position - - // first obtain normal 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, corrected for altitude - float vertex_alt = max(altitude * 0.30480 + relVector.z,100.0); - float yprime = -dot(relVector, lightHorizon); - float yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt); - - // compute the light at the position - vec4 light_diffuse; - - float lightArg = (terminator-yprime_alt)/100000.0; - - light_diffuse.b = light_func(lightArg, 1.330e-05, 0.264, 2.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.a = 0.0; - - //light_diffuse = light_diffuse * scattering; - float intensity = length(light_diffuse); - light_diffuse = intensity * normalize(mix(light_diffuse, 2.0*vec4 (0.55, 0.6, 0.8, 1.0), (1.0 - smoothstep(0.3,0.8, scattering)))); - -// 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; - - // two times terminator width governs how quickly light fades into shadow - float terminator_width = 200000.0; - float earthShade = 0.9 * smoothstep(terminator_width+ terminator, -terminator_width + terminator, yprime_alt) + 0.1; - gl_FrontColor.rgb = gl_FrontColor.rgb * earthShade; - - // lightning - vec2 lightningRelVector = relVector.xy - vec2(lightning_pos_x, lightning_pos_y); - float rCoord = length(lightningRelVector); - - vec3 flashColor = 2.0 * flash * vec3 (0.43, 0.57, 1.0) * (1.0 - smoothstep(lightning_range, 5.0 * lightning_range, rCoord)); - - gl_FrontColor.rgb += flashColor; - gl_FrontColor.rgb = clamp(gl_FrontColor.rgb,0.0,1.0); - - // 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(100.0, 250.0, fogCoord), 1.0 - smoothstep(range*0.9, range, fogCoord)); - gl_BackColor = gl_FrontColor; - - // Fog doesn't affect rain as much as other objects. - //fogFactor = exp( -gl_Fog.density * fogCoord * 0.4); - //fogFactor = clamp(fogFactor, 0.0, 1.0); - -float fadeScale = 0.05 + 0.2 * log(fogCoord/1000.0); - if (fadeScale < 0.05) fadeScale = 0.05; - fogFactor = exp( -gl_Fog.density * 1.0 * fogCoord * fadeScale); - - hazeColor = light_diffuse.rgb; - hazeColor.x = hazeColor.x * 0.83; - hazeColor.y = hazeColor.y * 0.9; - hazeColor = hazeColor * scattering; - -// change haze color to blue hue for strong fogging - intensity = length(hazeColor); - hazeColor = intensity * normalize(mix(hazeColor, 2.0 * vec3 (0.55, 0.6, 0.8), (1.0-smoothstep(0.3,0.8,scattering)))); - - - - hazeColor = clamp(hazeColor * earthShade, 0.0,1.0); - - -} diff --git a/Compositor/Shaders/ALS/road-ultra.frag b/Compositor/Shaders/ALS/road-ultra.frag deleted file mode 100644 index c67d8490f..000000000 --- a/Compositor/Shaders/ALS/road-ultra.frag +++ /dev/null @@ -1,873 +0,0 @@ -// -*- mode: C; -*- -// Licence: GPL v2 -// Authors: Frederic Bouvier and Gijs de Rooy -// with major additions and revisions by -// Emilian Huminiuc and Vivian Meazza 2011 -// ported to Atmospheric Light Scattering -// by Thorsten Renk, 2013 -// changes for road and traffic rendering -// by Thorsten Renk 2017 -2019 -#version 120 - -varying vec3 VBinormal; -varying vec3 VNormal; -varying vec3 VTangent; -varying vec3 rawpos; -varying vec3 reflVec; -varying vec3 vViewVec; -varying vec3 vertVec; - -varying float alpha; - -varying float flogz; - -uniform float fg_Fcoef; - -uniform sampler2D BaseTex; -uniform sampler2D NormalTex; -uniform sampler2D ReflMapTex; -uniform sampler2D CarTex; -uniform sampler2D CarMetaTex; -uniform sampler2D ReflGradientsTex; -uniform samplerCube Environment; -uniform sampler2D GrainTex; - -uniform int dirt_enabled; -uniform int dirt_multi; -uniform int nmap_dds; -uniform int nmap_enabled; -uniform int refl_enabled; -uniform int refl_type; -uniform int refl_map; -uniform int grain_texture_enabled; -uniform int road_traffic_direction; -uniform int rain_enabled; -uniform int road_traffic_enabled; -uniform int cloud_shadow_flag; -uniform int use_searchlight; -uniform int use_landing_light; -uniform int use_alt_landing_light; - -uniform float amb_correction; -uniform float dirt_b_factor; -uniform float dirt_g_factor; -uniform float dirt_r_factor; -uniform float nmap_tile; -uniform float refl_correction; -uniform float refl_fresnel; -uniform float refl_fresnel_factor; -uniform float refl_noise; -uniform float refl_rainbow; -uniform float grain_magnification; -uniform float wetness; -uniform float rain_norm; -uniform float road_traffic_density; -uniform float streetlight_factor; -uniform float road_traffic_variation; - -uniform float avisibility; -uniform float cloud_self_shading; -uniform float eye_alt; -uniform float ground_scattering; -uniform float hazeLayerAltitude; -uniform float moonlight; -uniform float overcast; -uniform float scattering; -uniform float terminator; -uniform float terrain_alt; -uniform float visibility; -uniform float air_pollution; -uniform float snowlevel; -uniform float snow_thickness_factor; - -uniform float osg_SimulationTime; - -uniform float landing_light1_offset; -uniform float landing_light2_offset; -uniform float landing_light3_offset; - -uniform bool use_IR_vision; - -// constants needed by the light and fog computations ################################################### - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - - -uniform vec3 dirt_r_color; -uniform vec3 dirt_g_color; -uniform vec3 dirt_b_color; - -uniform vec3 streetlight_color; - -float DotNoise2D(in vec2 coord, in float wavelength, in float fractionalMaxDotSize, in float dot_density); -float shadow_func (in float x, in float y, in float noise, in float dist); -float fog_func (in float targ, in float altitude); -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); -float rand2D(in vec2 co); -float Noise2D(in vec2 coord, in float wavelength); - -vec3 rayleigh_out_shift(in vec3 color, in float outscatter); -vec3 get_hazeColor(in float lightArg); -vec3 searchlight(); -vec3 landing_light(in float offset, in float offsetv); -vec3 filter_combined (in vec3 color) ; -vec3 addLights(in vec3 color1, in vec3 color2); - - -float light_func (in float x, in float a, in float b, in float c, in float d, in float e) - { - if (x > 30.0) {return e;} - if (x < -15.0) {return 0.0;} - return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); - } - - -void road_type_mapper (in vec2 coord, out float rtype_traffic_density, out float rtype_base_illumination, out float rtype_traffic_speed, out int rtype_dual_lane) - { - if (coord.s < 0.125) // railway - { - rtype_dual_lane = 0; - rtype_traffic_density = 0; - rtype_base_illumination = 0; - rtype_traffic_speed = 0.0; - } - else if (coord.s < 0.250) // residential - { - rtype_dual_lane = 0; - rtype_traffic_density = 0.3; - rtype_base_illumination = 0.65; - rtype_traffic_speed = 0.5; - } - else if (coord.s < 0.375) // single-lane major - { - rtype_dual_lane = 0; - rtype_traffic_density = 1.0; - rtype_base_illumination = 0.65; - rtype_traffic_speed = 1.0; - } - else if (coord.s < 0.5) - { - rtype_dual_lane = 0; - rtype_traffic_density = 0.0; - rtype_base_illumination = 0.0; - rtype_traffic_speed = 0.0; - } - else if (coord.s < 0.625) // grass - { - rtype_dual_lane = 0; - rtype_traffic_density = 0.0; - rtype_base_illumination = 0.0; - rtype_traffic_speed = 0.0; - } - else if (coord.s < 0.750) // dual-lane highway - { - rtype_dual_lane = 1; - rtype_traffic_density = 1.0; - rtype_base_illumination = 0.0; - rtype_traffic_speed = 1.0; - } - else if (coord.s < 0.875) // dirt - { - rtype_dual_lane = 0; - rtype_traffic_density = 0.1; - rtype_base_illumination = 0.0; - rtype_traffic_speed = 0.3; - } - else // tramway - { - rtype_dual_lane = 0; - rtype_traffic_density = 0.0; - rtype_base_illumination = 0.0; - rtype_traffic_speed = 0.0; - } - - - } - - - -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 = vec4 (1.0, 1.0, 1.0, 1.0); - - vec4 grainTexel; - - vec3 mixedcolor; - vec3 N = vec3(0.0,0.0,1.0); - - // noise - - float noise_1m = Noise2D(rawpos.xy, 1.0); - float noise_5m = Noise2D(rawpos.xy, 5.0); - - // road type characteristics - - float rtype_traffic_density = 0.0; - float rtype_base_illumination = 0.0; - float rtype_traffic_speed = 0.0; - int rtype_dual_lane = 0; - road_type_mapper (gl_TexCoord[0].st, rtype_traffic_density, rtype_base_illumination, rtype_traffic_speed, rtype_dual_lane); - - float pf = 0.0; - float pf1 = 0.0; - ///some generic light scattering parameters - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight; - float alt = eye_alt; - float effective_scattering = min(scattering, cloud_self_shading); - - - /// BEGIN geometry for light - - vec3 up = (gl_ModelViewMatrix * vec4(0.0,0.0,1.0,0.0)).xyz; - - vec3 nVertVec = normalize(vertVec); - - float dist = length(vertVec); - float vertex_alt = max(100.0,dot(up, vertVec) + alt); - float vertex_scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_alt); - - - vec3 lightHorizon = gl_LightSource[0].position.xyz - up * dot(up,gl_LightSource[0].position.xyz); - float yprime = -dot(vertVec, lightHorizon); - float yprime_alt = yprime - sqrt(2.0 * EarthRadius * vertex_alt); - float lightArg = (terminator-yprime_alt)/100000.0; - - float earthShade = 0.6 * (1.0 - smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt)) + 0.4; - - float mie_angle; - if (lightArg < 10.0) - {mie_angle = (0.5 * dot(nVertVec, normalize(gl_LightSource[0].position.xyz)) ) + 0.5;} - else - {mie_angle = 1.0;} - - float fog_vertex_alt = max(vertex_alt,hazeLayerAltitude); - float fog_yprime_alt = yprime_alt; - if (fog_vertex_alt > hazeLayerAltitude) - { - if (dist > 0.8 * avisibility) - { - fog_vertex_alt = mix(fog_vertex_alt, hazeLayerAltitude, smoothstep(0.8*avisibility, avisibility, dist)); - fog_yprime_alt = yprime -sqrt(2.0 * EarthRadius * fog_vertex_alt); - } - } - else - { - fog_vertex_alt = hazeLayerAltitude; - fog_yprime_alt = yprime -sqrt(2.0 * EarthRadius * fog_vertex_alt); - } - - float fog_lightArg = (terminator-fog_yprime_alt)/100000.0; - float fog_earthShade = 0.9 * smoothstep(terminator_width+ terminator, -terminator_width + terminator, fog_yprime_alt) + 0.1; - - float ct = dot(normalize(up), nVertVec); - - vec3 relPos = (gl_ModelViewMatrixInverse * vec4 (vertVec,0.0)).xyz; - - /// END geometry for light - - - /// BEGIN light - vec4 light_diffuse; - vec4 light_ambient; - float intensity; - - 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.a = 1.0; - light_diffuse = light_diffuse * vertex_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; - - if (earthShade < 0.5) - { - intensity = length(light_ambient.rgb); - light_ambient.rgb = intensity * normalize(mix(light_ambient.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.8,earthShade) )); - light_ambient.rgb = light_ambient.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade)); - - intensity = length(light_diffuse.rgb); - light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.7,earthShade) )); - } - - vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0); - vec3 ecViewDir = (gl_ModelViewMatrix * (ep - vec4(rawpos, 1.0))).xyz; - vec3 HV = normalize(normalize(gl_LightSource[0].position.xyz) + normalize(ecViewDir)); - - /// END light - - /// BEGIN grain overlay - if (grain_texture_enabled ==1) - { - grainTexel = texture2D(GrainTex, gl_TexCoord[0].st * grain_magnification); - texel.rgb = mix(texel.rgb, grainTexel.rgb, grainTexel.a ); - } - else if (grain_texture_enabled == 2) - { - grainTexel = texture2D(GrainTex, rawpos.xy * grain_magnification); - texel.rgb = mix(texel.rgb, grainTexel.rgb, grainTexel.a ); - } - - /// END grain overlay - - - /// BEGIN procedural textures - cars and snow - - vec2 roadCoords = gl_TexCoord[0].st; - roadCoords.s *=8.0; - roadCoords.s = fract(roadCoords.s); - - - - vec4 snow_texel = vec4 (0.95, 0.95, 0.95, 1.0); - float noise_term = 0.5 * (noise_5m - 0.5); - noise_term += 0.5 * (noise_1m - 0.5); - snow_texel.a = snow_texel.a * 0.2+0.8* smoothstep(0.2,0.8, 0.3 +noise_term + 0.5*snow_thickness_factor +0.0001*(relPos.z +eye_alt -snowlevel) ); - - float noise_2000m = 0.0; - float noise_10m = 0.0; - - float snowLaneShape = smoothstep(0.20, 0.28, roadCoords.s) * (1.0-smoothstep(0.42, 0.5, roadCoords.s)); - snowLaneShape += smoothstep(0.6, 0.68, roadCoords.s) * (1.0-smoothstep(0.82, 0.9, roadCoords.s)); - snow_texel.a *= (1.0 - 0.3* snowLaneShape * rtype_traffic_density); - - texel.rgb = mix(texel.rgb, snow_texel.rgb, snow_texel.a* smoothstep(snowlevel, snowlevel+200.0, 1.0 * (relPos.z + eye_alt)+ (noise_2000m + 0.1 * noise_10m -0.55) *400.0)); - - float cTag = 0.0; - float cPresent = 0.0; - - float cSign = 1.0; - float total_traffic_density = 0.0; - - vec4 carMetaTexel; - - if (road_traffic_enabled == 1) - { - float cOffset = 0.0; - if (roadCoords.s > 0.5) - { - if (rtype_dual_lane == 0) {cSign = -1.0;} - else {cOffset = 5.0;} - } - - if (rtype_dual_lane == 1) {cSign = -1.0;} - - cSign *= road_traffic_direction; - - total_traffic_density = road_traffic_density * rtype_traffic_density * road_traffic_variation; - - float cCoord = roadCoords.t + cOffset; - cCoord += 0.3 * osg_SimulationTime * cSign * rtype_traffic_speed * (1.0 - (0.9 * smoothstep(1.0, 2.5, total_traffic_density))); - cCoord *= 5.0; - - cTag = fract(cCoord); - float cDomain = cCoord - cTag; - float cRnd = rand2D(vec2 (cDomain, cSign)); - - cPresent = 0.0; - float cDisc = 0.2 * total_traffic_density; - if (cRnd > 1.0 - cDisc) {cPresent = 1.0;} - - float cColorRnd = (cRnd - 1.0 + cDisc)/ max(cDisc, 0.05); - float cColorRnd2 = rand2D(vec2 (cDomain, 0.5)); - - float cColumn = (cColorRnd2 * 16.0) - fract(cColorRnd2 * 16.0); - float cRow = (rand2D(vec2 (cDomain, 1.5)) * 2.0); - cRow = cRow- fract(cRow); - //cRow = 0.0; - - - vec3 cColor = vec3 (0.8 * (1.0 - cColorRnd), 0.8 * 2.0 * (0.5 - abs(cColorRnd - 0.5)) , 0.8 * cColorRnd); - cColor *= cColorRnd2; - - float cPos = cTag; - if (cSign > 0.0) {cPos = 1.0 - cPos;} - float cShape = smoothstep(0.0, 0.05, cPos) * (1.0-smoothstep(0.35, 0.4, cPos)); - - float ctPos; - if (roadCoords.s < 0.5) - {ctPos = clamp(5.0 * (roadCoords.s - 0.25), 0.0,1.0); } - else - {ctPos = clamp(5.0 * (roadCoords.s - 0.65), 0.0,1.0); } - - float clPos = cPos;// + 0.45; - - vec4 carTexel = texture2D(CarTex, vec2((ctPos + cColumn) / 16.0 , ((clPos + cRow) / 2.0) )); - carMetaTexel = texture2D(CarMetaTex, vec2((ctPos + cColumn) / 16.0 , ((clPos + cRow) / 2.0) )); - - - float laneShape = smoothstep(0.25, 0.28, roadCoords.s) * (1.0-smoothstep(0.42, 0.45, roadCoords.s)); - laneShape += smoothstep(0.65, 0.68, roadCoords.s) * (1.0-smoothstep(0.82, 0.85, roadCoords.s)); - cShape *= laneShape; - - //texel.rgb = mix(texel.rgb, cColor, cPresent * cShape); - texel.rgb = mix(texel.rgb, carTexel.rgb, cPresent * carTexel.a * laneShape); - //texel.rgb = mix(texel.rgb, vec3 (1.0, 0.0, 0.0) * cColorRnd2, 0.3); - } - - - - /// END procedural cars - - vec3 reflVecN; - - ///BEGIN bump - if (nmap_enabled > 0){ - N = nmap.rgb * 2.0 - 1.0; - // this is exact only for viewing under 90 degrees but much faster than the real solution - reflVecN = normalize (N.x * VTangent + N.y * VBinormal + N.z * reflVec); - N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal); - if (nmap_dds > 0) - N = -N; - } else { - N = normalize(VNormal); - reflVecN = reflVec; - } - ///END bump - - - - vec4 reflection = textureCube(Environment, reflVecN ); - vec3 viewVec = normalize(vViewVec); - float v = abs(dot(viewVec, normalize(VNormal)));// Map a rainbowish color - vec4 fresnel = texture2D(ReflGradientsTex, vec2(v, 0.75)); - vec4 rainbow = texture2D(ReflGradientsTex, vec2(v, 0.25)); - - //float nDotVP = max(0.0, dot(N, normalize(gl_LightSource[0].position.xyz))); - - - 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))); - float nDotHV = max(0.0, dot(N,HV)); - //glare on the backside of tranparent objects - //if ((gl_FrontMaterial.diffuse.a < 1.0 || texel.a < 1.0) - // && dot(N, normalize(gl_LightSource[0].position.xyz)) < 0.0) { - // nDotVP = max(0.0, dot(-N, normalize(gl_LightSource[0].position.xyz)) * (1.0 -texel.a) ); - // nDotHV = max(0.0, dot(-N, HV) * (1.0 -texel.a) ); - // } - - float nDotVP1 = 0.0; - float nDotHV1 = 0.0; - - - // try specular reflection of sky irradiance - nDotVP1 = max(0.0, dot(N, up)); - nDotHV1 = max(0.0, dot(N, normalize(normalize(up) + normalize(-vertVec)))); - - - if (nDotVP == 0.0) - {pf = 0.0;} - else - {pf = pow(nDotHV, gl_FrontMaterial.shininess);} - - if (nDotVP1 == 0.0) - {pf1 = 0.0;} - else - {pf1 = pow(nDotHV1, 0.5*gl_FrontMaterial.shininess);} - - - - if (cloud_shadow_flag == 1) - { - light_diffuse = light_diffuse * shadow_func(relPos.x, relPos.y, 1.0, dist); - } - - 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); - } - - - vec4 Diffuse = light_diffuse * nDotVP; - Diffuse.rgb += secondary_light * light_distance_fading(dist); - if (use_IR_vision) - { - Diffuse.rgb = max(Diffuse.rgb, vec3 (0.5, 0.5, 0.5)); - } - vec4 Specular = gl_FrontMaterial.specular * light_diffuse * pf + gl_FrontMaterial.specular * light_ambient * pf1; - Specular+= gl_FrontMaterial.specular * pow(max(0.0,-dot(N,nVertVec)),gl_FrontMaterial.shininess) * vec4(secondary_light,1.0); - - - //vec4 color = gl_Color + Diffuse * gl_FrontMaterial.diffuse; - vec4 color = Diffuse;// * gl_FrontMaterial.diffuse; - - - color = clamp( color, 0.0, 1.0 ); - - - - //////////////////////////////////////////////////////////////////// - //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 - //float pam = (map.a * -2) + 1; //reverse map - 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; - } - - // enhance low angle reflection by a fresnel term - float fresnel_enhance = (1.0-smoothstep(0.0,0.4, dot(N,-nVertVec))) * refl_fresnel_factor; - - reflFactor+=fresnel_enhance; - - reflFactor = clamp(reflFactor, 0.0, 1.0); - - // add fringing fresnel and rainbow effects and modulate by reflection - vec4 reflcolor = mix(reflection, rainbow, refl_rainbow * v); - //vec4 reflcolor = reflection; - vec4 reflfrescolor = mix(reflcolor, fresnel, refl_fresnel * v); - vec4 noisecolor = mix(reflfrescolor, noisevec, refl_noise); - //vec4 raincolor = vec4(noisecolor.rgb * reflFactor, 1.0); - vec4 raincolor = vec4(noisecolor.rgb, 1.0); - raincolor += Specular; - raincolor *= light_diffuse; - - if (refl_type == 1) - {mixedcolor = mix(texel, raincolor, reflFactor).rgb;} - else if (refl_type == 2) - {mixedcolor = ((texel +(reflcolor * reflFactor))-(0.5*reflFactor)).rgb;} - - } else { - mixedcolor = texel.rgb; - } - ///////////////////////////////////////////////////////////////////// - //END reflect - ///////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////// - //begin DIRT - ////////////////////////////////////////////////////////////////////// - if (dirt_enabled >= 1){ - vec3 dirtFactorIn = vec3 (dirt_r_factor, dirt_g_factor, dirt_b_factor); - vec3 dirtFactor = reflmap.rgb * dirtFactorIn.rgb; - //dirtFactor.r = smoothstep(0.0, 1.0, dirtFactor.r); - mixedcolor.rgb = mix(mixedcolor.rgb, dirt_r_color, smoothstep(0.0, 1.0, dirtFactor.r)); - if (dirt_multi > 0) { - //dirtFactor.g = smoothstep(0.0, 1.0, dirtFactor.g); - //dirtFactor.b = smoothstep(0.0, 1.0, dirtFactor.b); - 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)); - } - } - ////////////////////////////////////////////////////////////////////// - //END Dirt - ////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////// - //begin WETNESS - ////////////////////////////////////////////////////////////////////// - - if (rain_enabled >0.0) - { - texel.rgb = texel.rgb * (1.0 - 0.6 * wetness); - float rain_factor = 0.0; - - float rain_orientation = max(dot(VNormal, up),0.0); - - if ((rain_norm > 0.0) && (rain_orientation > 0.0)) - { - rain_factor += DotNoise2D(rawpos.xy, 0.2 ,0.5, rain_norm) * abs(sin(6.0*osg_SimulationTime)); - rain_factor += DotNoise2D(rawpos.xy, 0.3 ,0.4, rain_norm) * abs(sin(6.0*osg_SimulationTime + 2.094)); - rain_factor += DotNoise2D(rawpos.xy, 0.4 ,0.3, rain_norm)* abs(sin(6.0*osg_SimulationTime + 4.188)); - } - - - - // secondary reflection of sky irradiance in water film - float fresnelW = ((0.8 * wetness) ) * (1.0-smoothstep(0.0,0.4, dot(N,-nVertVec) * 1.0 - 0.2 * rain_factor * wetness)); - float sky_factor = (1.0-ct*ct); - vec3 sky_light = vec3 (1.0,1.0,1.0) * length(light_diffuse.rgb) * (1.0-effective_scattering); - Specular.rgb += sky_factor * fresnelW * sky_light; - } - ///////////////////////////////////////////////////////////////////// - //end WETNESS - ////////////////////////////////////////////////////////////////////// - - - // set ambient adjustment to remove bluiness with user input - float ambient_offset = clamp(amb_correction, -1.0, 1.0); - vec4 ambient = gl_LightModel.ambient + light_ambient; - vec4 ambient_Correction = vec4(ambient.rg, ambient.b * 0.6, 1.0) - * ambient_offset ; - ambient_Correction = clamp(ambient_Correction, -1.0, 1.0); - - color += ambient; - color.a = texel.a * alpha; - vec4 fragColor = vec4(color.rgb * mixedcolor + ambient_Correction.rgb, color.a); - - fragColor += Specular * nmap.a; - - - - ////////////////////////////////////////////////////////////////////// - // BEGIN procedural lightmap - ////////////////////////////////////////////////////////////////////// - - - - - - - - - vec3 pLMColor = streetlight_color; - - float pLMIntensity = smoothstep(0.0, 0.4, roadCoords.s) * (1.0 - smoothstep(0.6, 1.0, roadCoords.s)); - pLMIntensity = 0.25 * rtype_base_illumination * (1.0+ streetlight_factor) + 0.1 * max(0.0,sin(4.0 * roadCoords.t)) * streetlight_factor; - pLMIntensity = clamp(pLMIntensity, 0.0, 1.0); - - if (gl_FrontMaterial.diffuse.r == 0.0) {pLMIntensity =0.0;} - - pLMColor *= pLMIntensity; - - if (road_traffic_enabled == 1) - { - - float viewAngleFactor = smoothstep(-0.05, 0.0, cSign * dot(normalize(VBinormal), nVertVec)); - - vec3 pCLColor = vec3 (0.95, 1.0, 1.0); - vec3 pTLColor = vec3 (0.95, 0.0, 0.0); - - - // mean illumination by car headlights - pLMColor = pLMColor + 0.2 * min(1.0,total_traffic_density) * pCLColor; - - //float pCLIntensity = smoothstep(0.4, 0.6, cTag) * (1.0-smoothstep(0.6, 0.8, cTag)); - //float laneFact = smoothstep(0.25, 0.3, roadCoords.s) * (1.0-smoothstep(0.3, 0.35, roadCoords.s)); - //laneFact += smoothstep(0.35, 0.4, roadCoords.s) * (1.0-smoothstep(0.4, 0.45, roadCoords.s)); - //laneFact += smoothstep(0.65, 0.7, roadCoords.s) * (1.0-smoothstep(0.7, 0.75, roadCoords.s)); - //laneFact += smoothstep(0.75, 0.8, roadCoords.s) * (1.0-smoothstep(0.8, 0.85, roadCoords.s)); - //pCLIntensity = pCLIntensity * laneFact * cPresent; - - - float pCLIntensity, pTLIntensity; - if (cSign == -1.0) - { - pCLIntensity = carMetaTexel.r * cPresent * smoothstep(0.45, 0.55, cTag) * viewAngleFactor ; - pCLIntensity += 0.85 * carMetaTexel.b * cPresent * smoothstep(0.45, 0.55, cTag); - pTLIntensity = carMetaTexel.r * cPresent * (1.0 - smoothstep(0.45, 0.55, cTag)) * (1.0 - viewAngleFactor); - pTLIntensity += 0.85 * carMetaTexel.b * cPresent * (1.0 - smoothstep(0.45, 0.55, cTag)); - - } - else - { - pCLIntensity = carMetaTexel.r * cPresent * (1.0 - smoothstep(0.45, 0.55, cTag)) *viewAngleFactor ; - pCLIntensity += 0.85 * carMetaTexel.b * cPresent * (1.0 - smoothstep(0.45, 0.55, cTag)); - pTLIntensity = carMetaTexel.r * cPresent * smoothstep(0.45, 0.55, cTag) * (1.0 - viewAngleFactor); - pTLIntensity += 0.85 * carMetaTexel.b * cPresent * smoothstep(0.45, 0.55, cTag); - } - - //pCLColor *= pCLIntensity; - - - - //if (cSign == 1.0) - // { - // pTLIntensity = smoothstep(0.9, 0.94, cTag) * (1.0-smoothstep(0.96, 1.0, cTag)); - // } - //else - // { - // pTLIntensity = smoothstep(0.0, 0.04, cTag) * (1.0-smoothstep(0.06, 0.1, cTag)); - // } - - - - //pTLIntensity = pTLIntensity * laneFact * cPresent * (1.0 - viewAngleFactor); - - - pCLColor = pCLColor * pCLIntensity + pTLColor * pTLIntensity; - - - pLMColor = clamp(pLMColor, 0.0, 1.0); - - pLMColor = max(pLMColor,pCLColor); - } - - //fragColor.rgb = max(fragColor.rgb, pLMColor * gl_FrontMaterial.diffuse.rgb * smoothstep(0.0, 1.0, mixedcolor*.5 + pLMColor*.5)); - - fragColor.rgb = max(fragColor.rgb, pLMColor * smoothstep(0.0, 1.0, mixedcolor*.5 + pLMColor*.5)); - - - - ////////////////////////////////////////////////////////////////////// - // END procedural lightmap - ////////////////////////////////////////////////////////////////////// - - - /// BEGIN fog amount - - float transmission; - float vAltitude; - float delta_zv; - float H; - float distance_in_layer; - float transmission_arg; - float eqColorFactor; - - float delta_z = hazeLayerAltitude - eye_alt; - float mvisibility = min(visibility, avisibility); - - if (dist > 0.04 * mvisibility) - { - 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; - } - } - - transmission_arg = (dist-distance_in_layer)/avisibility; - - - if (visibility < avisibility) - { - transmission_arg = transmission_arg + (distance_in_layer/visibility); - eqColorFactor = 1.0 - 0.1 * delta_zv/visibility - (1.0 -effective_scattering); - } - else - { - transmission_arg = transmission_arg + (distance_in_layer/avisibility); - eqColorFactor = 1.0 - 0.1 * delta_zv/avisibility - (1.0 -effective_scattering); - } - transmission = fog_func(transmission_arg, alt); - if (eqColorFactor < 0.2) eqColorFactor = 0.2; - } - else - { - eqColorFactor = 1.0; - transmission = 1.0; - } - - /// END fog amount - - /// BEGIN fog color - - vec3 hazeColor = get_hazeColor(fog_lightArg); - - float rShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt + 420000.0); - float lightIntensity = length(hazeColor * effective_scattering) * rShade; - - if (transmission< 1.0) - { - - - - if (fog_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); - hazeColor = intensity * normalize (mix(hazeColor, intensity * vec3 (1.0,1.0,1.0), 0.7* smoothstep(5000.0, 50000.0, alt))); - - hazeColor.r = hazeColor.r * 0.83; - hazeColor.g = hazeColor.g * 0.9; - - 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,fog_earthShade) )); - hazeColor = intensity * normalize(mix(hazeColor, shadedFogColor, (1.0-smoothstep(0.5,0.9,eqColorFactor)))); - - float shadow = mix( min(1.0 + dot(VNormal,gl_LightSource[0].position.xyz),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)); - } - else - { - hazeColor = vec3 (1.0, 1.0, 1.0); - } - - - - - /// END fog color - fragColor = clamp(fragColor, 0.0, 1.0); - hazeColor = clamp(hazeColor, 0.0, 1.0); - - ///BEGIN Rayleigh fog /// - - // Rayleigh color shift due to out-scattering - 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); - fragColor.rgb = rayleigh_out_shift(fragColor.rgb,outscatter); - - 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); - fragColor.rgb = mix(fragColor.rgb, rayleighColor,rayleighStrength); - - /// END Rayleigh fog - - // 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 * fog_earthShade; - hazeColor.rgb = max(hazeColor.rgb, minLight.rgb); - - - fragColor.rgb = mix(hazeColor +secondary_light * fog_backscatter(mvisibility), fragColor.rgb,transmission); - - fragColor.rgb = filter_combined(fragColor.rgb); - - gl_FragColor = fragColor; - // logarithmic depth - gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; - } diff --git a/Compositor/Shaders/ALS/rock.frag b/Compositor/Shaders/ALS/rock.frag deleted file mode 100644 index d8613cb84..000000000 --- a/Compositor/Shaders/ALS/rock.frag +++ /dev/null @@ -1,684 +0,0 @@ -// -*-C++-*- -#version 120 - -// written by Thorsten Renk, Oct 2011, based on default.frag -// Ambient term comes in gl_Color.rgb. -varying vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; -varying vec2 rawPos; -varying vec3 worldPos; -varying vec3 ecViewdir; - - - -varying float steepness; -varying vec2 grad_dir; - -varying float flogz; - - -uniform float fg_Fcoef; - -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 snowlevel; -uniform float dust_cover_factor; -uniform float lichen_cover_factor; -uniform float wetness; -uniform float fogstructure; -uniform float snow_thickness_factor; -uniform float cloud_self_shading; -uniform float contrast; -uniform float air_pollution; -uniform float intrinsic_wetness; -uniform float transition_model; -uniform float overlay_bias; -uniform float crack_depth; -uniform float crack_pattern_stretch; -uniform float grain_fade_power; -uniform float rock_brightness; -uniform float overlay_alpha; -uniform float dust_resistance; -uniform float slopeline_strength; -uniform float landing_light1_offset; -uniform float landing_light2_offset; -uniform float landing_light3_offset; -uniform float osg_SimulationTime; - -uniform vec3 base_color; -uniform vec3 overlay_color; - -uniform int wind_effects; -uniform int cloud_shadow_flag; -uniform int rock_strata; -uniform int use_searchlight; -uniform int use_landing_light; -uniform int use_alt_landing_light; - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - -float alt; -float eShade; -float yprime_alt; -float mie_angle; - -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 SlopeLines2D(in vec2 coord, in vec2 gradDir, in float wavelength, in float steepness); -float Strata3D(in vec3 coord, in float wavelength, in float variation); -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 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 > 30.0) {return e;} -if (x < -15.0) {return 0.0;} - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - - -// a fade function for procedural scales which are smaller than a pixel - -float detail_fade (in float scale, in float angle, in float dist) -{ -float fade_dist = 2000.0 * scale * angle/max(pow(steepness,4.0), 0.1); - -return 1.0 - smoothstep(0.5 * fade_dist, fade_dist, dist); -} - - - -void main() -{ - - -yprime_alt = diffuse_term.a; -//diffuse_term.a = 1.0; -mie_angle = gl_Color.a; -float effective_scattering = min(scattering, cloud_self_shading); - -// distance to fragment -float dist = length(relPos); -// angle of view vector with horizon -float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist; -// float altitude of fragment above sea level -float msl_altitude = (relPos.z + eye_alt); - - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); -// this is taken from default.frag - vec3 n; - float NdotL, NdotHV, fogFactor; - vec4 color = gl_Color; - color.a = 1.0; - vec3 lightDir = gl_LightSource[0].position.xyz; - vec3 halfVector = normalize(normalize(lightDir) + normalize(ecViewdir)); - vec4 texel; - vec4 snow_texel; - vec4 detail_texel; - vec4 mix_texel; - vec4 grain_texel; - vec4 dot_texel; - vec4 gradient_texel; - vec4 foam_texel; - vec4 fragColor; - vec4 specular = vec4(0.0); - float intensity; - - - -// Perlin noise - -float noise_100m = Noise2D(rawPos.xy,100.0); -float noise_50m = Noise2D(rawPos.xy, 50.0); -float noise_25m = Noise2D(rawPos.xy, 25.0); -float noise_10m = Noise2D(rawPos.xy, 10.0); -float noise_5m = Noise2D(rawPos.xy ,5.0); -float noise_2m = Noise2D(rawPos.xy ,2.0); -float noise_1m = Noise2D(rawPos.xy ,1.0); -float noise_05m = Noise2D(rawPos.xy,0.5); -float noise_02m = Noise2D(rawPos.xy,0.2); -float noise_01m = Noise2D(rawPos.xy, 0.1); - -float noisegrad_10m; -float noisegrad_5m; -float noisegrad_2m; -float noisegrad_1m; -float noisegrad_05m; -float noisegrad_02m; -float noisegrad_01m; - - - - - -float noise_250m = Noise3D(worldPos.xyz,250.0); -float noise_500m = Noise3D(worldPos.xyz, 500.0); -float noise_1500m = Noise3D(worldPos.xyz, 1500.0); -float noise_2000m = Noise3D(worldPos.xyz, 2000.0); - -// dot noise - -float dotnoise_2m = 0.0; -float dotnoise_10m = 0.0; -float dotnoise_15m = 0.0; - -float dotnoisegrad_10m; - -// slope noise - -float slopenoise_50m = SlopeLines2D(rawPos, grad_dir, 50.0, steepness); -float slopenoise_100m = SlopeLines2D(rawPos, grad_dir, 100.0, steepness); - -float snownoise_25m = mix(noise_25m, slopenoise_50m, clamp(3.0*(1.0-steepness),0.0,1.0)); -float snownoise_50m = mix(noise_50m, slopenoise_100m, clamp(3.0*(1.0-steepness),0.0,1.0)); - - - - - -// get the texels - - float noise_term; - float snow_alpha; - float local_autumn_factor; - - // we need to fade procedural structures when they get smaller than a single pixel, for this we need - // to know under what angle we see the surface - - float view_angle = abs(dot(normalize(normal), normalize(ecViewdir))); - - - // the snow texel is generated procedurally - if (msl_altitude +500.0 > snowlevel) - { - snow_texel = vec4 (0.95, 0.95, 0.95, 1.0) * (0.9 + 0.1* noise_500m + 0.1* (1.0 - noise_10m) ); - snow_texel.r = snow_texel.r * (0.9 + 0.05 * (noise_10m + noise_5m)); - snow_texel.g = snow_texel.g * (0.9 + 0.05 * (noise_10m + noise_5m)); - snow_texel.a = 1.0; - noise_term = 0.1 * (noise_500m-0.5) ; - noise_term = noise_term + 0.2 * (snownoise_50m -0.5) * detail_fade(50.0, view_angle, 0.5*dist) ; - noise_term = noise_term + 0.2 * (snownoise_25m -0.5) * detail_fade(25.0, view_angle, 0.5*dist) ; - noise_term = noise_term + 0.3 * (noise_10m -0.5) * detail_fade(10.0, view_angle, 0.8*dist) ; - noise_term = noise_term + 0.3 * (noise_5m - 0.5) * detail_fade(5.0, view_angle, dist); - noise_term = noise_term + 0.15 * (noise_2m -0.5) * detail_fade(2.0, view_angle, dist); - noise_term = noise_term + 0.08 * (noise_1m -0.5) * detail_fade(1.0, view_angle, dist); - snow_texel.a = snow_texel.a * 0.2+0.8* smoothstep(0.2,0.8, 0.3 +noise_term + snow_thickness_factor +0.0001*(msl_altitude -snowlevel) ); - } - - - - - - - - - - - - - - - // strata noise - - float stratnoise_50m; - float stratnoise_10m; - - if (rock_strata==1) - { - stratnoise_50m = Strata3D(vec3 (rawPos.x, rawPos.y, msl_altitude), 50.0, 0.2); - stratnoise_10m = Strata3D(vec3 (rawPos.x, rawPos.y, msl_altitude), 10.0, 0.2); - stratnoise_50m = mix(stratnoise_50m, 1.0, smoothstep(0.8,0.9, steepness)); - stratnoise_10m = mix(stratnoise_10m, 1.0, smoothstep(0.8,0.9, steepness)); - texel *= (0.4 + 0.4 * stratnoise_50m + 0.2 * stratnoise_10m); - } - - - - - - - - // procedural rock texture generation - - texel.rgb = base_color; - - // use powers of Perlin noise to generate the base pattern - - float grainy_noise; - float fade_norm; - - float gfp = grain_fade_power; - float gfptmp; - - grainy_noise = (0.5 * (1.0-slopenoise_100m) + 0.5 *noise_50m) + gfp * (0.5 * slopenoise_50m + 0.5 * noise_25m); - fade_norm = 1.0+gfp; - - gfptmp = gfp * gfp; - grainy_noise += noise_10m * gfptmp * detail_fade(10.0, view_angle, dist) ; - fade_norm += gfptmp * detail_fade(10.0, view_angle, dist) ; - - gfptmp = gfptmp * gfp; - grainy_noise += noise_5m * gfptmp * detail_fade(5.0, view_angle, dist) ; - fade_norm += gfptmp * detail_fade(5.0, view_angle, dist) ; - - gfptmp = gfptmp * gfp; - grainy_noise += noise_2m * gfptmp * detail_fade(2.0, view_angle, dist) ; - fade_norm += gfptmp * detail_fade(2.0, view_angle, dist) ; - - gfptmp = gfptmp * gfp; - grainy_noise += noise_1m * gfptmp * detail_fade(1.0, view_angle, dist) ; - fade_norm += gfptmp * detail_fade(1.0, view_angle, dist) ; - - gfptmp = gfptmp * gfp; - grainy_noise += noise_05m * gfptmp * detail_fade(0.5, view_angle, dist) ; - fade_norm += gfptmp * detail_fade(0.5, view_angle, dist) ; - - grainy_noise = grainy_noise/fade_norm; - grainy_noise = smoothstep(-0.2, 1.2, grainy_noise); - - // generate the crack pattern from isovalue lines of stretched Perlin noise - - float cnoise_500m = Noise2D(vec2(rawPos.x+10.0, crack_pattern_stretch * rawPos.y), 500.0); - float cnoise_250m = Noise2D(vec2(rawPos.x+10.0, crack_pattern_stretch * rawPos.y), 250.0); - float cnoise_100m = Noise2D(vec2(rawPos.x+10.0, crack_pattern_stretch * rawPos.y), 100.0); - float cnoise_50m = Noise2D(vec2(rawPos.x+10.0, crack_pattern_stretch * rawPos.y), 50.0); - float cnoise_25m = Noise2D(vec2(rawPos.x+10.0, crack_pattern_stretch * rawPos.y), 25.0); - float cnoise_10m = Noise2D(vec2(rawPos.x+10.0, crack_pattern_stretch * rawPos.y), 10.0); - float cnoise_5m = Noise2D(vec2(rawPos.x+10.0, crack_pattern_stretch * rawPos.y), 5.0); - float cnoise_2m = Noise2D(vec2(rawPos.x+10.0, crack_pattern_stretch * rawPos.y), 2.0); - float cnoise_1m = Noise2D(vec2(rawPos.x+10.0, crack_pattern_stretch * rawPos.y), 1.0); - - float crack_noise; - float crack_factor; - float crack_size; - float scrack_noise; - float scrack_size; - - crack_noise = cnoise_500m + 0.65 * cnoise_250m + 0.42 * cnoise_100m * detail_fade(50.0, view_angle, dist) ; - crack_noise = crack_noise + 0.27 * cnoise_50m * detail_fade(25.0, view_angle, dist) ; - crack_noise = crack_noise + 0.17 * cnoise_25m * detail_fade(10.0, view_angle, dist) ; - crack_noise = crack_noise + 0.11 * cnoise_10m * detail_fade(5.0, view_angle, dist) ; - crack_noise = 0.381 * crack_noise; - - - - scrack_noise = cnoise_10m + 0.65 * cnoise_5m * detail_fade(5.0, view_angle, dist); - scrack_noise = scrack_noise + 0.3 * cnoise_2m + 0.1 * cnoise_1m * detail_fade(1.0, view_angle, dist); - scrack_noise = 0.48 * scrack_noise; - - crack_size = 0.02 +0.00001 * dist; - crack_factor = smoothstep(0.5-crack_size,0.50,crack_noise) * (1.0-smoothstep(0.51,0.51+crack_size,crack_noise)); - //crack_factor = step(0.5-0.2*crack_size,crack_noise) * (1.0-step(0.5+0.2*crack_size,crack_noise)); - - crack_size *= 0.5; - crack_factor += smoothstep(0.42,0.42+crack_size,crack_noise) * (1.0-smoothstep(0.43,0.43+crack_size,crack_noise)); - - scrack_size = crack_size * 4.0; - crack_factor += 0.75 * smoothstep(0.5-scrack_size,0.50,scrack_noise) * (1.0-smoothstep(0.51,0.51+scrack_size,scrack_noise))* (1.0- smoothstep(250.0,1000.0,dist)); - - - crack_factor = crack_factor * min(1.0,0.03/crack_size); - - - -// distribution of overlay color - - - float overlay_noise; - float overlay_factor; - - overlay_noise = 0.381 * (noise_50m + 0.65 * noise_25m + 0.42 * noise_10m + 0.27 * noise_5m + 0.17 * noise_2m + 0.11 * noise_1m); - overlay_noise = overlay_noise + 0.1 * (smoothstep(0.8,0.9, steepness)); - - overlay_factor = smoothstep(0.7, 0.72, overlay_noise + overlay_bias) + (1.0 - smoothstep(0.2, 0.22, overlay_noise - overlay_bias)); - - - -// merge the noise components - - //grainy_noise = grainy_noise * (1.0-crack_depth * crack_factor) + 0.5 * crack_depth * crack_factor; - texel.rgb = ((1.0 - contrast) + contrast * grainy_noise ) * texel.rgb; - texel.rgb = mix(texel.rgb, overlay_color.rgb,overlay_alpha * overlay_factor); - texel.rgb = texel.rgb * ((1.0-crack_depth) +crack_depth*(1.0-crack_factor * (0.5 + 0.5 * noise_50m) )); - - texel.rgb = texel.rgb * rock_brightness; - - texel.rgb = texel.rgb * (1.0 + 0.4 * (noise_01m-0.5) * detail_fade(0.1, view_angle, dist)) ; - - -const vec4 dust_color = vec4 (0.76, 0.65, 0.45, 1.0); -const vec4 lichen_color = vec4 (0.17, 0.20, 0.06, 1.0); - -// mix vegetation -float gradient_factor = smoothstep(0.5, 1.0, steepness); -texel = mix(texel, lichen_color, gradient_factor * (0.4 * lichen_cover_factor + 0.8 * lichen_cover_factor * 0.5 * (noise_10m + (1.0 - noise_5m))) ); -// mix dust -texel = mix(texel, dust_color, clamp(0.5 * dust_cover_factor *dust_resistance + 3.0 * dust_cover_factor * dust_resistance *(((noise_1500m - 0.5) * 0.125)+0.125 ) - 0.03*slopenoise_100m,0.0, 1.0) ); -// mix snow -float snow_mix_factor = 0.0; -if (msl_altitude +500.0 > snowlevel) - { - - snow_alpha = smoothstep(0.65, 0.85, abs(steepness)); - snow_alpha += (1.0 - snow_alpha) * crack_factor; - - snow_mix_factor = snow_texel.a* smoothstep(snowlevel, snowlevel+200.0, snow_alpha * msl_altitude + (noise_2000m + 0.1 * noise_10m -0.55) *400.0); - texel = mix(texel, snow_texel, snow_mix_factor); - } - - - - -// get distribution of water when terrain is wet - -float combined_wetness = min(1.0, wetness + intrinsic_wetness); -float water_threshold1; -float water_threshold2; -float water_factor =0.0; - - -if ((dist < 5000.0) && (combined_wetness>0.0)) - { - water_threshold1 = 1.0-0.5* combined_wetness; - water_threshold2 = 1.0 - 0.3 * combined_wetness; - water_factor = smoothstep(water_threshold1, water_threshold2 , (0.3 * (2.0 * (1.0-noise_10m) + (1.0 -noise_5m)) * (1.0 - smoothstep(2000.0, 5000.0, dist))) - 5.0 * (1.0 -steepness)); - } - -// darken wet terrain - - texel.rgb = texel.rgb * (1.0 - 0.6 * combined_wetness); - - - -// light computations - - - vec4 light_specular = gl_LightSource[0].specular; - - // 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 = normal; - n = normalize(n); - - NdotL = dot(n, lightDir); - - noisegrad_10m = (noise_10m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),10.0))/0.05; - noisegrad_5m = (noise_5m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),5.0))/0.05; - noisegrad_2m = (noise_2m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),2.0))/0.05; - noisegrad_1m = (noise_1m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),1.0))/0.05; - noisegrad_05m = (noise_05m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),0.5))/0.05; - - - dotnoisegrad_10m = 0.0;//(dotnoise_10m - DotNoise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),10.0 * dot_size,0.5, 0.0))/0.05; - - - //NdotL = NdotL + (noisegrad_10m * detail_fade(10.0, view_angle,dist) + 0.8* noisegrad_5m * detail_fade(5.0, view_angle,dist)); - //NdotL = NdotL + 0.4 * noisegrad_2m * detail_fade(2.0,view_angle,dist); - //NdotL = NdotL + 0.2 * noisegrad_2m * detail_fade(2.0,view_angle,dist); - //NdotL = NdotL + 0.05 * noisegrad_1m * detail_fade(1.0, view_angle,dist); - //NdotL = NdotL + 0.02 * noisegrad_05m * detail_fade(0.5, view_angle,dist); - - //NdotL = NdotL + (1.0-snow_mix_factor) * 0.3* dot_texel.a * (0.5* dotnoisegrad_10m * detail_fade(1.0 * dot_size, view_angle, dist) +0.5 * dotnoisegrad_10m * noise_01m * detail_fade(0.1, view_angle, dist)) ; - //NdotL = NdotL + 0.2 * grainy_noise; - - float snow_factor; - float fresnel; - - if (NdotL > 0.0) { - if (cloud_shadow_flag == 1) {NdotL = NdotL * shadow_func(relPos.x, relPos.y, 0.3 * noise_250m + 0.5 * noise_500m+0.2 * noise_1500m, dist);} - color += diffuse_term * NdotL; - NdotHV = max(dot(n, halfVector), 0.0); - - fresnel = 1.0 + 5.0 * (1.0-smoothstep(0.0,0.2, dot(normalize(ecViewdir),n))); - snow_factor = 0.2 * smoothstep(0.7,0.9,snow_mix_factor) * fresnel; - - //if (gl_FrontMaterial.shininess > 0.0) - specular.rgb = ((gl_FrontMaterial.specular.rgb * 0.1 + snow_factor * vec3(1.0,1.0,1.0) + (water_factor * vec3 (1.0, 1.0, 1.0))) - * light_specular.rgb - * pow(NdotHV, max(gl_FrontMaterial.shininess,4.0) + (20.0 * water_factor))); - } - color.a = 1.0;//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); - - 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); - } - color.rgb +=secondary_light * light_distance_fading(dist); - - - fragColor = color * texel + specular; - -float lightArg = (terminator-yprime_alt)/100000.0; -vec3 hazeColor = get_hazeColor(lightArg); - - - -// Rayleigh color shift due to out-scattering - 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); - fragColor.rgb = rayleigh_out_shift(fragColor.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); - fragColor.rgb = mix(fragColor.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; - - - - -// 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; - } - } - -// blur of the haze layer edge - -float blur_thickness = 50.0; -float cphi = dot(vec3(0.0, 1.0, 0.0), relPos)/dist; -float ctlayer = delta_z/dist-0.01 + 0.02 * Noise2D(vec2(cphi,1.0),0.1) -0.01; -float ctblur = 0.035 ; - -float blur_dist; - -if (abs(delta_z) < 400.0) - { - blur_dist = dist * (1.0-smoothstep(0.0,300.0,-delta_z)) * smoothstep(-400.0,-200.0, -delta_z); - blur_dist = blur_dist * smoothstep(ctlayer-4.0*ctblur, ctlayer-ctblur, ct) * (1.0-smoothstep(ctlayer+0.5*ctblur, ctlayer+ctblur, ct)); - distance_in_layer = max(distance_in_layer, blur_dist); - } - - -// 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) - { - transmission_arg = transmission_arg + (distance_in_layer/(1.0 * visibility + 1.0 * visibility * fogstructure * 0.06 * (noise_1500m + noise_2000m -1.0) )); - // this combines the Weber-Fechner intensity - eqColorFactor = 1.0 - 0.1 * delta_zv/visibility - (1.0 - effective_scattering); - } -else - { - transmission_arg = transmission_arg + (distance_in_layer/(1.0 * avisibility + 1.0 * avisibility * fogstructure * 0.06 * (noise_1500m + noise_2000m - 1.0) )); - // 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 -{ - - - // 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(n,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.rgb *= eqColorFactor * eShade; -hazeColor.rgb = max(hazeColor.rgb, minLight.rgb); - - -fragColor.rgb = mix(hazeColor + secondary_light * fog_backscatter(mvisibility), fragColor.rgb,transmission); - -} - -fragColor.rgb = filter_combined(fragColor.rgb); - -gl_FragColor = fragColor; -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; - -} - diff --git a/Compositor/Shaders/ALS/runway.frag b/Compositor/Shaders/ALS/runway.frag deleted file mode 100644 index c91239e8b..000000000 --- a/Compositor/Shaders/ALS/runway.frag +++ /dev/null @@ -1,537 +0,0 @@ -// -*-C++-*- -#version 120 - -// written by Thorsten Renk, Oct 2011, based on default.frag -// Ambient term comes in gl_Color.rgb. -varying vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; -varying vec2 rawPos; -varying vec3 worldPos; -varying vec3 ecViewdir; - - -uniform float fg_Fcoef; - -uniform sampler2D texture; -uniform sampler2D NormalTex; - -varying float steepness; - -varying float flogz; - - -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 snowlevel; -uniform float dust_cover_factor; -uniform float lichen_cover_factor; -uniform float wetness; -uniform float rain_norm; -uniform float fogstructure; -uniform float snow_thickness_factor; -uniform float cloud_self_shading; -uniform float uvstretch; -uniform float landing_light1_offset; -uniform float landing_light2_offset; -uniform float landing_light3_offset; -uniform float air_pollution; -uniform float osg_SimulationTime; - -uniform int quality_level; -uniform int tquality_level; -uniform int cloud_shadow_flag; -uniform int use_searchlight; -uniform int use_landing_light; -uniform int use_alt_landing_light; -uniform int overlay_flag; - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - -float alt; -float eShade; -float yprime_alt; -float mie_angle; - -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 DotNoise2D(in vec2 coord, in float wavelength, in float fractionalMaxDotSize, in float dot_density); -float fog_func (in float targ, in float 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); -float rayleigh_in_func(in float dist, in float air_pollution, in float avisibility, in float eye_alt, in float vertex_alt); - -vec3 searchlight(); -vec3 landing_light(in float offset, in float offsetv); -vec3 lightspot(in vec3 relPos); -vec3 rayleigh_out_shift(in vec3 color, in float outscatter); -vec3 get_hazeColor(in float light_arg); -vec3 filter_combined (in vec3 color) ; - -float getShadowing(); - - -void main() -{ - - yprime_alt = diffuse_term.a; - mie_angle = gl_Color.a; - float effective_scattering = min(scattering, cloud_self_shading); - - // distance to fragment - float dist = length(relPos); - // angle of view vector with horizon - float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist; - - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); -// this is taken from default.frag - vec3 n; - float NdotL, NdotHV; - vec4 color = gl_Color; - color.a = 1.0; - vec3 lightDir = gl_LightSource[0].position.xyz; - vec3 E = normalize(ecViewdir); - vec3 halfVector; - if (quality_level<6) - {halfVector = gl_LightSource[0].halfVector.xyz;} - else - {halfVector = normalize(normalize(lightDir) + E);} - - vec4 texel; - vec4 snow_texel; - vec4 detail_texel; - vec4 mix_texel; - vec4 fragColor; - vec4 specular = vec4(0.0); - float intensity; - - -// get noise at different wavelengths - -// used: 5m, 5m gradient, 10m, 10m gradient: heightmap of the closeup terrain, 10m also snow -// 50m: detail texel -// 250m: detail texel -// 500m: distortion and overlay -// 1500m: overlay, detail, dust, fog -// 2000m: overlay, detail, snow, fog - -float noise_01m; -float noise_1m = Noise2D(rawPos.xy, 1.0); -float noise_10m = Noise2D(rawPos.xy, 10.0); -float noise_20m = Noise2D(rawPos.xy, 20.0); -float noise_5m = Noise2D(rawPos.xy ,5.0); - - - -float noise_50m = Noise2D(rawPos.xy, 50.0); - - -float noise_1500m = Noise3D(worldPos.xyz, 1500.0); -float noise_2000m = Noise3D(worldPos.xyz, 2000.0); - - - - -// - - -// get the texels - - texel = texture2D(texture, vec2 (gl_TexCoord[0].s, gl_TexCoord[0].t * uvstretch)); - vec4 nmap = texture2D(NormalTex, gl_TexCoord[0].st * 8.0); - vec3 N = nmap.rgb * 2.0 - 1.0; - - - // skid marks by procedural darkening - - float mix_factor = smoothstep(0.0, 0.3, 1.0 - gl_TexCoord[0].t)* smoothstep(0.0, 0.1, gl_TexCoord[0].t); - float threshold; - - if (overlay_flag > 0) - { - float centerness = 2.0 * (0.5 - abs(gl_TexCoord[0].s - 0.5)); - - if (overlay_flag == 1) - { - threshold = 0.4 + 0.3 * (1.0 -noise_50m); - } - else if (overlay_flag == 2) - { - threshold = mix(0.4 + 0.3 * (1.0 -noise_50m), 0.4, mix_factor); - } - else if (overlay_flag == 3) - { - threshold = 0.4 + 0.3 * (1.0 -noise_50m); - } - - centerness = smoothstep(threshold, 1.0, centerness); - - float sine_factor1 = smoothstep(0.6, 1.0, abs(sin(1.0 * noise_50m + 2.0 * gl_TexCoord[0].s + gl_TexCoord[0].s * 40.0))); - float sine_factor2 = smoothstep(0.7, 1.0, abs(sin(2.0 * noise_10m + gl_TexCoord[0].s + gl_TexCoord[0].s * 60.0))); - float sine_factor3 = smoothstep(0.7, 1.0, abs(sin(1.0 * noise_20m + gl_TexCoord[0].s + gl_TexCoord[0].s * 80.0))); - - float sine_factor = sine_factor1 * smoothstep(0.4, 0.6, noise_10m); - sine_factor += sine_factor2 * (1.0 - smoothstep(0.5, 0.7, noise_10m)); - sine_factor += sine_factor3 * smoothstep(0.5, 0.6, noise_20m); - sine_factor = min(sine_factor, 1.0); - - - centerness *=(0.7 + 0.3 *sine_factor); - - float t_factor; - - if (overlay_flag == 1) - {t_factor = smoothstep(0.0, 0.3, gl_TexCoord[0].t) * (0.4 + 0.2 * noise_50m);} - else if (overlay_flag == 2) - { - t_factor = mix (0.4 + 0.2 * noise_50m, 0.7 + 0.2 * noise_50m, mix_factor); - } - else if (overlay_flag == 3) - {t_factor = 0.3 + 0.2 * noise_50m;} - - centerness *= t_factor; - - - centerness = 1.0 - centerness; - texel.rgb = texel.rgb * (0.2 + 0.8 * centerness); - } - - float distortion_factor = 1.0; - vec2 stprime; - int flag = 1; - int mix_flag = 1; - float noise_term; - float snow_alpha; - - - if (quality_level > 3) - { - float sfactor; - noise_01m = Noise2D(rawPos.xy,0.1); - snow_texel = vec4 (0.95, 0.95, 0.95, 1.0) * (0.9 + 0.1* noise_50m + 0.1* (1.0 - noise_10m) ); - snow_texel.a = 1.0; - noise_term = 0.1 * (noise_50m-0.5); - sfactor = 1.0;//sqrt(2.0 * (1.0-steepness)/0.03) + abs(ct)/0.15; - noise_term = noise_term + 0.2 * (noise_10m -0.5) * (1.0 - smoothstep(10000.0*sfactor, 16000.0*sfactor, dist) ) ; - noise_term = noise_term + 0.3 * (noise_5m -0.5) * (1.0 - smoothstep(1200.0 * sfactor, 2000.0 * sfactor, dist) ) ; - noise_term = noise_term + 0.3 * (noise_1m -0.5) * (1.0 - smoothstep(500.0 * sfactor, 1000.0 *sfactor, dist) ); - noise_term = noise_term + 0.3 * (noise_01m -0.5) * (1.0 - smoothstep(20.0 * sfactor, 100.0 *sfactor, dist) ); - snow_texel.a = snow_texel.a * 0.2+0.8* smoothstep(0.2,0.8, 0.3 +noise_term + 0.2*snow_thickness_factor +0.0001*(relPos.z +eye_alt -snowlevel) ); - - } - - -const vec3 dust_color = vec3 (0.76, 0.71, 0.56); -const vec3 lichen_color = vec3 (0.17, 0.20, 0.06); -//float snow_alpha; - -if (quality_level > 3) - { - - // mix vegetation - texel.rgb = mix(texel.rgb, lichen_color, 0.4 * lichen_cover_factor + 0.8 * lichen_cover_factor * 0.5 * (noise_10m + (1.0 - noise_5m)) ); - // mix dust - texel.rgb = mix(texel.rgb, 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) ); - - // mix snow - if (relPos.z + eye_alt +500.0 > snowlevel) - { - snow_alpha = smoothstep(0.75, 0.85, abs(steepness)); - texel.rgb = mix(texel.rgb, snow_texel.rgb, snow_texel.a* smoothstep(snowlevel, snowlevel+200.0, snow_alpha * (relPos.z + eye_alt)+ (noise_2000m + 0.1 * noise_10m -0.55) *400.0)); - } - } - - - -// get distribution of water when terrain is wet - -float water_threshold1; -float water_threshold2; -float water_factor =0.0; - - -if ((dist < 5000.0)&& (quality_level > 3) && (wetness>0.0)) - { - water_threshold1 = 1.0-0.5* wetness; - water_threshold2 = 1.0 - 0.3 * wetness; - water_factor = smoothstep(water_threshold1, water_threshold2 , 0.5 * (noise_5m + (1.0 -noise_1m))) * (1.0 - smoothstep(1000.0, 3000.0, dist)); - } - -// darken wet terrain - - texel.rgb = texel.rgb * (1.0 - 0.6 * wetness - 0.1 * water_factor); - - -// light computations - - eShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt); - vec4 light_specular = gl_LightSource[0].specular * eShade; - - // If gl_Color.a == 0, this is a back-facing polygon and the - // normal should be reversed. - n = normal; - n = normalize(n); - - // primary reflection of the Sun - float fresnel; - NdotL = dot(n, lightDir); - - if (quality_level > 4) - { - NdotL = NdotL + (3.0 * N.r + 0.1 * (noise_01m-0.5))* (1.0 - water_factor) ; - } - if (NdotL > 0.0) - { - float shadowmap = getShadowing(); - if (cloud_shadow_flag == 1) - {NdotL = NdotL * shadow_func(relPos.x, relPos.y, 1.0, dist);} - color += diffuse_term * NdotL * shadowmap; - NdotHV = max(dot(n, halfVector), 0.0); - fresnel = 1.0 + 5.0 * (1.0-smoothstep(0.0,0.2, dot(E,n))); - specular.rgb = ((vec3 (0.2,0.2,0.2) * fresnel + (water_factor * vec3 (1.0, 1.0, 1.0))) - * light_specular.rgb - * pow(NdotHV, max(4.0, (20.0 * water_factor))) - * shadowmap); - } - - // raindrops - float rain_factor = 0.0; - if (rain_norm > 0.0) - { - rain_factor += DotNoise2D(rawPos.xy, 0.2 ,0.5, rain_norm) * abs(sin(6.0*osg_SimulationTime)); - rain_factor += DotNoise2D(rawPos.xy, 0.3 ,0.4, rain_norm) * abs(sin(6.0*osg_SimulationTime + 2.094)); - rain_factor += DotNoise2D(rawPos.xy, 0.4 ,0.3, rain_norm)* abs(sin(6.0*osg_SimulationTime + 4.188)); - } - - // secondary reflection of sky irradiance - float fresnelW = ((0.8 * wetness) + (0.2* water_factor)) * (1.0-smoothstep(0.0,0.4, dot(E,n) * 1.0 - 0.2 * rain_factor * wetness)); - float sky_factor = (1.0-ct*ct);//mix((1.0 - ct * ct), 1.0-effective_scattering, effective_scattering); - vec3 sky_light = vec3 (1.0,1.0,1.0) * length(light_specular.rgb) * (1.0-effective_scattering); - specular.rgb += sky_factor * fresnelW * sky_light; - - - - //specular.rgb *= 1.0 - 0.2 * dotnoise_02m * wetness; - - color.a = 1.0;//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); - - vec3 secondary_light = vec3 (0.0,0.0,0.0); - - if (use_searchlight == 1) - { - secondary_light.rgb += 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); - } - - color.rgb +=secondary_light * light_distance_fading(dist) + lightspot(relPos); - - fragColor = color * texel + specular; - - -float lightArg = (terminator-yprime_alt)/100000.0; - -vec3 hazeColor = get_hazeColor(lightArg); - - -// Rayleigh color shifts - - if ((quality_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); - fragColor.rgb = rayleigh_out_shift(fragColor.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); - fragColor.rgb = mix(fragColor.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; - - - - -// 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 (quality_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 (quality_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; - - -// 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 -{ - - - // 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(n,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)); - } -//hazeColor = clamp(hazeColor, 0.0, 1.0); - -// 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.rgb *= eqColorFactor * eShade; -hazeColor.rgb = max(hazeColor.rgb, minLight.rgb); - -fragColor.rgb = mix(hazeColor +secondary_light * fog_backscatter(mvisibility), fragColor.rgb,transmission); - -} - -fragColor.rgb = filter_combined(fragColor.rgb); - -gl_FragColor = fragColor; -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; - -} - diff --git a/Compositor/Shaders/ALS/secondary_lights.frag b/Compositor/Shaders/ALS/secondary_lights.frag deleted file mode 100644 index ea11d38c4..000000000 --- a/Compositor/Shaders/ALS/secondary_lights.frag +++ /dev/null @@ -1,102 +0,0 @@ -// -*-C++-*- -#version 120 - -uniform int display_xsize; -uniform int display_ysize; -uniform float field_of_view; -uniform float view_pitch_offset; -uniform float view_heading_offset; - -float light_distance_fading(in float dist) -{ -return min(1.0, 10000.0/(dist*dist)); -} - -float fog_backscatter(in float avisibility) -{ -return 0.5* min(1.0,10000.0/(avisibility*avisibility)); -} - - - -vec3 searchlight() -{ - -vec2 center = vec2 (float(display_xsize) * 0.5, float(display_ysize) * 0.4); - -float headlightIntensity; -float lightRadius = (float(display_xsize) *9.16 /field_of_view); -float angularDist = length(gl_FragCoord.xy -center); - -if (angularDist < lightRadius) - { - headlightIntensity = pow(cos(angularDist/lightRadius * 1.57075),2.0); - //headlightIntensity = headlightIntensity * - //headlightIntensity*= clamp(1.0 + 0.15 * log(1000.0/(dist*dist)),0.0,1.0); - return headlightIntensity * vec3 (0.5,0.5, 0.5); - } -else return vec3 (0.0,0.0,0.0); -} - -vec3 flashlight(in vec3 color, in float radius) -{ - -vec2 center = vec2 (float(display_xsize) * 0.5, float(display_ysize) * 0.4); - -float headlightIntensity; -float lightRadius = (float(display_xsize) *radius /field_of_view); -float angularDist = length(gl_FragCoord.xy -center); - -if (angularDist < lightRadius) - { - headlightIntensity = pow(cos(angularDist/lightRadius * 1.57075),2.0); - return headlightIntensity * color; - } -else return vec3 (0.0,0.0,0.0); -} - -vec3 landing_light(in float offset, in float offsetv) -{ - -float fov_h = field_of_view; -float fov_v = float(display_ysize)/float(display_xsize) * field_of_view; - -float yaw_offset; - -if (view_heading_offset > 180.0) - {yaw_offset = -360.0+view_heading_offset;} -else - {yaw_offset = view_heading_offset;} - -float x_offset = (float(display_xsize) / fov_h * (yaw_offset + offset)); -float y_offset = -(float(display_ysize) / fov_v * (view_pitch_offset + offsetv)); - -vec2 center = vec2 (float(display_xsize) * 0.5 + x_offset, float(display_ysize) * 0.4 + y_offset); - - - -float landingLightIntensity; -float lightRadius = (float(display_xsize) *9.16 /field_of_view); -float angularDist = length(gl_FragCoord.xy -center); - -if (angularDist < lightRadius) - { - landingLightIntensity = pow(cos(angularDist/lightRadius * 1.57075),2.0); - //landingLightIntensity *= min(1.0, 10000.0/(dist*dist)); - return landingLightIntensity * vec3 (0.5,0.5, 0.5); - } -else return vec3 (0.0,0.0,0.0); - -} - - -vec3 addLights(in vec3 color1, in vec3 color2) -{ -vec3 outcolor; - -outcolor.r = 0.14 * log(exp(color1.r/0.14) + exp(color2.r/0.14)-1.0); -outcolor.g = 0.14 * log(exp(color1.g/0.14) + exp(color2.g/0.14)-1.0); -outcolor.b = 0.14 * log(exp(color1.b/0.14) + exp(color2.b/0.14)-1.0); - -return outcolor; -} diff --git a/Compositor/Shaders/ALS/skydome.frag b/Compositor/Shaders/ALS/skydome.frag deleted file mode 100644 index 9a97b33e9..000000000 --- a/Compositor/Shaders/ALS/skydome.frag +++ /dev/null @@ -1,385 +0,0 @@ -// -*-C++-*- - -#version 120 - -// Atmospheric scattering shader for flightgear -// Written by Lauri Peltonen (Zan) -// Implementation of O'Neil's algorithm -// Ground haze layer added by Thorsten Renk -// aurora and ice haze scattering Thorsten Renk 2016 - -varying vec3 rayleigh; -varying vec3 mie; -varying vec3 eye; -varying vec3 hazeColor; -varying vec3 viewVector; -varying float ct; -varying float cphi; -varying float delta_z; -varying float alt; -varying float earthShade; - - -uniform float overcast; -uniform float saturation; -uniform float visibility; -uniform float avisibility; -uniform float scattering; -uniform float terminator; -uniform float cloud_self_shading; -uniform float horizon_roughness; -uniform float ice_hex_col; -uniform float ice_hex_sheet; -uniform float parhelic; -uniform float ring; -uniform float aurora_strength; -uniform float aurora_hsize; -uniform float aurora_vsize; -uniform float aurora_ray_factor; -uniform float aurora_penetration_factor; -uniform float landing_light1_offset; -uniform float landing_light2_offset; -uniform float landing_light3_offset; -uniform float osg_SimulationTime; - -uniform int use_searchlight; -uniform int use_landing_light; -uniform int use_alt_landing_light; - -const float EarthRadius = 5800000.0; - - -float Noise2D(in vec2 coord, in float wavelength); -float fog_backscatter(in float avisibility); - -vec3 searchlight(); -vec3 landing_light(in float offset, in float offsetv); -vec3 filter_combined (in vec3 color) ; - -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 > 30.0) {return e;} -if (x < -15.0) {return 0.0;} - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - -float miePhase(in float cosTheta, in float g) -{ - float g2 = g*g; - float a = 1.5 * (1.0 - g2); - float b = (2.0 + g2); - float c = 1.0 + cosTheta*cosTheta; - float d = pow(1.0 + g2 - 2.0 * g * cosTheta, 0.6667); - - return (a*c) / (b*d); -} - -float rayleighPhase(in float cosTheta) -{ - //return 1.5 * (1.0 + cosTheta*cosTheta); - return 1.5 * (2.0 + 0.5*cosTheta*cosTheta); -} - - -void main() -{ - - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - float cosTheta = dot(normalize(eye), gl_LightSource[0].position.xyz); - - // some geometry - - vec3 nView = normalize(viewVector); - vec3 lightFull = normalize((gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz); - float calpha = dot(lightFull, nView); - float cbeta = dot ( normalize(lightFull.xy), normalize(nView.xy)); - float costheta = ct; - - // some noise - - float hNoise_03 = Noise2D(vec2(0.0,cphi), 0.3); - float hNoiseAurora = Noise2D(vec2(0.001 * osg_SimulationTime,cphi + nView.x + nView.y), 0.07) * 0.2 * aurora_ray_factor; - - // position of the horizon line - - float lAltitude = alt + delta_z; - float radiusEye = (EarthRadius + alt); - float radiusLayer = (EarthRadius + lAltitude); - float cthorizon; - float ctterrain; - //float ctsd; - - float SkydomeRadius = (EarthRadius + 100000.0); - float rEye = (EarthRadius + alt); - - if (radiusEye > radiusLayer) cthorizon = -sqrt(radiusEye * radiusEye - radiusLayer * radiusLayer)/radiusEye; - else cthorizon = sqrt(radiusLayer * radiusLayer - radiusEye * radiusEye)/radiusLayer; - - //if (rEye > SkydomeRadius) ctsd = -sqrt(rEye * rEye - SkydomeRadius * SkydomeRadius)/rEye; - //else ctsd = 0.0;//sqrt(SkydomeRadius * SkydomeRadius - rEye * rEye)/SkydomeRadius; - - ctterrain = -sqrt(radiusEye * radiusEye - EarthRadius * EarthRadius)/radiusEye; - - vec3 color = rayleigh * rayleighPhase(cosTheta); - color += mie * miePhase(cosTheta, -0.8); - - vec3 black = vec3(0.0,0.0,0.0); - - - float ovc = overcast; - - - float sat = 1.0 - ((1.0 - saturation) * 2.0); - if (sat < 0.3) sat = 0.3; - - if (color.r > 0.58) color.r = 1.0 - exp(-1.5 * color.r); - if (color.g > 0.58) color.g = 1.0 - exp(-1.5 * color.g); - if (color.b > 0.58) color.b = 1.0 - exp(-1.5 * color.b); - - - -// Aurora Borealis / Australis - - vec3 direction = vec3 (1.0, 0.0, 0.0); - - float hArg = dot(nView, direction); - - float aurora_vEdge = 0.2 - 0.6 * aurora_vsize * (1.0 - 0.8* aurora_ray_factor); - float aurora_vArg = costheta + hNoiseAurora; - float aurora_v = smoothstep(aurora_vEdge , 0.2 , costheta + hNoiseAurora) * (1.0- smoothstep(0.3, 0.3 + aurora_vsize, aurora_vArg)); - aurora_v *= (1.0 + 5.0 * aurora_ray_factor * (1.0 -smoothstep(aurora_vEdge, 0.3, aurora_vArg))); - - float aurora_h = smoothstep(1.0 - aurora_hsize, 1.0, hArg); - float aurora_time = 0.01 * osg_SimulationTime; - - vec3 auroraBaseColor = vec3 (0.0, 0.2, 0.1); - vec3 auroraFringeColor = vec3 (0.4, 0.15, 0.2); - - float fringe_factor = 1.0 - smoothstep(aurora_vEdge, aurora_vEdge + 0.08, aurora_vArg); - fringe_factor *= aurora_strength * aurora_penetration_factor; - auroraBaseColor = mix(auroraBaseColor, auroraFringeColor, fringe_factor ); - - float aurora_ray = mix(1.0, Noise2D(vec2(cbeta, 0.01 * aurora_time), 0.001), aurora_ray_factor); - - float aurora_visible_strength = 0.3 + 0.7 * Noise2D(vec2(costheta + aurora_time, 0.5 * nView.x + 0.3 * nView.y + aurora_time), 0.1) ; - aurora_visible_strength *= aurora_ray; - float aurora_fade_in = 1.0 - smoothstep(0.1, 0.2, length(color.rgb)); - - - - color.rgb += auroraBaseColor * aurora_v * aurora_h * aurora_fade_in * aurora_visible_strength * aurora_strength; - -// fog computations for a ground haze layer, extending from zero to lAltitude - -float transmission; -float vAltitude; -float delta_zv; - - - -float vis = min(visibility, avisibility); - - - if (delta_z > 0.0) // we're inside the layer - { - if (costheta>0.0 + ctterrain) // looking up, view ray intersecting upper layer edge - { - transmission = exp(-min((delta_z/max(costheta,0.1)),25000.0)/vis); - //transmission = 1.0; - vAltitude = min(vis * costheta, delta_z); - delta_zv = delta_z - vAltitude; - } - - else // looking down, view range intersecting terrain (which may not be drawn) - { - transmission = exp(alt/vis/costheta); - vAltitude = min(-vis * costheta, alt); - delta_zv = delta_z + vAltitude; - } - } - else // we see the layer from above - { - if (costheta < 0.0 + cthorizon) - { - transmission = exp(-min(lAltitude/abs(costheta),25000.0)/vis); - transmission = transmission * exp(-alt/avisibility/abs(costheta)); - transmission = 1.0 - (1.0 - transmission) * smoothstep(0+cthorizon, -0.02+cthorizon, costheta); - vAltitude = min(lAltitude, -vis * costheta); - delta_zv = vAltitude; - } - else - { - transmission = 1.0; - delta_zv = 0.0; - } - } - -// combined intensity reduction by cloud shading and fog self-shading, corrected for Weber-Fechner perception law -float eqColorFactor = 1.0 - 0.1 * delta_zv/vis - (1.0 - min(scattering,cloud_self_shading)); - - -// there's always residual intensity, we should never be driven to zero -if (eqColorFactor < 0.2) eqColorFactor = 0.2; - - -// postprocessing of haze color -vec3 hColor = hazeColor; - - -// high altitude desaturation -float intensity = length(hColor); -hColor = intensity * normalize (mix(hColor, intensity * vec3 (1.0,1.0,1.0), 0.7 * smoothstep(5000.0, 50000.0, alt))); - -hColor = clamp(hColor,0.0,1.0); - -// blue hue -hColor.x = 0.83 * hColor.x; -hColor.y = 0.9 * hColor.y; - - - -// further blueshift when in shadow, either cloud shadow, or self-shadow or Earth shadow, dependent on indirect -// light - -float fade_out = max(0.65 - 0.3 *overcast, 0.45); -intensity = length(hColor); -vec3 oColor = hColor; -oColor = intensity * normalize(mix(oColor, shadedFogColor, (smoothstep(0.1,1.0,ovc)))); - -// ice crystal halo - -float sun_altitude = dot (lightFull, vec3 (0.0, 0.0, 1.0)); -float view_altitude = dot(nView, vec3 (0.0, 0.0, 1.0)); - -//float halo_ring_enhancement = smoothstep (0.88, 0.927, calpha) * (1.0 - smoothstep(0.927, 0.98, calpha)); -float halo_ring_enhancement = smoothstep (0.88, 0.927, calpha) * (1.0 - smoothstep(0.927, 0.94, calpha)); -halo_ring_enhancement *= halo_ring_enhancement; -halo_ring_enhancement *= ring; - -// parhelic circle - -float parhelic_circle_enhancement = 0.3 * smoothstep (sun_altitude-0.01, sun_altitude, view_altitude) * (1.0 - smoothstep(sun_altitude, sun_altitude+ 0.01, view_altitude)); - -parhelic_circle_enhancement += 0.8 * smoothstep (sun_altitude-0.08, sun_altitude, view_altitude) * (1.0 - smoothstep(sun_altitude, sun_altitude+ 0.08, view_altitude)); - -parhelic_circle_enhancement *= parhelic * (0.2 + 0.8 * smoothstep(0.5, 1.0, cbeta)); - -// sundogs - -float side_sun_enhancement = smoothstep (sun_altitude-0.03, sun_altitude, view_altitude) * (1.0 - smoothstep(sun_altitude, sun_altitude+ 0.03, view_altitude)); - -side_sun_enhancement *= halo_ring_enhancement * halo_ring_enhancement * ice_hex_sheet; - -// pillar - -float pillar_enhancement = smoothstep (sun_altitude-0.1, sun_altitude, view_altitude) * (1.0 - smoothstep(sun_altitude, sun_altitude+ 0.22, view_altitude)); -float beta_thickness = 0.6 * smoothstep(0.999, 1.0, cbeta); -beta_thickness += 0.8 * smoothstep(0.99998, 1.0, cbeta); -pillar_enhancement *= beta_thickness * beta_thickness * smoothstep(0.99, 1.0, calpha) * ice_hex_col; - - - -float scattering_enhancements = 0.25 * halo_ring_enhancement * ovc; -scattering_enhancements += side_sun_enhancement *0.4 * (1.0 - smoothstep(0.6, 0.95, transmission)); -scattering_enhancements += pillar_enhancement *0.25 * (1.0 - smoothstep(0.7, 1.0, transmission)); -scattering_enhancements += parhelic_circle_enhancement * 0.2 * (1.0 - smoothstep(0.7, 1.0, transmission)); - - -color.rgb += vec3(1.0, 1.0, 1.0) * (5.0-4.0* earthShade) * scattering_enhancements * hazeColor; - -oColor = clamp(oColor,0.0,1.0); -color = ovc * mix(color, oColor * earthShade ,smoothstep(-0.1+ctterrain, 0.0+ctterrain, ct)) + (1.0-ovc) * color; - - -hColor = intensity * normalize(mix(hColor, 1.5 * shadedFogColor, 1.0 -smoothstep(0.25, fade_out,earthShade) )); -hColor = intensity * normalize(mix(hColor, shadedFogColor, (1.0 - smoothstep(0.5,0.9,eqColorFactor)))); -hColor = hColor * earthShade; - -// accounting for overcast and saturation - - - -color = sat * color + (1.0 - sat) * mix(color, black, smoothstep(0.4+cthorizon,0.2+cthorizon,ct)); - - -// the terrain below the horizon gets drawn in one optical thickness -vec3 terrainHazeColor = eqColorFactor * hColor; - -// determine a visibility-dependent angle for how smoothly the haze blends over the skydome - -float hazeBlendAngle = max(0.01,1000.0/avisibility + 0.3 * (1.0 - smoothstep(5000.0, 30000.0, avisibility))); -float altFactor = smoothstep(-300.0, 0.0, delta_z); -float altFactor2 = 0.2 + 0.8 * smoothstep(-3000.0, 0.0, delta_z); -hazeBlendAngle = hazeBlendAngle + 0.1 * altFactor; -hazeBlendAngle = hazeBlendAngle + (1.0-horizon_roughness) * altFactor2 * 0.1 * hNoise_03; - -terrainHazeColor = clamp(terrainHazeColor,0.0,1.0); - - -// don't let the light fade out too rapidly -float 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); - -// this is for the bare Rayleigh and Mie sky, highly altitude dependent -color.rgb = max(color.rgb, minLight.rgb * (1.0- min(alt/100000.0,1.0)) * (1.0 - costheta)); - -// this is for the terrain drawn -terrainHazeColor = max(terrainHazeColor.rgb, minLight.rgb); - -color = mix(color, terrainHazeColor ,smoothstep(hazeBlendAngle + ctterrain, 0.0+ctterrain, ct)); - - -// add the brightening of fog by lights - - vec3 secondary_light = vec3 (0.0,0.0,0.0); - - if (use_searchlight == 1) - { - secondary_light.rgb += 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); - } - - - - -// mix fog the skydome with the right amount of haze - -hColor *= eqColorFactor; -hColor = max(hColor.rgb, minLight.rgb); - -hColor = clamp(hColor,0.0,1.0); - -color = mix(hColor+secondary_light * fog_backscatter(avisibility),color, transmission); - -// blur the upper skydome edge when we're outside the atmosphere - -float asf = smoothstep (75000.0, 90000.0, alt); - -float asf_corr = clamp((alt-115000.0)/45000.0, 0.0,1.0) * 0.08; - - -color *= (1.0 - smoothstep( -0.12 -asf_corr, -0.06 - asf_corr, costheta) * asf); -color = filter_combined(color); - - - - - gl_FragColor = vec4(color, 1.0); - gl_FragDepth = 0.1; - - -} - diff --git a/Compositor/Shaders/ALS/skydome.vert b/Compositor/Shaders/ALS/skydome.vert deleted file mode 100644 index 91798e86a..000000000 --- a/Compositor/Shaders/ALS/skydome.vert +++ /dev/null @@ -1,301 +0,0 @@ -// -*-C++-*- - -#version 120 - -// Atmospheric scattering shader for flightgear -// Written by Lauri Peltonen (Zan) -// Implementation of O'Neil's algorithm - -uniform float fg_Fcoef; - -uniform mat4 osg_ViewMatrix; -uniform mat4 osg_ViewMatrixInverse; -uniform float hazeLayerAltitude; -uniform float terminator; -uniform float avisibility; -uniform float visibility; -uniform float terrain_alt; -uniform float air_pollution; -uniform float radius_modifier; - -varying vec3 rayleigh; -varying vec3 mie; -varying vec3 eye; -varying vec3 hazeColor; -varying vec3 viewVector; -varying float ct; -varying float cphi; -varying float delta_z; -varying float alt; -varying float earthShade; - - -// Dome parameters from FG and screen -const float domeSize = 80000.0; -const float realDomeSize = 100000.0; -const float groundRadius = 0.984503332 * domeSize; -const float altitudeScale = domeSize - groundRadius; -const float EarthRadius = 5800000.0; - -// Dome parameters when calculating scattering -// Assuming dome size is 5.0 -const float groundLevel = 0.984503332 * 5.0; -const float heightScale = (5.0 - groundLevel); - -// Integration parameters -const int nSamples = 7; -const float fSamples = float(nSamples); - -// Scattering parameters -uniform float rK = 0.0003; //0.00015; -uniform float mK = 0.003; //0.0025; -uniform float density = 0.5; //1.0 -//vec3 rayleighK = rK * vec3(5.602, 7.222, 19.644); -vec3 rayleighK = rK * vec3(4.5, 8.62, 17.3); -vec3 mieK = vec3(mK); -vec3 sunIntensity = 10.0*vec3(120.0, 125.0, 130.0); - -// light_func is a generalized logistic function fit to the light intensity as a function -// of scaled terminator position obtained from Flightgear core - -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 > 30.0) {return e;} -if (x < -15.0) {return 0.0;} - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - - -// Find intersections of ray to skydome -// ray must be normalized -// cheight is camera height -float intersection (in float cheight, in vec3 ray, in float rad2) -{ - float B = 2.0 * cheight*ray.y; - float C = cheight*cheight - rad2; // 25.0 is skydome radius * radius - float fDet = max(0.0, B*B - 4.0 * C); - return 0.5 * (-B - sqrt(fDet)); -} - -// Return the scale function at height = 0 for different thetas -float outscatterscale(in float costheta) -{ - - - float x = 1.0 - costheta; - - float a = 1.16941; - float b = 0.618989; - float c = 6.34484; - float d = -31.4138; - float e = 75.3249; - float f = -80.1643; - float g = 32.2878; - - return exp(a+x*(b+x*(c+x*(d+x*(e+x*(f+x*g)))))); -} - -// Return the amount of outscatter for different heights and thetas -// assuming view ray hits the skydome -// height is 0 at ground level and 1 at space -// Assuming average density of atmosphere is at 1/4 height -// and atmosphere height is 100 km -float outscatter(in float costheta, in float height) -{ - return density * outscatterscale(costheta) * exp(-4.0 * height); -} - - -void main() -{ - // Make sure the dome is of a correct size - vec4 realVertex = gl_Vertex; //vec4(normalize(gl_Vertex.xyz) * domeSize, 1.0); - - - - // Ground point (skydome center) in eye coordinates - vec4 groundPoint = gl_ModelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0); - - - // Calculate altitude as the distance from skydome center to camera - // Make it so that 0.0 is ground level and 1.0 is 100km (space) level - // the correction ensures compatibility with Earthview for orbits farther out - float altitude = distance(groundPoint, vec4(0.0, 0.0, 0.0, 1.0)) * (1.0 -0.0013); - float scaledAltitude = altitude / realDomeSize; - - // the local horizon angle - float radiusEye = EarthRadius + altitude; - float ctterrain = -sqrt(radiusEye * radiusEye - EarthRadius * EarthRadius)/radiusEye; - - - // Camera's position, z is up! - float cameraRealAltitude = groundLevel + heightScale*scaledAltitude; - vec3 camera = vec3(0.0, 0.0, cameraRealAltitude); - vec3 sample = 5.0 * realVertex.xyz / domeSize; // Sample is the dome vertex - vec3 relativePosition = camera - sample; // Relative position - - viewVector = (sample-camera).xyz; - - // Find intersection of skydome and view ray - float space = intersection(cameraRealAltitude, -normalize(relativePosition), 25.0); - if(space > 0.0) { - // We are in space, calculate correct positiondelta! - relativePosition -= space * normalize(relativePosition); - } - - - vec3 positionDelta = relativePosition / fSamples; - float deltaLength = length(positionDelta); // Should multiply by something? - - vec3 lightDirection = gl_LightSource[0].position.xyz; - - - - // Cos theta of camera's position and sample point - // Since camera is 0,0,z, dot product is just the z coordinate - float cameraCosTheta; - - // If sample is above camera, reverse ray direction - if(positionDelta.z < 0.0) cameraCosTheta = -positionDelta.z / deltaLength; - else cameraCosTheta = positionDelta.z / deltaLength; - - - float cameraCosTheta1 = -positionDelta.z / deltaLength; - - - // Total attenuation from camera to skydome - float totalCameraScatter = outscatter(cameraCosTheta, scaledAltitude); - - - // Do numerical integration of scattering function from skydome to camera - vec3 color = vec3(0.0); - - // no scattering integrations where terrain is later drawn - if (cameraCosTheta1 > (ctterrain-0.05)) - { - for(int i = 0; i < nSamples; i++) - { - // Altitude of the sample point 0...1 - float sampleAltitude = (length(sample) - groundLevel) / heightScale; - - // Cosine between the angle of sample's up vector and sun - // Since lightDirection is in eye space, we must transform sample too - vec3 sampleUp = gl_NormalMatrix * normalize(sample); - float cosTheta = dot(sampleUp, lightDirection); - - // Scattering from sky to sample point - float skyScatter = outscatter(cosTheta, sampleAltitude); - - // Calculate the attenuation from this point to camera - // Again, reverse the direction if vertex is over the camera - float cameraScatter; - if(relativePosition.z < 0.0) { // Vertex is over the camera - cameraCosTheta = -dot(normalize(positionDelta), normalize(sample)); - - cameraScatter = totalCameraScatter - outscatter(cameraCosTheta, sampleAltitude); - } else { // Vertex is below camera - cameraCosTheta = dot(normalize(positionDelta), normalize(sample)); - cameraScatter = outscatter(cameraCosTheta, sampleAltitude) - totalCameraScatter; - } - - // Total attenuation - vec3 totalAttenuate = 4.0 * 3.14159 * (rayleighK + mieK) * (-skyScatter - cameraScatter); - - vec3 inScatter = exp(totalAttenuate - sampleAltitude*4.0); - - color += inScatter * deltaLength; - sample += positionDelta; - } - } - color *= sunIntensity; - ct = cameraCosTheta1; - rayleigh = rayleighK * color; - mie = mieK * color; - eye = gl_NormalMatrix * positionDelta; - - - - - // We need to move the camera so that the dome appears to be centered around earth - // to make the dome render correctly! - float moveDown = -altitude; // Center dome on camera - moveDown += groundRadius; - moveDown += scaledAltitude * altitudeScale; // And move correctly according to altitude - - // Vertex transformed correctly so that at 100km we are at space border - vec4 finalVertex = realVertex - vec4(0.0, 0.0, 1.0, 0.0) * moveDown; - - - // prepare some stuff for a ground haze layer - - delta_z = hazeLayerAltitude - altitude; - alt = altitude; - - - // establish coordinates relative to sun position - vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0); - vec3 lightFull = (gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz; - vec3 lightHorizon = normalize(vec3(lightFull.x,lightFull.y, 0.0) ); - - - vec3 relVector = normalize(finalVertex.xyz - ep.xyz); - - // and compute the twilight shading - - - // yprime is the coordinate from/towards terminator - float yprime; - - if (alt > hazeLayerAltitude) // we're looking from above and can see far - { - if (ct < 0.0) - { - yprime = -dot(relVector,lightHorizon) * altitude/-ct;//(ct-0.001); - yprime = yprime -sqrt(2.0 * EarthRadius * hazeLayerAltitude); - } - else // the only haze we see looking up is overcast, assume its altitude - { - yprime = -dot(relVector,lightHorizon) * avisibility; - yprime = yprime -sqrt(2.0 * EarthRadius * 10000.0); - } - } - else - {yprime = -dot(relVector,lightHorizon) * avisibility; - yprime = yprime -sqrt(2.0 * EarthRadius * hazeLayerAltitude); - } - - if (terminator > 1000000.0){yprime = -sqrt(2.0 * EarthRadius * hazeLayerAltitude);} - - float terminator_width = 200000.0; - earthShade = 0.9 * smoothstep((terminator_width+ terminator), (-terminator_width + terminator), yprime) + 0.1; - - float lightArg = (terminator-yprime)/100000.0; - - hazeColor.r = light_func(lightArg, 8.305e-06, 0.161, 4.827-3.0*air_pollution, 3.04e-05, 1.0); - hazeColor.g = light_func(lightArg, 3.931e-06, 0.264, 3.827, 7.93e-06, 1.0); - hazeColor.b = light_func(lightArg, 1.330e-05, 0.264, 1.527+2.0*air_pollution, 1.08e-05, 1.0); - - //new - //hazeColor.r = light_func(lightArg, 3.495e-05, 0.161, 3.878, 0.000129, 1.0); - //hazeColor.g = light_func(lightArg, 1.145e-05, 0.161, 3.827, 1.783e-05, 1.0); - //hazeColor.b = light_func(lightArg, 0.234, 0.141, 2.572, 0.257, 1.0); - - float intensity = length(hazeColor.xyz); - float mie_magnitude = 0.5 * smoothstep(350000.0, 150000.0, terminator -sqrt(2.0 * EarthRadius * terrain_alt)); - cphi = dot(normalize(relVector), normalize(lightHorizon)); - float mie_angle = (0.5 * dot(normalize(relVector), normalize(lightFull)) ) + 0.5; - - float mie_postfactor = clamp(mie_magnitude * (0.5 - 0.5 * mie_angle),0.001,1.0); - - hazeColor = intensity * ((1.0 - mie_magnitude) + mie_magnitude * mie_angle) * normalize(mix(hazeColor, vec3 (0.5, 0.58, 0.65), mie_postfactor ) ); - - - // Transform - gl_Position = gl_ModelViewProjectionMatrix * finalVertex; - // logarithmic depth - gl_Position.z = (log2(max(1e-6, 1.0 + gl_Position.w)) * fg_Fcoef - 1.0) * gl_Position.w; -} diff --git a/Compositor/Shaders/ALS/space-base.frag b/Compositor/Shaders/ALS/space-base.frag deleted file mode 100644 index 065c88285..000000000 --- a/Compositor/Shaders/ALS/space-base.frag +++ /dev/null @@ -1,365 +0,0 @@ -// -*-C++-*- -#version 120 - -// written by Thorsten Renk, Oct 2011, based on default.frag -// Ambient term comes in gl_Color.rgb. -varying vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; - - -uniform float fg_Fcoef; - -uniform sampler2D texture; - - -varying float yprime_alt; -varying float mie_angle; - -varying float flogz; - - -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 cloud_self_shading; -uniform float air_pollution; -uniform float landing_light1_offset; -uniform float landing_light2_offset; -uniform float landing_light3_offset; - -uniform float geo_light_x; -uniform float geo_light_y; -uniform float geo_light_z; -uniform float geo_light_radius; -uniform float geo_ambience; - -uniform float geo_light_r; -uniform float geo_light_g; -uniform float geo_light_b; - -uniform int quality_level; -uniform int tquality_level; -uniform int use_searchlight; -uniform int use_landing_light; -uniform int use_alt_landing_light; -uniform int use_geo_light; - - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - -float alt; -float eShade; - - -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); - - -float luminance(vec3 color) -{ - return dot(vec3(0.212671, 0.715160, 0.072169), color); -} - - -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 > 30.0) {return e;} -if (x < -15.0) {return 0.0;} - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - -// this determines how light is attenuated in the distance -// physically this should be exp(-arg) but for technical reasons we use a sharper cutoff -// for distance > visibility - - - - -void main() -{ - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); -// this is taken from default.frag - 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 fragColor; - vec4 specular = vec4(0.0); - float intensity; - - float effective_scattering = min(scattering, cloud_self_shading); - - eShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt); - vec4 light_specular = gl_LightSource[0].specular * (eShade - 0.1); - - // 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 - * light_specular.rgb - * pow(NdotHV, gl_FrontMaterial.shininess)); - } - - //vec3 up = (gl_ModelViewMatrix * vec4(0.0,0.0,1.0,0.0)).xyz; - - //vec3 sky_blue = vec3 (0.17, 0.52, 0.87); - - //NdotL = dot(n, -up); - //if (NdotL > 0.0) - //{ - //color.rgb += sky_blue * NdotL; - //} - - 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); - - float dist = length(relPos); - vec3 secondary_light = vec3 (0.0,0.0,0.0); - - if ((quality_level > 5) && (tquality_level > 5)) - { - 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); - } - - vec3 geo_light = vec3 (0.0, 0.0, 0.0); - - if (use_geo_light == 1) - { - vec3 geo_light_vec = vec3 (geo_light_x, geo_light_y, geo_light_z); - vec3 geo_light_rel_vec = geo_light_vec - (relPos + (gl_ModelViewMatrixInverse * vec4 (0.0, 0.0, 0.0, 1.0)).xyz); - - vec3 geo_lightdir = (gl_ModelViewMatrix * vec4 (geo_light_rel_vec, 0.0)).xyz; - float geo_light_incidence = geo_ambience + (1.0- geo_ambience) * clamp(dot(n, geo_lightdir),0.0, 1.0); - - geo_light = vec3 (geo_light_r, geo_light_g, geo_light_b) * (1.0 - smoothstep(0.5 * geo_light_radius, geo_light_radius, length(geo_light_rel_vec))) * geo_light_incidence; - } - - if (dist > 2.0) // we don't want to light the cockpit... - {color.rgb +=secondary_light * light_distance_fading(dist) + geo_light ;} - } - - - - - texel = texture2D(texture, gl_TexCoord[0].st); - fragColor = color * texel + specular; - - -float lightArg = (terminator-yprime_alt)/100000.0; - -vec3 hazeColor = get_hazeColor(lightArg); - - -// Rayleigh color shift due to in-scattering - - if ((quality_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); - fragColor.rgb = rayleigh_out_shift(fragColor.rgb,outscatter); - 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); - fragColor.rgb = mix(fragColor.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; - -// 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; - -//float scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, relPos.z + eye_alt); - -if (visibility < avisibility) - { - 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 - { - 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; - - - - - - - -// 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)) ); - } - -// high altitude desaturation of the haze color - -intensity = length(hazeColor); -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 -//intensity = length(hazeColor); -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(normal,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); - -// determine the right mix of transmission and haze - - -fragColor.rgb = mix(hazeColor + secondary_light * fog_backscatter(mvisibility), fragColor.rgb,transmission); - - - -} - - -gl_FragColor = fragColor; -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; -} - diff --git a/Compositor/Shaders/ALS/space-base.vert b/Compositor/Shaders/ALS/space-base.vert deleted file mode 100644 index 7351aca74..000000000 --- a/Compositor/Shaders/ALS/space-base.vert +++ /dev/null @@ -1,269 +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 vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; - -varying float yprime_alt; -varying float mie_angle; -varying float alt_factor; - -varying float flogz; - -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 moonlight; -uniform float eye_alt; - - -// 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 earthShade; - -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_diffuse; - 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; - -// this code is copied from default.vert - - //vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex; - gl_Position = ftransform(); - // logarithmic depth - flogz = 1.0 + gl_Position.w; - 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); - - - // 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.a = 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.rgb, shadedFogColor, 1.0 -smoothstep(0.4, 0.8,earthShade) )); - - - intensity = length(light_diffuse.rgb); - light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, 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 = vec4 (1.0, 1.0, 1.0, 0.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_diffuse.a = 1.0; - - light_ambient.r = 0.316 + lightArg * 0.016; - 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; - } - - light_diffuse = light_diffuse * scattering; - yprime_alt = -sqrt(2.0 * EarthRadius * hazeLayerAltitude); -} - -// at high altitude, the light gets de-saturated and the ambient channel dies out -// whereas the diffuse channel is enhanced - - alt_factor = smoothstep(10000.0, 100000.0, eye_alt); - float ambient_reduction = 0.25 + 0.75 * (1.0-alt_factor); - float diffuse_enhancement = 1.0 + 1.0 * (1.0 - ambient_reduction); - - light_ambient.rgb = light_ambient.rgb * ambient_reduction; - light_diffuse.rgb = light_diffuse.rgb * diffuse_enhancement; - light_ambient.rgb = light_ambient.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade)); - - vec3 sky_blue = normalize (vec3 (0.17, 0.52, 0.87)); - intensity = length(light_ambient.rgb); - light_ambient.rgb = mix(light_ambient.rgb, intensity * sky_blue, alt_factor); - - intensity = length(light_diffuse.rgb); - light_diffuse.rgb = mix(light_diffuse.rgb, intensity * vec3 (1.0,1.0,1.0), alt_factor); - -// default lighting based on texture and material using the light we have just computed - - diffuse_term = diffuse_color* light_diffuse; - vec4 constant_term = gl_FrontMaterial.emission + ambient_color * - (gl_LightModel.ambient + light_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; - -} - - - - diff --git a/Compositor/Shaders/ALS/space-ultra.frag b/Compositor/Shaders/ALS/space-ultra.frag deleted file mode 100644 index 143f17f3d..000000000 --- a/Compositor/Shaders/ALS/space-ultra.frag +++ /dev/null @@ -1,683 +0,0 @@ -// -*- mode: C; -*- -// Licence: GPL v2 -// Authors: Frederic Bouvier and Gijs de Rooy -// with major additions and revisions by -// Emilian Huminiuc and Vivian Meazza 2011 -// ported to Atmospheric Light Scattering -// by Thorsten Renk, 2013 -#version 120 - -varying vec3 VBinormal; -varying vec3 VNormal; -varying vec3 VTangent; -varying vec3 rawpos; -varying vec3 reflVec; -varying vec3 vViewVec; -varying vec3 vertVec; - -varying float alpha; - -varying float flogz; - -uniform float fg_Fcoef; - -uniform sampler2D BaseTex; -uniform sampler2D LightMapTex; -uniform sampler2D NormalTex; -uniform sampler2D ReflMapTex; -uniform sampler2D ReflGradientsTex; -uniform sampler3D ReflNoiseTex; -uniform samplerCube Environment; -uniform sampler2D GrainTex; - -uniform int dirt_enabled; -uniform int dirt_multi; -uniform int dirt_modulates_reflection; -uniform int lightmap_enabled; -uniform int lightmap_multi; -uniform int nmap_dds; -uniform int nmap_enabled; -uniform int refl_enabled; -uniform int refl_type; -uniform int refl_map; -uniform int grain_texture_enabled; -uniform int darkmap_enabled; -uniform int rain_enabled; -uniform int cloud_shadow_flag; -uniform int use_searchlight; -uniform int use_landing_light; -uniform int use_alt_landing_light; -uniform int use_geo_light; - -uniform float amb_correction; -uniform float dirt_b_factor; -uniform float dirt_g_factor; -uniform float dirt_r_factor; -uniform float dirt_reflection_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 float grain_magnification; -uniform float wetness; -uniform float rain_norm; -uniform float darkmap_factor; -uniform float delta_T; - -uniform float avisibility; -uniform float cloud_self_shading; -uniform float eye_alt; -uniform float ground_scattering; -uniform float hazeLayerAltitude; -uniform float moonlight; -uniform float overcast; -uniform float scattering; -uniform float terminator; -uniform float terrain_alt; -uniform float visibility; -uniform float air_pollution; - -uniform float osg_SimulationTime; - -uniform float landing_light1_offset; -uniform float landing_light2_offset; -uniform float landing_light3_offset; - -uniform float geo_light_x; -uniform float geo_light_y; -uniform float geo_light_z; -uniform float geo_light_radius; -uniform float geo_ambience; - -// constants needed by the light and fog computations ################################################### - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - -uniform vec3 lightmap_r_color; -uniform vec3 lightmap_g_color; -uniform vec3 lightmap_b_color; -uniform vec3 lightmap_a_color; - -uniform float geo_light_r; -uniform float geo_light_g; -uniform float geo_light_b; - -uniform vec3 dirt_r_color; -uniform vec3 dirt_g_color; -uniform vec3 dirt_b_color; - -float DotNoise2D(in vec2 coord, in float wavelength, in float fractionalMaxDotSize, in float dot_density); -float shadow_func (in float x, in float y, in float noise, in float dist); -float fog_func (in float targ, in float altitude); -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 lightArg); -vec3 searchlight(); -vec3 landing_light(in float offset, in float offsetv); -vec3 addLights(in vec3 color1, in vec3 color2); -vec4 color_temperature (in float T); -vec3 filter_combined (in vec3 color) ; -vec3 moonlight_perception (in vec3 light) ; - - -float light_func (in float x, in float a, in float b, in float c, in float d, in float e) - { - if (x > 30.0) {return e;} - if (x < -15.0) {return 0.0;} - return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); - } - - - - - -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); - - vec4 grainTexel; - - vec3 mixedcolor; - vec3 N = vec3(0.0,0.0,1.0); - float pf = 0.0; - float pf1 = 0.0; - ///some generic light scattering parameters - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight; - moonLightColor = moonlight_perception(moonLightColor); - float alt = eye_alt; - float effective_scattering = min(scattering, cloud_self_shading); - - - /// BEGIN geometry for light - - vec3 up = (gl_ModelViewMatrix * vec4(0.0,0.0,1.0,0.0)).xyz; - //vec4 worldPos3D = (osg_ViewMatrixInverse * vec4 (0.0,0.0,0.0, 1.0)); - //worldPos3D.a = 0.0; - //vec3 up = (osg_ViewMatrix * worldPos3D).xyz; - float dist = length(vertVec); - float vertex_alt = max(100.0,dot(up, vertVec) + alt); - float vertex_scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_alt); - - - vec3 lightHorizon = gl_LightSource[0].position.xyz - up * dot(up,gl_LightSource[0].position.xyz); - float yprime = -dot(vertVec, lightHorizon); - float yprime_alt = yprime - sqrt(2.0 * EarthRadius * vertex_alt); - float lightArg = (terminator-yprime_alt)/100000.0; - - float earthShade = 0.6 * (1.0 - smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt)) + 0.4; - - float mie_angle; - if (lightArg < 10.0) - {mie_angle = (0.5 * dot(normalize(vertVec), normalize(gl_LightSource[0].position.xyz)) ) + 0.5;} - else - {mie_angle = 1.0;} - - float fog_vertex_alt = max(vertex_alt,hazeLayerAltitude); - float fog_yprime_alt = yprime_alt; - if (fog_vertex_alt > hazeLayerAltitude) - { - if (dist > 0.8 * avisibility) - { - fog_vertex_alt = mix(fog_vertex_alt, hazeLayerAltitude, smoothstep(0.8*avisibility, avisibility, dist)); - fog_yprime_alt = yprime -sqrt(2.0 * EarthRadius * fog_vertex_alt); - } - } - else - { - fog_vertex_alt = hazeLayerAltitude; - fog_yprime_alt = yprime -sqrt(2.0 * EarthRadius * fog_vertex_alt); - } - - float fog_lightArg = (terminator-fog_yprime_alt)/100000.0; - float fog_earthShade = 0.9 * smoothstep(terminator_width+ terminator, -terminator_width + terminator, fog_yprime_alt) + 0.1; - - float ct = dot(normalize(up), normalize(vertVec)); - - /// END geometry for light - - - /// BEGIN light - vec4 light_diffuse; - vec4 light_ambient; - float intensity; - - 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.a = 1.0; - light_diffuse = light_diffuse * vertex_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; - - if (earthShade < 0.5) - { - intensity = length(light_ambient.rgb); - light_ambient.rgb = intensity * normalize(mix(light_ambient.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.8,earthShade) )); - light_ambient.rgb = light_ambient.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade)); - - intensity = length(light_diffuse.rgb); - light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.7,earthShade) )); - } - - // at high altitude, the light gets de-saturated and the ambient channel dies out - // whereas the diffuse channel is enhanced - - float alt_desat_factor = smoothstep(10000.0, 100000.0, eye_alt); - float ambient_reduction = 0.1 + 0.9 * (1.0-alt_desat_factor); - float diffuse_enhancement = 1.0 + 1.0 * (1.0 - ambient_reduction); - - light_ambient.rgb = light_ambient.rgb * ambient_reduction; - light_diffuse.rgb = light_diffuse.rgb * diffuse_enhancement; - light_ambient.rgb = light_ambient.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade)); - - //vec3 sky_blue = normalize (vec3 (0.17, 0.52, 0.87)); - //intensity = length(light_ambient.rgb); - //light_ambient.rgb = mix(light_ambient.rgb, intensity * sky_blue, alt_desat_factor); - - intensity = length(light_diffuse.rgb); - light_diffuse.rgb = mix(light_diffuse.rgb, intensity * vec3 (1.0,1.0,1.0), alt_desat_factor); - - float diffuse_reduction = 1; - - if (darkmap_enabled == 1) - { - diffuse_reduction = mix(1.0,lightmapTexel.a, darkmap_factor); - light_diffuse.rgb = light_diffuse.rgb * diffuse_reduction; - } - - light_diffuse.rgb = clamp(light_diffuse.rgb, 0.0, 1.2); - - /// END light - - /// BEGIN grain overlay - if (grain_texture_enabled ==1) - { - grainTexel = texture2D(GrainTex, gl_TexCoord[0].st * grain_magnification); - texel.rgb = mix(texel.rgb, grainTexel.rgb, grainTexel.a ); - } - else if (grain_texture_enabled == 2) - { - grainTexel = texture2D(GrainTex, rawpos.xy * grain_magnification); - texel.rgb = mix(texel.rgb, grainTexel.rgb, grainTexel.a ); - } - - /// END grain overlay - - ///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 - vec4 reflection = textureCube(Environment, reflVec * dot(N,VNormal)); - vec3 viewVec = normalize(vViewVec); - float v = abs(dot(viewVec, normalize(VNormal)));// Map a rainbowish color - vec4 fresnel = texture2D(ReflGradientsTex, vec2(v, 0.75)); - vec4 rainbow = texture2D(ReflGradientsTex, vec2(v, 0.25)); - - 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))); - //glare on the backside of tranparent objects - if ((gl_FrontMaterial.diffuse.a < 1.0 || texel.a < 1.0) - && dot(N, normalize(gl_LightSource[0].position.xyz)) < 0.0) { - nDotVP = max(0.0, dot(-N, normalize(gl_LightSource[0].position.xyz))); - nDotHV = max(0.0, dot(-N, normalize(gl_LightSource[0].halfVector.xyz))); - } - - float nDotVP1 = 0.0; - float nDotHV1 = 0.0; - - - // try specular reflection of sky irradiance - nDotVP1 = max(0.0, dot(N, up)); - nDotHV1 = max(0.0, dot(N, normalize(normalize(up) + normalize(-vertVec)))); - - - if (nDotVP == 0.0) - {pf = 0.0;} - else - {pf = pow(nDotHV, gl_FrontMaterial.shininess);} - - if (nDotVP1 == 0.0) - {pf1 = 0.0;} - else - {pf1 = pow(nDotHV1, 0.5*gl_FrontMaterial.shininess);} - - - vec3 relPos = (gl_ModelViewMatrixInverse * vec4 (vertVec,0.0)).xyz; - if (cloud_shadow_flag == 1) - { - light_diffuse = light_diffuse * shadow_func(relPos.x, relPos.y, 1.0, dist); - } - - 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); - } - - - vec3 geo_light_vec = (gl_ModelViewMatrix * vec4 (geo_light_x, geo_light_y, geo_light_z, 0.0)).xyz; - vec3 geo_light_rel_vec = geo_light_vec -(gl_ModelViewMatrix * vec4 (rawpos, 0.0)).xyz; - - float geo_light_incidence = geo_ambience + (1.0- geo_ambience) * clamp(dot(N, geo_light_rel_vec),0.0, 1.0); - - vec3 geo_light = vec3 (geo_light_r, geo_light_g, geo_light_b) * (1.0 - smoothstep(0.5 * geo_light_radius, geo_light_radius, length(geo_light_rel_vec))) * geo_light_incidence; - - vec4 Diffuse = light_diffuse * nDotVP; - //Diffuse.rgb += secondary_light * light_distance_fading(dist) + geo_light; - - Diffuse.rgb = addLights(Diffuse.rgb, secondary_light * light_distance_fading(dist)); - //if (use_geo_light == 1) - {Diffuse.rgb = addLights(Diffuse.rgb, geo_light * diffuse_reduction );} - - - ///BEGIN reflection correction by dirt - - float refl_d = 1.0; - - if ((dirt_enabled == 1) && (dirt_modulates_reflection == 1)) - { - refl_d = 1.0 - (reflmap.r * dirt_r_factor * (1.0 - dirt_reflection_factor)); - } - - ///END reflection correction by dirt - - vec4 Specular = gl_FrontMaterial.specular * light_diffuse * pf + gl_FrontMaterial.specular * light_ambient * pf1; - Specular+= gl_FrontMaterial.specular * pow(max(0.0,-dot(N,normalize(vertVec))),gl_FrontMaterial.shininess) * vec4(secondary_light,1.0); - - Specular *= refl_d; - - vec4 color = gl_Color * light_ambient + gl_FrontMaterial.emission; - - color = color + Diffuse * gl_FrontMaterial.diffuse; - color = clamp( color, 0.0, 1.0 ); - - //////////////////////////////////////////////////////////////////// - //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 - //float pam = (map.a * -2) + 1; //reverse map - 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 - vec4 reflcolor = mix(reflection, rainbow, refl_rainbow * v); - //vec4 reflcolor = reflection; - vec4 reflfrescolor = mix(reflcolor, fresnel, refl_fresnel * v); - vec4 noisecolor = mix(reflfrescolor, noisevec, refl_noise); - vec4 raincolor = vec4(noisecolor.rgb * reflFactor, 1.0); - raincolor += Specular; - raincolor *= light_diffuse; - - if (refl_type == 1) - {mixedcolor = mix(texel, raincolor, reflFactor * refl_d).rgb;} - else if (refl_type == 2) - {mixedcolor = ((texel +(reflcolor * reflFactor * refl_d))-(0.5*reflFactor * refl_d)).rgb;} - - } else { - mixedcolor = texel.rgb; - } - ///////////////////////////////////////////////////////////////////// - //END reflect - ///////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////// - //begin DIRT - ////////////////////////////////////////////////////////////////////// - if (dirt_enabled >= 1){ - vec3 dirtFactorIn = vec3 (dirt_r_factor, dirt_g_factor, dirt_b_factor); - vec3 dirtFactor = reflmap.rgb * dirtFactorIn.rgb; - //dirtFactor.r = smoothstep(0.0, 1.0, dirtFactor.r); - mixedcolor.rgb = mix(mixedcolor.rgb, dirt_r_color, smoothstep(0.0, 1.0, dirtFactor.r)); - texel.rgb = mix(texel.rgb, dirt_r_color, smoothstep(0.0, 1.0, dirtFactor.r)); - if (dirt_multi > 0) { - //dirtFactor.g = smoothstep(0.0, 1.0, dirtFactor.g); - //dirtFactor.b = smoothstep(0.0, 1.0, dirtFactor.b); - 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)); - } - } - ////////////////////////////////////////////////////////////////////// - //END Dirt - ////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////// - //begin WETNESS - ////////////////////////////////////////////////////////////////////// - - if (rain_enabled >0.0) - { - texel.rgb = texel.rgb * (1.0 - 0.6 * wetness); - float rain_factor = 0.0; - if (rain_norm > 0.0) - { - rain_factor += DotNoise2D(rawpos.xy, 0.2 ,0.5, rain_norm) * abs(sin(6.0*osg_SimulationTime)); - rain_factor += DotNoise2D(rawpos.xy, 0.3 ,0.4, rain_norm) * abs(sin(6.0*osg_SimulationTime + 2.094)); - rain_factor += DotNoise2D(rawpos.xy, 0.4 ,0.3, rain_norm)* abs(sin(6.0*osg_SimulationTime + 4.188)); - } - - // secondary reflection of sky irradiance in water film - float fresnelW = ((0.8 * wetness) ) * (1.0-smoothstep(0.0,0.4, dot(N,-normalize(vertVec)) * 1.0 - 0.2 * rain_factor * wetness)); - float sky_factor = (1.0-ct*ct); - vec3 sky_light = vec3 (1.0,1.0,1.0) * length(light_diffuse.rgb) * (1.0-effective_scattering); - Specular.rgb += sky_factor * fresnelW * sky_light; - } - ///////////////////////////////////////////////////////////////////// - //end WETNESS - ////////////////////////////////////////////////////////////////////// - - - // set ambient adjustment to remove bluiness with user input - float ambient_offset = clamp(amb_correction, -1.0, 1.0); - vec4 ambient = gl_LightModel.ambient + light_ambient; - vec4 ambient_Correction = vec4(ambient.rg, ambient.b * 0.6, 1.0) - * ambient_offset ; - ambient_Correction = clamp(ambient_Correction, -1.0, 1.0); - - ambient_Correction = vec4 (0.0, 0.0, 0.0, 1.0); - - - - color.a = texel.a * alpha; - vec4 fragColor = vec4(color.rgb * mixedcolor + ambient_Correction.rgb, color.a); - - fragColor += Specular * nmap.a; - - ////////////////////////////////////////////////////////////////////// - // 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 ; - lightmapcolor = lightmap_r_color * lightmapFactor.r; - lightmapcolor = addLights(lightmapcolor, lightmap_g_color * lightmapFactor.g); - lightmapcolor = addLights(lightmapcolor, lightmap_b_color * lightmapFactor.b); - if (darkmap_enabled == 0) - { - lightmapcolor = addLights(lightmapcolor, lightmap_a_color * lightmapFactor.a); - } - - } else { - lightmapcolor = lightmapTexel.rgb * lightmap_r_color * lightmapFactor.r; - } - fragColor.rgb = max(fragColor.rgb, lightmapcolor * gl_FrontMaterial.diffuse.rgb * smoothstep(0.0, 1.0, mixedcolor*.5 + lightmapcolor*.5)); - } - ////////////////////////////////////////////////////////////////////// - // END lightmap - ///////////////////////////////////////////////////////////////////// - - /// BEGIN glow - - float temperature = delta_T; - - if (darkmap_enabled == 2) - { - temperature *= (1.0 - darkmap_factor * lightmapTexel.a); - } - - vec4 glow = color_temperature(temperature); - float glowFactor = 0.3 + 0.6 * (1.0 - length(texel.rgb)/1.73); - glowFactor *= glow.a; - fragColor.rgb = mix(fragColor.rgb, glow.rgb, glowFactor); - - ////////////////////////////////////////////////////////////////////// - // END glow - ///////////////////////////////////////////////////////////////////// - - - /// BEGIN fog amount - - float transmission; - float vAltitude; - float delta_zv; - float H; - float distance_in_layer; - float transmission_arg; - float eqColorFactor; - - float delta_z = hazeLayerAltitude - eye_alt; - float mvisibility = min(visibility, avisibility); - - if (dist > 0.04 * mvisibility) - { - 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; - } - } - - transmission_arg = (dist-distance_in_layer)/avisibility; - - - if (visibility < avisibility) - { - transmission_arg = transmission_arg + (distance_in_layer/visibility); - eqColorFactor = 1.0 - 0.1 * delta_zv/visibility - (1.0 -effective_scattering); - } - else - { - transmission_arg = transmission_arg + (distance_in_layer/avisibility); - eqColorFactor = 1.0 - 0.1 * delta_zv/avisibility - (1.0 -effective_scattering); - } - transmission = fog_func(transmission_arg, alt); - if (eqColorFactor < 0.2) eqColorFactor = 0.2; - } - else - { - eqColorFactor = 1.0; - transmission = 1.0; - } - - /// END fog amount - - /// BEGIN fog color - - vec3 hazeColor = get_hazeColor(fog_lightArg); - - float rShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt + 420000.0); - float lightIntensity = length(hazeColor * effective_scattering) * rShade; - - if (transmission< 1.0) - { - - - - if (fog_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); - hazeColor = intensity * normalize (mix(hazeColor, intensity * vec3 (1.0,1.0,1.0), 0.7* smoothstep(5000.0, 50000.0, alt))); - - hazeColor.r = hazeColor.r * 0.83; - hazeColor.g = hazeColor.g * 0.9; - - 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,fog_earthShade) )); - hazeColor = intensity * normalize(mix(hazeColor, shadedFogColor, (1.0-smoothstep(0.5,0.9,eqColorFactor)))); - - float shadow = mix( min(1.0 + dot(VNormal,gl_LightSource[0].position.xyz),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)); - } - else - { - hazeColor = vec3 (1.0, 1.0, 1.0); - } - - - /// END fog color - fragColor = clamp(fragColor, 0.0, 1.0); - //hazeColor = clamp(hazeColor, 0.0, 1.0); - - ///BEGIN Rayleigh fog /// - - // Rayleigh color shift due to out-scattering - 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); - fragColor.rgb = rayleigh_out_shift(fragColor.rgb,outscatter); - - 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); - fragColor.rgb = mix(fragColor.rgb, rayleighColor,rayleighStrength); - - /// END Rayleigh fog - - // 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 * fog_earthShade; - hazeColor.rgb = max(hazeColor.rgb, minLight.rgb); - - - - fragColor.rgb = mix(hazeColor +secondary_light * fog_backscatter(mvisibility), fragColor.rgb,transmission); - - - gl_FragColor = fragColor; - // logarithmic depth - gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; - - } diff --git a/Compositor/Shaders/ALS/space-ultra.vert b/Compositor/Shaders/ALS/space-ultra.vert deleted file mode 100644 index eee877d09..000000000 --- a/Compositor/Shaders/ALS/space-ultra.vert +++ /dev/null @@ -1,118 +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 float alpha; - -varying float flogz; - -attribute vec3 tangent; -attribute vec3 binormal; - -uniform float pitch; -uniform float roll; -uniform float hdg; -uniform int refl_dynamic; -uniform int nmap_enabled; -uniform int shader_qual; - -//////Fog Include/////////// -// uniform int fogType; -// void fog_Func(int type); -//////////////////////////// - -void rotationMatrixPR(in float sinRx, in float cosRx, in float sinRy, in float cosRy, out mat4 rotmat) -{ - rotmat = mat4( cosRy , sinRx * sinRy , cosRx * sinRy, 0.0, - 0.0 , cosRx , -sinRx * cosRx, 0.0, - -sinRy, sinRx * cosRy, cosRx * cosRy , 0.0, - 0.0 , 0.0 , 0.0 , 1.0 ); -} - -void rotationMatrixH(in float sinRz, in float cosRz, out mat4 rotmat) -{ - rotmat = mat4( cosRz, -sinRz, 0.0, 0.0, - sinRz, cosRz, 0.0, 0.0, - 0.0 , 0.0 , 1.0, 0.0, - 0.0 , 0.0 , 0.0, 1.0 ); -} - -void main(void) -{ - rawpos = gl_Vertex.xyz; - vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex; - //fog_Func(fogType); - - VNormal = normalize(gl_NormalMatrix * gl_Normal); - - vec3 n = normalize(gl_Normal); - vec3 tempTangent = cross(n, vec3(1.0,0.0,0.0)); - vec3 tempBinormal = cross(n, tempTangent); - - if (nmap_enabled > 0){ - tempTangent = tangent; - tempBinormal = binormal; - } - - VTangent = normalize(gl_NormalMatrix * tempTangent); - VBinormal = normalize(gl_NormalMatrix * tempBinormal); - vec3 t = tempTangent; - vec3 b = tempBinormal; - - // 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); - vec3 reflVec_stat = normalize(gl_ModelViewMatrixInverse * reflect_eye).xyz; - if (refl_dynamic > 0){ - //prepare rotation matrix - mat4 RotMatPR; - mat4 RotMatH; - float _roll = roll; - if (_roll>90.0 || _roll < -90.0) - { - _roll = -_roll; - } - float cosRx = cos(radians(_roll)); - float sinRx = sin(radians(_roll)); - float cosRy = cos(radians(-pitch)); - float sinRy = sin(radians(-pitch)); - float cosRz = cos(radians(hdg)); - float sinRz = sin(radians(hdg)); - rotationMatrixPR(sinRx, cosRx, sinRy, cosRy, RotMatPR); - rotationMatrixH(sinRz, cosRz, RotMatH); - vec3 reflVec_dyn = (RotMatH * (RotMatPR * normalize(gl_ModelViewMatrixInverse * reflect_eye))).xyz; - - reflVec = reflVec_dyn; - } else { - reflVec = reflVec_stat; - } - - - gl_FrontColor = gl_Color; - - gl_Position = ftransform(); - // logarithmic depth - flogz = 1.0 + gl_Position.w; - gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; -} diff --git a/Compositor/Shaders/ALS/surface-light.frag b/Compositor/Shaders/ALS/surface-light.frag deleted file mode 100644 index 812e23c70..000000000 --- a/Compositor/Shaders/ALS/surface-light.frag +++ /dev/null @@ -1,183 +0,0 @@ -// -*-C++-*- -#version 120 - -uniform float fg_Fcoef; - -uniform sampler2D texture; - -uniform float visibility; -uniform float avisibility; -uniform float hazeLayerAltitude; -uniform float eye_alt; -uniform float terminator; -uniform float size; - -uniform bool use_IR_vision; -uniform bool use_night_vision; - -varying vec3 relPos; -varying vec2 rawPos; -varying float pixelSize; - -varying float flogz; - -float alt; - -float Noise2D(in vec2 coord, in float wavelength); - -float fog_func (in float targ) -{ - - -float fade_mix; - -// for large altitude > 30 km, we switch to some component of quadratic distance fading to -// create the illusion of improved visibility range - -targ = 1.25 * targ * smoothstep(0.04,0.06,targ); // need to sync with the distance to which terrain is drawn - - -if (alt < 30000.0) - {return exp(-targ - targ * targ * targ * targ);} -else if (alt < 50000.0) - { - fade_mix = (alt - 30000.0)/20000.0; - return fade_mix * exp(-targ*targ - pow(targ,4.0)) + (1.0 - fade_mix) * exp(-targ - pow(targ,4.0)); - } -else - { - return exp(- targ * targ - pow(targ,4.0)); - } - -} - - -float light_sprite (in vec2 coord, in float transmission, in float noise) -{ - -coord.s = coord.s - 0.5; -coord.t = coord.t - 0.5; - -float r = length(coord); - -if (pixelSize<1.3) {return 0.08;} - -float angle = noise * 6.2832; - -float sinphi = dot(vec2 (sin(angle),cos(angle)), normalize(coord)); -float sinterm = sin(mod((sinphi-3.0) * (sinphi-3.0),6.2832)); -float ray = 0.0; -if (sinterm == 0.0) - {ray = 0.0;} -else - //{ray = clamp(pow(sinterm,10.0),0.0,1.0);} - {ray = sinterm * sinterm * sinterm * sinterm * sinterm * sinterm * sinterm * sinterm * sinterm * sinterm;} - - -float fogEffect = (1.0-smoothstep(0.4,0.8,transmission)); -float halo = 0.2 * exp(-10.0 * r * r); -float base = exp(-80.0*r*r); -ray *= exp(-40.0 * r * r); - - -float intensity = clamp(ray + base + halo,0.0,1.0) + 0.1 * fogEffect * (1.0-smoothstep(0.3, 0.6,r)); - -return intensity; - -} - - -void main() -{ - - float dist = length(relPos); - float delta_z = hazeLayerAltitude - eye_alt; - float transmission; - float vAltitude; - float delta_zv; - float H; - float distance_in_layer; - float transmission_arg; - - if (use_IR_vision) {discard;} - - // Discard the second and third vertex, which are used for directional lighting - if (gl_Color.a == 0.0) {discard;} - - float noise = Noise2D(rawPos.xy ,1.0); - - // 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,min(visibility, avisibility)) * 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; - if (visibility < avisibility) - { - transmission_arg = transmission_arg + (distance_in_layer/visibility); - } - else - { - transmission_arg = transmission_arg + (distance_in_layer/avisibility); - } - - - - transmission = fog_func(transmission_arg); - float lightArg = terminator/100000.0; - float attenuationScale = 1.0 + 20.0 * (1.0 -smoothstep(-15.0, 0.0, lightArg)); - float dist_att = exp(-dist/200.0/size/attenuationScale); - - float intensity = light_sprite(gl_TexCoord[0].st,transmission, noise); - vec3 light_color = gl_Color.rgb; - - if (use_night_vision) - {light_color.rgb = vec3 (0.0, 1.0, 0.0);} - - light_color = mix(light_color, vec3 (1.0, 1.0, 1.0), 0.5 * intensity * intensity); - - gl_FragColor = vec4 (clamp(light_color.rgb,0.0,1.0), intensity * transmission * dist_att); - // logarithmic depth - gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; - -} diff --git a/Compositor/Shaders/ALS/surface-light.vert b/Compositor/Shaders/ALS/surface-light.vert deleted file mode 100644 index 5172fc04a..000000000 --- a/Compositor/Shaders/ALS/surface-light.vert +++ /dev/null @@ -1,45 +0,0 @@ -// -*-C++-*- -#version 120 - -// Shader that uses OpenGL state values to do per-pixel lighting - -uniform float size; -uniform float max_size; - - -uniform bool is_directional; - -varying vec3 relPos; -varying vec2 rawPos; -varying float pixelSize; - -varying float flogz; - -bool light_directional = true; - -void main() -{ - gl_FrontColor= gl_Color; - gl_Position = ftransform(); - // logarithmic depth - flogz = 1.0 + gl_Position.w; - - vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0); - relPos = gl_Vertex.xyz - ep.xyz; - rawPos = gl_Vertex.xy; - float dist = length(relPos); - float angular_fade = 1.0; - - if (is_directional) - { - angular_fade = 2.0 * max(0.0,-dot(normalize(gl_Normal), normalize(relPos))); - } - - float size_use = size; - if (size_use < 10.0) {size_use = 20.0;} - - float lightScale = size_use * size_use * size_use * size_use * size_use/ 500.0 *angular_fade; - pixelSize = min(size_use * size_use/25.0,lightScale/dist) ; - pixelSize = min(pixelSize, max_size); - gl_PointSize = 2.0 * pixelSize; -} diff --git a/Compositor/Shaders/ALS/terrain-base.frag b/Compositor/Shaders/ALS/terrain-base.frag deleted file mode 100644 index 6e84cdd19..000000000 --- a/Compositor/Shaders/ALS/terrain-base.frag +++ /dev/null @@ -1,255 +0,0 @@ -// -*-C++-*- -#version 120 - -// written by Thorsten Renk, Oct 2011, based on default.frag -// Ambient term comes in gl_Color.rgb. -varying vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; - - -uniform float fg_Fcoef; - -uniform sampler2D texture; - - -varying float yprime_alt; -varying float mie_angle; - -varying float flogz; - - -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 cloud_self_shading; - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - -float alt; -float eShade; - -float fog_func (in float targ, in float alt); -vec3 get_hazeColor(in float light_arg); -vec3 filter_combined (in vec3 color) ; - -float getShadowing(); - -float luminance(vec3 color) -{ - return dot(vec3(0.212671, 0.715160, 0.072169), color); -} - - - -void main() -{ - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); -// this is taken from default.frag - 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 fragColor; - vec4 specular = vec4(0.0); - float intensity; - - float effective_scattering = min(scattering, cloud_self_shading); - - - vec4 light_specular = gl_LightSource[0].specular; - - // 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) { - float shadowmap = getShadowing(); - color += diffuse_term * NdotL * shadowmap; - NdotHV = max(dot(n, halfVector), 0.0); - if (gl_FrontMaterial.shininess > 0.0) - specular.rgb = (gl_FrontMaterial.specular.rgb - * light_specular.rgb - * pow(NdotHV, gl_FrontMaterial.shininess) - * shadowmap); - } - 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; - - - -// here comes the terrain haze model - - -float delta_z = hazeLayerAltitude - eye_alt; -float dist = length(relPos); - -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; - -// 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) - { - 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 - { - 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;} - - -float lightArg = (terminator-yprime_alt)/100000.0; -vec3 hazeColor = get_hazeColor(lightArg); - - - -// 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)) ); - } - -// high altitude desaturation of the haze color - -intensity = length(hazeColor); -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 -//intensity = length(hazeColor); -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(normal,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); - -// determine the right mix of transmission and haze - -fragColor.rgb = mix(hazeColor, fragColor.rgb,transmission); -} - -fragColor.rgb = filter_combined(fragColor.rgb); - -gl_FragColor = fragColor; -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; -} - diff --git a/Compositor/Shaders/ALS/terrain-detailed.frag b/Compositor/Shaders/ALS/terrain-detailed.frag deleted file mode 100644 index 3a057d23b..000000000 --- a/Compositor/Shaders/ALS/terrain-detailed.frag +++ /dev/null @@ -1,511 +0,0 @@ -// -*-C++-*- -#version 120 - -// written by Thorsten Renk, Oct 2011, based on default.frag -// Ambient term comes in gl_Color.rgb. -varying vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; -varying vec2 rawPos; -varying vec3 worldPos; - - -uniform float fg_Fcoef; - -uniform sampler2D texture; -uniform sampler2D detail_texture; -uniform sampler2D mix_texture; - -//varying float yprime_alt; -//varying float mie_angle; -varying float steepness; - -varying float flogz; - - -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 snowlevel; -uniform float dust_cover_factor; -uniform float lichen_cover_factor; -uniform float wetness; -uniform float fogstructure; -uniform float snow_thickness_factor; -uniform float cloud_self_shading; -uniform float season; -uniform float transition_model; -uniform float hires_overlay_bias; -uniform int quality_level; -uniform int tquality_level; - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - -float alt; -float eShade; -float yprime_alt; -float mie_angle; - -float Noise2D(in vec2 coord, in float wavelength); -float Noise3D(in vec3 coord, in float wavelength); - -float fog_func (in float targ, in float alt); -vec3 get_hazeColor(in float light_arg); -vec3 filter_combined (in vec3 color) ; - -float getShadowing(); - - - -void main() -{ - - -yprime_alt = diffuse_term.a; -//diffuse_term.a = 1.0; -mie_angle = gl_Color.a; -float effective_scattering = min(scattering, cloud_self_shading); - -// distance to fragment -float dist = length(relPos); -// angle of view vector with horizon -float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist; - - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); -// this is taken from default.frag - vec3 n; - float NdotL, NdotHV, fogFactor; - vec4 color = gl_Color; - color.a = 1.0; - vec3 lightDir = gl_LightSource[0].position.xyz; - vec3 halfVector = gl_LightSource[0].halfVector.xyz; - //vec3 halfVector = normalize(normalize(lightDir) + normalize(ecViewdir)); - vec4 texel; - vec4 snow_texel; - vec4 detail_texel; - vec4 mix_texel; - vec4 fragColor; - vec4 specular = vec4(0.0); - float intensity; - - -// get noise at different wavelengths - -// used: 5m, 5m gradient, 10m, 10m gradient: heightmap of the closeup terrain, 10m also snow -// 50m: detail texel -// 250m: detail texel -// 500m: distortion and overlay -// 1500m: overlay, detail, dust, fog -// 2000m: overlay, detail, snow, fog - -float noise_10m; -float noise_5m; -noise_10m = Noise2D(rawPos.xy, 10.0); -noise_5m = Noise2D(rawPos.xy ,5.0); - -float noisegrad_10m; -float noisegrad_5m; - -float noise_50m = Noise2D(rawPos.xy, 50.0);; - - -float noise_250m = Noise3D(worldPos.xyz,250.0); -float noise_500m = Noise3D(worldPos.xyz, 500.0); -float noise_1500m = Noise3D(worldPos.xyz, 1500.0); -float noise_2000m = Noise3D(worldPos.xyz, 2000.0); - - - -// - - -// get the texels - - texel = texture2D(texture, gl_TexCoord[0].st); - float local_autumn_factor = texel.a; - - float distortion_factor = 1.0; - vec2 stprime; - int flag = 1; - int mix_flag = 1; - float noise_term; - float snow_alpha; - - - - - //float view_angle = abs(dot(normal, normalize(ecViewdir))); - - if ((quality_level > 3)&&(relPos.z + eye_alt +500.0 > snowlevel)) - { - float sfactor; - snow_texel = vec4 (0.95, 0.95, 0.95, 1.0) * (0.9 + 0.1* noise_500m + 0.1* (1.0 - noise_10m) ); - snow_texel.r = snow_texel.r * (0.9 + 0.05 * (noise_10m + noise_5m)); - snow_texel.g = snow_texel.g * (0.9 + 0.05 * (noise_10m + noise_5m)); - snow_texel.a = 1.0; - noise_term = 0.1 * (noise_500m-0.5); - sfactor = sqrt(2.0 * (1.0-steepness)/0.03) + abs(ct)/0.15; - noise_term = noise_term + 0.2 * (noise_50m -0.5) * (1.0 - smoothstep(18000.0*sfactor, 40000.0*sfactor, dist) ) ; - noise_term = noise_term + 0.3 * (noise_10m -0.5) * (1.0 - smoothstep(4000.0 * sfactor, 8000.0 * sfactor, dist) ) ; - if (dist < 3000.0*sfactor){ noise_term = noise_term + 0.3 * (noise_5m -0.5) * (1.0 - smoothstep(1000.0 * sfactor, 3000.0 *sfactor, dist) );} - snow_texel.a = snow_texel.a * 0.2+0.8* smoothstep(0.2,0.8, 0.3 +noise_term + snow_thickness_factor +0.0001*(relPos.z +eye_alt -snowlevel) ); - - } - - if (tquality_level > 2) - { - mix_texel = texture2D(mix_texture, gl_TexCoord[0].st * 1.3); - if (mix_texel.a <0.1) {mix_flag = 0;} - } - - - if (tquality_level > 3) - { - stprime = vec2 (0.86*gl_TexCoord[0].s + 0.5*gl_TexCoord[0].t, 0.5*gl_TexCoord[0].s - 0.86*gl_TexCoord[0].t); - //distortion_factor = 0.9375 + (1.0 * nvL[2]); - distortion_factor = 0.97 + 0.06 * noise_500m; - stprime = stprime * distortion_factor * 15.0; - if (quality_level > 4) - { - stprime = stprime + normalize(relPos).xy * 0.02 * (noise_10m + 0.5 * noise_5m - 0.75); - } - detail_texel = texture2D(detail_texture, stprime); - if (detail_texel.a <0.1) {flag = 0;} - } - - -// texture preparation according to detail level - -// mix in hires texture patches - -float dist_fact; -float nSum; -float mix_factor; - -if (tquality_level > 2) - { - // first the second texture overlay - // transition model 0: random patch overlay without any gradient information - // transition model 1: only gradient-driven transitions, no randomness - - - if (mix_flag == 1) - { - nSum = 0.18 * (2.0 * noise_2000m + 2.0 * noise_1500m + noise_500m); - nSum = mix(nSum, 0.5, max(0.0, 2.0 * (transition_model - 0.5))); - nSum = nSum + 0.4 * (1.0 -smoothstep(0.9,0.95, abs(steepness)+ 0.05 * (noise_50m - 0.5))) * min(1.0, 2.0 * transition_model); - mix_factor = smoothstep(0.5, 0.54, nSum); - texel = mix(texel, mix_texel, mix_factor); - local_autumn_factor = texel.a; - } - - // then the detail texture overlay - } - -if (tquality_level > 3) - { - if (dist < 40000.0) - { - if (flag == 1) - { - //noise_50m = Noise2D(rawPos.xy, 50.0); - //noise_250m = Noise2D(rawPos.xy, 250.0); - dist_fact = 0.1 * smoothstep(15000.0,40000.0, dist) - 0.03 * (1.0 - smoothstep(500.0,5000.0, dist)); - nSum = ((1.0 -noise_2000m) + noise_1500m + 2.0 * noise_250m +noise_50m)/5.0; - nSum = nSum - 0.08 * (1.0 -smoothstep(0.9,0.95, abs(steepness))); - mix_factor = smoothstep(0.47, 0.54, nSum +hires_overlay_bias - dist_fact); - if (mix_factor > 0.8) {mix_factor = 0.8;} - texel = mix(texel, detail_texel,mix_factor); - local_autumn_factor = texel.a; - } - } - } - - - -// autumn colors - -float autumn_factor = season * 2.0 * (1.0 - local_autumn_factor) ; - - -texel.r = min(1.0, (1.0 + 2.5 * autumn_factor) * texel.r); -texel.g = texel.g; -texel.b = max(0.0, (1.0 - 4.0 * autumn_factor) * texel.b); - - -if (local_autumn_factor < 1.0) - { - intensity = length(texel.rgb) * (1.0 - 0.5 * smoothstep(1.1,2.0,season)); - texel.rgb = intensity * normalize(mix(texel.rgb, vec3(0.23,0.17,0.08), smoothstep(1.1,2.0, season))); - } - - - -const vec4 dust_color = vec4 (0.76, 0.71, 0.56, 1.0); -const vec4 lichen_color = vec4 (0.17, 0.20, 0.06, 1.0);; -//float snow_alpha; - -if (quality_level > 3) - { - - // mix vegetation - texel = mix(texel, lichen_color, 0.4 * lichen_cover_factor + 0.8 * lichen_cover_factor * 0.5 * (noise_10m + (1.0 - noise_5m)) ); - // mix dust - texel = mix(texel, 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) ); - - // mix snow - if (relPos.z + eye_alt +500.0 > snowlevel) - { - snow_alpha = smoothstep(0.75, 0.85, abs(steepness)); - //texel = mix(texel, snow_texel, texel_snow_fraction); - texel = mix(texel, snow_texel, snow_texel.a* smoothstep(snowlevel, snowlevel+200.0, snow_alpha * (relPos.z + eye_alt)+ (noise_2000m + 0.1 * noise_10m -0.55) *400.0)); - } - } - - - -// get distribution of water when terrain is wet - -float water_threshold1; -float water_threshold2; -float water_factor =0.0; - - -if ((dist < 5000.0)&& (quality_level > 3) && (wetness>0.0)) - { - water_threshold1 = 1.0-0.5* wetness; - water_threshold2 = 1.0 - 0.3 * wetness; - water_factor = smoothstep(water_threshold1, water_threshold2 , (0.3 * (2.0 * (1.0-noise_10m) + (1.0 -noise_5m)) * (1.0 - smoothstep(2000.0, 5000.0, dist))) - 5.0 * (1.0 -steepness)); - } - -// darken wet terrain - - texel.rgb = texel.rgb * (1.0 - 0.6 * wetness); - - -// light computations - - - vec4 light_specular = gl_LightSource[0].specular; - - // 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 = normal;//vec3 (nvec.x, nvec.y, sqrt(1.0 -pow(nvec.x,2.0) - pow(nvec.y,2.0) )); - n = normalize(n); - - NdotL = dot(n, lightDir); - if ((tquality_level > 3) && (mix_flag ==1)&& (dist < 2000.0) && (quality_level > 4)) - { - noisegrad_10m = (noise_10m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),10.0))/0.05; - noisegrad_5m = (noise_5m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),5.0))/0.05; - NdotL = NdotL + 1.0 * (noisegrad_10m + 0.5* noisegrad_5m) * mix_factor/0.8 * (1.0 - smoothstep(1000.0, 2000.0, dist)); - } - if (NdotL > 0.0) { - float shadowmap = getShadowing(); - color += diffuse_term * NdotL * shadowmap; - NdotHV = max(dot(n, halfVector), 0.0); - if (gl_FrontMaterial.shininess > 0.0) - specular.rgb = ((gl_FrontMaterial.specular.rgb * 0.1 + (water_factor * vec3 (1.0, 1.0, 1.0))) - * light_specular.rgb - * pow(NdotHV, gl_FrontMaterial.shininess + (20.0 * water_factor)) - * shadowmap); - } - color.a = 1.0;//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); - - - - - fragColor = color * texel + specular; - -// here comes the terrain haze model - - -float delta_z = hazeLayerAltitude - eye_alt; - -if (dist > 0.04 * min(visibility,avisibility)) -//if ((gl_FragCoord.y > ylimit) || (gl_FragCoord.x < zlimit1) || (gl_FragCoord.x > zlimit2)) -//if (dist > 40.0) -{ - -alt = eye_alt; - - -float transmission; -float vAltitude; -float delta_zv; -float H; -float distance_in_layer; -float transmission_arg; - - - - -// 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,min(visibility, avisibility)) * 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 (quality_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 (quality_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; - - -float lightArg = (terminator-yprime_alt)/100000.0; -vec3 hazeColor = get_hazeColor(lightArg); - - - - -// 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 -{ - - - // 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(n,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); - - } - - - - -fragColor.rgb = mix(clamp(hazeColor,0.0,1.0) , clamp(fragColor.rgb,0.0,1.0),transmission); - -} - -fragColor.rgb = filter_combined(fragColor.rgb); - -gl_FragColor = fragColor; -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; - -} - diff --git a/Compositor/Shaders/ALS/terrain-detailed.vert b/Compositor/Shaders/ALS/terrain-detailed.vert deleted file mode 100644 index 0162fedf8..000000000 --- a/Compositor/Shaders/ALS/terrain-detailed.vert +++ /dev/null @@ -1,311 +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 vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; -varying vec2 rawPos; -varying vec3 worldPos; - - -varying float mie_angle; -varying float steepness; - -varying float flogz; - - -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; - -float earthShade; -float yprime_alt; -//float mie_angle; - - -// 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; - -vec3 moonlight_perception (in vec3 light); -void setupShadows(vec4 eyeSpacePos); - -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_diffuse; - vec4 light_ambient; - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight; - moonLightColor = moonlight_perception (moonLightColor); - - //float yprime_alt; - float yprime; - float lightArg; - float intensity; - float vertex_alt; - float scattering; - - rawPos = gl_Vertex.xy; - vec4 eyePos = gl_ModelViewMatrix * gl_Vertex; - worldPos = (osg_ViewMatrixInverse * eyePos).xyz; - steepness = dot(normalize(gl_Normal), vec3 (0.0, 0.0, 1.0)); - - -// this code is copied from default.vert - - //vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex; - gl_Position = ftransform(); - // logarithmic depth - flogz = 1.0 + gl_Position.w; - gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; - normal = gl_NormalMatrix * gl_Normal; - //nvec = (gl_NormalMatrix * gl_Normal).xy; - 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; - - //ecViewdir = (gl_ModelViewMatrix * (ep - gl_Vertex)).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; -//if (((dist * (relPos.z - delta_z)/relPos.z > visibility ) && (relPos.z < 0.0) && (delta_z < 0.0) && (dist > 30000.0))) -if (0==1) - { - gl_Position = vec4(0.0, 0.0, -1000.0, 1.0); // move outside of view frustrum, gets culled before reaching fragment shader - earthShade = 1.0; - mie_angle = 1.0; - yprime_alt = 0.0; - } -else - { - - - // 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.a = 1.0; - light_diffuse = light_diffuse * scattering; - - //light_ambient.b = light_func(lightArg, 0.000506, 0.131, -3.315, 0.000457, 0.5); - //light_ambient.g = light_func(lightArg, 2.264e-05, 0.134, 0.967, 3.66e-05, 0.4); - 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_func(lightArg, 0.236, 0.253, 1.073, 0.572, 0.4); - light_ambient.b = light_ambient.r * 0.5/0.33; //light_func(lightArg, 0.236, 0.253, 1.073, 0.572, 0.5); - light_ambient.a = 1.0; - - - - -// correct ambient light intensity and hue before sunrise -if (earthShade < 0.5) - { - intensity = length(light_ambient.rgb); - light_ambient.rgb = intensity * normalize(mix(light_ambient.rgb, 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.rgb); - light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, 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 = vec4 (1.0, 1.0, 1.0, 1.0); - light_ambient = vec4 (0.33, 0.4, 0.5, 1.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_diffuse.a = 1.0; - - //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_ambient.g = light_ambient.r * 0.4/0.33; - light_ambient.b = light_ambient.r * 0.5/0.33; - light_ambient.a = 1.0; - } - - 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 - - diffuse_term = diffuse_color* light_diffuse; - vec4 constant_term = gl_FrontMaterial.emission + ambient_color * - (gl_LightModel.ambient + light_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; - diffuse_term.a = yprime_alt; - // 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; - gl_FrontColor.a = mie_angle; - gl_BackColor.a = mie_angle; -} - -setupShadows(eyePos); -} - - diff --git a/Compositor/Shaders/ALS/terrain-overlay.frag b/Compositor/Shaders/ALS/terrain-overlay.frag deleted file mode 100644 index ce546cd0c..000000000 --- a/Compositor/Shaders/ALS/terrain-overlay.frag +++ /dev/null @@ -1,176 +0,0 @@ -// -*-C++-*- -#version 120 - -#define MAX_DISTANCE 3000.0 - -uniform float fg_Fcoef; - -uniform float visibility; -uniform float avisibility; -uniform float scattering; -uniform float overlay_bias; -uniform float season; -uniform float dust_cover_factor; -uniform float overlay_max_height; -uniform float overlay_hardness; -uniform float overlay_density; -uniform float overlay_scale; -uniform float overlay_steepness_factor; -uniform float overlay_brightness_bottom; -uniform float overlay_brightness_top; -uniform float overlay_secondary_hardness; -uniform float overlay_secondary_density; -uniform float snowlevel; -uniform float wetness; -uniform float snow_thickness_factor; - -uniform int overlay_autumn_flag; -uniform int overlay_secondary_flag; -uniform int cloud_shadow_flag; - -uniform sampler2D overlayPrimaryTex; -uniform sampler2D overlaySecondaryTex; - - -uniform float osg_SimulationTime; - -varying vec2 g_rawpos; // Horizontal position in model space -varying float g_distance_to_eye; // Distance to the camera. Layers were disregarded -varying vec3 g_normal; -varying float g_altitude; -varying float g_layer; // The layer where the fragment lives (0-1 range) - -varying float flogz; - - -float rand2D(in vec2 co); -float Noise2D(in vec2 co, in float wavelength); -vec3 filter_combined (in vec3 color) ; - -float shadow_func_nearest (in float x, in float y, in float noise, in float dist); - - -void main() -{ - - if (g_distance_to_eye > MAX_DISTANCE) {discard;} - - vec2 texCoord = gl_TexCoord[0].st; - - vec2 pos_rotated = vec2 (0.707 * g_rawpos.x + 0.707 * g_rawpos.y, 0.707 * g_rawpos.x - 0.707 * g_rawpos.y); - - - //float noise_1m = 0.5 * Noise2D(pos_rotated.xy, 1.0 * overlay_scale); - //noise_1m += 0.5 * Noise2D(g_rawpos.xy, 1.1 * overlay_scale); - - float noise_1m = Noise2D(pos_rotated.xy, 1.0 * overlay_scale); - - float noise_2m = Noise2D(g_rawpos.xy, 2.0 * overlay_scale); ; - float noise_10m = Noise2D(g_rawpos.xy, 10.0 * overlay_scale); - - - - float value = 0.0; - - float d_fade =smoothstep(100.0, MAX_DISTANCE, g_distance_to_eye); - - float steepness = dot (normalize(g_normal), vec3 (0.0, 0.0, 1.0)); - float steepness_bias = smoothstep(overlay_steepness_factor, overlay_steepness_factor + 0.1, steepness); - - float overlayPattern = 0.2 * noise_10m + 0.3 * noise_2m + 0.5 * noise_1m - 0.2 * g_layer - 0.1 + 0.2 * overlay_density ; - overlayPattern *= steepness_bias; - - float secondaryPattern = 0.2 * (1.0-noise_10m) + 0.3 * (1.0-noise_2m) + 0.5 * (1.0-noise_1m) - 0.4 * g_layer - 0.2 + 0.2 * overlay_secondary_density ; - secondaryPattern *= overlay_secondary_flag; - float secondaryMix = 0.0; - - if (overlayPattern > 0.5) - { - value = smoothstep(0.5, (0.8 - 0.25 * overlay_hardness), overlayPattern); - } - else if (secondaryPattern > 0.5) - { - value = smoothstep(0.5, (0.8 - 0.25 * overlay_secondary_hardness), secondaryPattern); - secondaryMix = 1.0; - } - else {discard;} - - vec3 texel = texture2D(overlayPrimaryTex, texCoord * 20.0).rgb; - vec3 secondary_texel = texture2D(overlaySecondaryTex, texCoord * 20.0).rgb; - - // autumn coloring - - if (overlay_autumn_flag == 1) - { - texel.r = min(1.0, (1.0 + 2.5 * 0.1 * season) * texel.r); - texel.g = texel.g; - texel.b = max(0.0, (1.0 - 4.0 * 0.1 * season) * texel.b); - float intensity = length(texel.rgb) * (1.0 - 0.5 * smoothstep(1.1,2.0,season)); - texel.rgb = intensity * normalize(mix(texel.rgb, vec3(0.23,0.17,0.08), smoothstep(1.1,2.0, season))); - } - - texel = mix (texel, secondary_texel, secondaryMix); - - - float layer_arg = mix(g_layer, 1.0, smoothstep(250.0, 5000.0, g_distance_to_eye)); - texel.rgb *= (overlay_brightness_bottom + (overlay_brightness_top - overlay_brightness_bottom) * g_layer); - texel.rgb *= (1.0 - 0.5 * wetness); - - // dust overlay - - const vec3 dust_color = vec3 (0.76, 0.65, 0.45); - texel = mix (texel, dust_color, 0.7 * dust_cover_factor); - - // snow overlay - - //vec3 snow_texel = vec3 (0.95, 0.95, 0.95); - - float snow_factor = 0.2+0.8* smoothstep(0.2,0.8, 0.3 + 0.5 * snow_thickness_factor +0.0001*(g_altitude -snowlevel) ); - snow_factor *= smoothstep(0.5, 0.7, steepness); - - snow_factor *= smoothstep(g_layer - 0.1, g_layer , snow_factor + 0.2); - - //texel.rgb = mix(texel.rgb, snow_texel.rgb, snow_factor * smoothstep(snowlevel, snowlevel+200.0, g_altitude - 100.0)); - value *= (1.0 - snow_factor * smoothstep(snowlevel, snowlevel+200.0, g_altitude - 100.0)); - - // do a conservative simple fog model, fading to alpha - - float min_visibility = min(visibility, avisibility); - - float base_alpha = clamp(0.4 * overlay_max_height/0.3, 0.4, 1.0); - value*= base_alpha * (1.0 - d_fade); - - float targ = 8.0 * g_distance_to_eye/min_visibility; - value *= exp(-targ - targ * targ * targ * targ); - value= clamp(value, 0.0, 1.0); - - // cloud shadows - - float cloud_shade = 1.0; - - if (cloud_shadow_flag == 1) - { - vec2 eyePos = (gl_ModelViewMatrixInverse * vec4 (0.0, 0.0, 0.0, 1.0)).xy; - vec2 relPos = g_rawpos - eyePos; - - - cloud_shade = shadow_func_nearest(relPos.x, relPos.y, 1.0, g_distance_to_eye); - } - - // lighting is very simple, the ground underneath should do most of it - - vec3 N = normalize (gl_NormalMatrix * g_normal); - float NdotL = 0.5 + 1.0 * clamp(dot (N, gl_LightSource[0].position.xyz), 0.0, 1.0) * cloud_shade; - - texel *= length(gl_LightSource[0].diffuse.rgb)/1.73 * scattering * NdotL; - texel = clamp(texel, 0.0, 1.0); - - - vec4 fragColor = vec4 (texel, value); - fragColor.rgb = filter_combined(fragColor.rgb); - fragColor = clamp(fragColor, 0.0, 1.0); - - gl_FragColor = fragColor; - // logarithmic depth - gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; -} diff --git a/Compositor/Shaders/ALS/terrain-overlay.geom b/Compositor/Shaders/ALS/terrain-overlay.geom deleted file mode 100644 index 0e12357b4..000000000 --- a/Compositor/Shaders/ALS/terrain-overlay.geom +++ /dev/null @@ -1,64 +0,0 @@ -// -*-C++-*- -#version 120 -#extension GL_EXT_geometry_shader4 : enable - -#define MAX_LAYERS 8 -#define MIN_LAYERS 2 -#define MAX_MINUS_MIN_LAYERS 6 - -uniform float overlay_max_height; - -varying in vec3 v_normal[3]; - -varying out vec2 g_rawpos; -varying out float g_distance_to_eye; -varying out vec3 g_normal; -varying out float g_altitude; -varying out float g_layer; - -varying out float flogz; - - - -float min3(in float a, in float b, in float c) -{ - float m = a; - if (m > b) m = b; - if (m > c) m = c; - return m; -} - -void main() -{ - float distances[3]; - distances[0] = -(gl_ModelViewMatrix * gl_PositionIn[0]).z; - distances[1] = -(gl_ModelViewMatrix * gl_PositionIn[1]).z; - distances[2] = -(gl_ModelViewMatrix * gl_PositionIn[2]).z; - float minDistance = min3(distances[0], distances[1], distances[2]); - //float avgDistance = (distances[0]+distances[1]+distances[2])*0.33; - - int numLayers = MIN_LAYERS + int((1.0 - smoothstep(250.0, 5000.0, minDistance)) * float(MAX_MINUS_MIN_LAYERS)); - - float deltaLayer = 1.0 / float(numLayers); - float currDeltaLayer = 1.5 * deltaLayer;// * 0.5; - - for (int layer = 0; layer < numLayers; ++layer) { - for (int i = 0; i < 3; ++i) { - vec4 pos = gl_PositionIn[i] + vec4(v_normal[i] * currDeltaLayer * overlay_max_height, 0.0); - g_rawpos = gl_PositionIn[i].xy; - g_distance_to_eye = distances[i]; - g_layer = currDeltaLayer; - g_normal = v_normal[i]; - g_altitude = gl_PositionIn[i].z; - - gl_Position = gl_ModelViewProjectionMatrix * pos; - // logarithmic depth - flogz = 1.0 + gl_Position.w; - gl_TexCoord[0] = gl_TexCoordIn[i][0]; - EmitVertex(); - } - EndPrimitive(); - - currDeltaLayer += deltaLayer; - } -} diff --git a/Compositor/Shaders/ALS/terrain-ultra.frag b/Compositor/Shaders/ALS/terrain-ultra.frag deleted file mode 100644 index b206f27fc..000000000 --- a/Compositor/Shaders/ALS/terrain-ultra.frag +++ /dev/null @@ -1,672 +0,0 @@ -// -*-C++-*- -#version 120 - -// written by Thorsten Renk, Oct 2011, based on default.frag -// Ambient term comes in gl_Color.rgb. -varying vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; -varying vec2 rawPos; -varying vec3 worldPos; -varying vec3 ecViewdir; -varying vec2 grad_dir; - - -uniform float fg_Fcoef; - -uniform sampler2D texture; -uniform sampler2D detail_texture; -uniform sampler2D mix_texture; -uniform sampler2D grain_texture; -uniform sampler2D dot_texture; -uniform sampler2D gradient_texture; - - -varying float steepness; - -varying float flogz; - -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 snowlevel; -uniform float dust_cover_factor; -uniform float lichen_cover_factor; -uniform float wetness; -uniform float fogstructure; -uniform float snow_thickness_factor; -uniform float cloud_self_shading; -uniform float season; -uniform float air_pollution; -uniform float grain_strength; -uniform float intrinsic_wetness; -uniform float transition_model; -uniform float hires_overlay_bias; -uniform float dot_density; -uniform float dot_size; -uniform float dust_resistance; -uniform float WindE; -uniform float WindN; -uniform float landing_light1_offset; -uniform float landing_light2_offset; -uniform float landing_light3_offset; -uniform float osg_SimulationTime; - -uniform int wind_effects; -uniform int cloud_shadow_flag; -uniform int rock_strata; -uniform int use_searchlight; -uniform int use_landing_light; -uniform int use_alt_landing_light; - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - -//float alt; -float eShade; -float yprime_alt; -float mie_angle; - -float shadow_func (in float x, in float y, in float noise, in float dist); -float DotNoise2D(in vec2 coord, in float wavelength, in float fractionalMaxDotSize, in float dot_density); -float Noise2D(in vec2 coord, in float wavelength); -float Noise3D(in vec3 coord, in float wavelength); -float SlopeLines2D(in vec2 coord, in vec2 gradDir, in float wavelength, in float steepness); -float Strata3D(in vec3 coord, in float wavelength, in float variation); -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(); - - -// a fade function for procedural scales which are smaller than a pixel - -float detail_fade (in float scale, in float angle, in float dist) -{ -float fade_dist = 2000.0 * scale * angle/max(pow(steepness,4.0), 0.1); - -return 1.0 - smoothstep(0.5 * fade_dist, fade_dist, dist); -} - - - -void main() -{ - -float alt; - -yprime_alt = diffuse_term.a; -//diffuse_term.a = 1.0; -mie_angle = gl_Color.a; -float effective_scattering = min(scattering, cloud_self_shading); - -// distance to fragment -float dist = length(relPos); -// angle of view vector with horizon -float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist; -// float altitude of fragment above sea level -float msl_altitude = (relPos.z + eye_alt); - - -// vec3 shadedFogColor = vec3(0.65, 0.67, 0.78); - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); -// this is taken from default.frag - vec3 n; - float NdotL, NdotHV, fogFactor; - vec4 color = gl_Color; - color.a = 1.0; - vec3 lightDir = gl_LightSource[0].position.xyz; - vec3 halfVector = normalize(normalize(lightDir) + normalize(ecViewdir)); - vec4 texel; - vec4 snow_texel; - vec4 detail_texel; - vec4 mix_texel; - vec4 grain_texel; - vec4 dot_texel; - vec4 gradient_texel; - vec4 foam_texel; - vec4 fragColor; - vec4 specular = vec4(0.0); - float intensity; - - - -// Wind motion of the overlay noise simulating movement of vegetation and loose debris - -vec2 windPos; - -if (wind_effects > 1) - { - float windSpeed = length(vec2 (WindE,WindN)) /3.0480; - // interfering sine wave wind pattern - float sineTerm = sin(0.35 * windSpeed * osg_SimulationTime + 0.05 * (rawPos.x + rawPos.y)); - sineTerm = sineTerm + sin(0.3 * windSpeed * osg_SimulationTime + 0.04 * (rawPos.x + rawPos.y)); - sineTerm = sineTerm + sin(0.22 * windSpeed * osg_SimulationTime + 0.05 * (rawPos.x + rawPos.y)); - sineTerm = sineTerm/3.0; - // non-linear amplification to simulate gusts - sineTerm = sineTerm * sineTerm;//smoothstep(0.2, 1.0, sineTerm); - - // wind starts moving dust and leaves at around 8 m/s - float timeArg = 0.01 * osg_SimulationTime * windSpeed * smoothstep(8.0, 15.0, windSpeed); - timeArg = timeArg + 0.02 * sineTerm; - - windPos = vec2 (rawPos.x + WindN * timeArg, rawPos.y + WindE * timeArg); - } -else - { - windPos = rawPos.xy; - } - - -// get noise at different wavelengths - -// used: 5m, 5m gradient, 10m, 10m gradient: heightmap of the closeup terrain, 10m also snow -// 50m: detail texel -// 250m: detail texel -// 500m: distortion and overlay -// 1500m: overlay, detail, dust, fog -// 2000m: overlay, detail, snow, fog - -// Perlin noise - -float noise_10m = Noise2D(rawPos.xy, 10.0); -float noise_5m = Noise2D(rawPos.xy ,5.0); -float noise_2m = Noise2D(rawPos.xy ,2.0); -float noise_1m = Noise2D(rawPos.xy ,1.0); -float noise_01m = Noise2D(windPos.xy, 0.1); - -float noisegrad_10m; -float noisegrad_5m; -float noisegrad_2m; -float noisegrad_1m; - - - -float noise_25m = Noise2D(rawPos.xy, 25.0); -float noise_50m = Noise2D(rawPos.xy, 50.0); - - -float noise_250m = Noise3D(worldPos.xyz,250.0); -float noise_500m = Noise3D(worldPos.xyz, 500.0); -float noise_1500m = Noise3D(worldPos.xyz, 1500.0); -float noise_2000m = Noise3D(worldPos.xyz, 2000.0); - -// dot noise - -float dotnoise_2m = DotNoise2D(rawPos.xy, 2.0 * dot_size,0.5, dot_density); -float dotnoise_10m = DotNoise2D(rawPos.xy, 10.0 * dot_size, 0.5, dot_density); -float dotnoise_15m = DotNoise2D(rawPos.xy, 15.0 * dot_size, 0.33, dot_density); - -float dotnoisegrad_10m; - - -// slope noise - -float slopenoise_50m = SlopeLines2D(rawPos, grad_dir, 50.0, steepness); -float slopenoise_100m = SlopeLines2D(rawPos, grad_dir, 100.0, steepness); - -float snownoise_25m = mix(noise_25m, slopenoise_50m, clamp(3.0*(1.0-steepness),0.0,1.0)); -float snownoise_50m = mix(noise_50m, slopenoise_100m, clamp(3.0*(1.0-steepness),0.0,1.0)); - -// get the texels - - - - float distortion_factor = 1.0; - vec2 stprime; - int flag = 1; - int mix_flag = 1; - float noise_term; - float snow_alpha; - - texel = texture2D(texture, gl_TexCoord[0].st); - float local_autumn_factor = texel.a; - grain_texel = texture2D(grain_texture, gl_TexCoord[0].st * 25.0); - gradient_texel = texture2D(gradient_texture, gl_TexCoord[0].st * 4.0); - - stprime = gl_TexCoord[0].st * 80.0; - stprime = stprime + normalize(relPos).xy * 0.01 * (dotnoise_10m + dotnoise_15m); - dot_texel = texture2D(dot_texture, vec2 (stprime.y, stprime.x) ); - - // we need to fade procedural structures when they get smaller than a single pixel, for this we need - // to know under what angle we see the surface - - float view_angle = abs(dot(normalize(normal), normalize(ecViewdir))); - float sfactor = sqrt(2.0 * (1.0-steepness)/0.03) + abs(ct)/0.15; - - // the snow texel is generated procedurally - if (msl_altitude +500.0 > snowlevel) - { - snow_texel = vec4 (0.95, 0.95, 0.95, 1.0) * (0.9 + 0.1* noise_500m + 0.1* (1.0 - noise_10m) ); - snow_texel.r = snow_texel.r * (0.9 + 0.05 * (noise_10m + noise_5m)); - snow_texel.g = snow_texel.g * (0.9 + 0.05 * (noise_10m + noise_5m)); - snow_texel.a = 1.0; - noise_term = 0.1 * (noise_500m-0.5) ; - noise_term = noise_term + 0.2 * (snownoise_50m -0.5) * detail_fade(50.0, view_angle, 0.5*dist) ; - noise_term = noise_term + 0.2 * (snownoise_25m -0.5) * detail_fade(25.0, view_angle, 0.5*dist) ; - noise_term = noise_term + 0.3 * (noise_10m -0.5) * detail_fade(10.0, view_angle, 0.8*dist) ; - noise_term = noise_term + 0.3 * (noise_5m - 0.5) * detail_fade(5.0, view_angle, dist); - noise_term = noise_term + 0.15 * (noise_2m -0.5) * detail_fade(2.0, view_angle, dist); - noise_term = noise_term + 0.08 * (noise_1m -0.5) * detail_fade(1.0, view_angle, dist); - snow_texel.a = snow_texel.a * 0.2+0.8* smoothstep(0.2,0.8, 0.3 +noise_term + snow_thickness_factor +0.0001*(msl_altitude -snowlevel) ); - } - - // the mixture/gradient texture - mix_texel = texture2D(mix_texture, gl_TexCoord[0].st * 1.3); - if (mix_texel.a <0.1) {mix_flag = 0;} - - // the hires overlay texture is loaded with parallax mapping - - stprime = vec2 (0.86*gl_TexCoord[0].s + 0.5*gl_TexCoord[0].t, 0.5*gl_TexCoord[0].s - 0.86*gl_TexCoord[0].t); - distortion_factor = 0.97 + 0.06 * noise_500m; - stprime = stprime * distortion_factor * 15.0; - stprime = stprime + normalize(relPos).xy * 0.022 * (noise_10m + 0.5 * noise_5m +0.25 * noise_2m - 0.875 ); - - detail_texel = texture2D(detail_texture, stprime); - if (detail_texel.a <0.1) {flag = 0;} - - - -// texture preparation according to detail level - -// mix in hires texture patches - -float dist_fact; -float nSum; -float mix_factor; - - // first the second texture overlay - // transition model 0: random patch overlay without any gradient information - // transition model 1: only gradient-driven transitions, no randomness - - - if (mix_flag == 1) - { - nSum = 0.18 * (2.0 * noise_2000m + 2.0 * noise_1500m + noise_500m); - nSum = mix(nSum, 0.5, max(0.0, 2.0 * (transition_model - 0.5))); - nSum = nSum + 0.4 * (1.0 -smoothstep(0.9,0.95, abs(steepness)+ 0.05 * (noise_50m - 0.5))) * min(1.0, 2.0 * transition_model); - mix_factor = smoothstep(0.5, 0.54, nSum); - texel = mix(texel, mix_texel, mix_factor); - local_autumn_factor = texel.a; - } - - // then the detail texture overlay - - mix_factor = 0.0; - if (dist < 40000.0) - { - if (flag == 1) - { - dist_fact = 0.1 * smoothstep(15000.0,40000.0, dist) - 0.03 * (1.0 - smoothstep(500.0,5000.0, dist)); - nSum = ((1.0 -noise_2000m) + noise_1500m + 2.0 * noise_250m +noise_50m)/5.0; - nSum = nSum - 0.08 * (1.0 -smoothstep(0.9,0.95, abs(steepness))); - mix_factor = smoothstep(0.47, 0.54, nSum +hires_overlay_bias- dist_fact); - if (mix_factor > 0.8) {mix_factor = 0.8;} - texel = mix(texel, detail_texel,mix_factor); - } - } - - // rock for very steep gradients - - if (gradient_texel.a > 0.0) - { - texel = mix(texel, gradient_texel, 1.0 - smoothstep(0.75,0.8,abs(steepness)+ 0.00002* msl_altitude + 0.05 * (noise_50m - 0.5))); - local_autumn_factor = texel.a; - } - - - // strata noise - - float stratnoise_50m; - float stratnoise_10m; - - if (rock_strata==1) - { - stratnoise_50m = Strata3D(vec3 (rawPos.x, rawPos.y, msl_altitude), 50.0, 0.2); - stratnoise_10m = Strata3D(vec3 (rawPos.x, rawPos.y, msl_altitude), 10.0, 0.2); - stratnoise_50m = mix(stratnoise_50m, 1.0, smoothstep(0.8,0.9, steepness)); - stratnoise_10m = mix(stratnoise_10m, 1.0, smoothstep(0.8,0.9, steepness)); - texel *= (0.4 + 0.4 * stratnoise_50m + 0.2 * stratnoise_10m); - } - - // the dot vegetation texture overlay - - texel.rgb = mix(texel.rgb, dot_texel.rgb, dot_texel.a * (dotnoise_10m + dotnoise_15m) * detail_fade(1.0 * (dot_size * (1.0 +0.1*dot_size)), view_angle,dist)); - texel.rgb = mix(texel.rgb, dot_texel.rgb, dot_texel.a * dotnoise_2m * detail_fade(0.1 * dot_size, view_angle,dist)); - - - // then the grain texture overlay - - texel.rgb = mix(texel.rgb, grain_texel.rgb, grain_strength * grain_texel.a * (1.0 - mix_factor) * (1.0-smoothstep(2000.0,5000.0, dist))); - - // for really hires, add procedural noise overlay - texel.rgb = texel.rgb * (1.0 + 0.4 * (noise_01m-0.5) * detail_fade(0.1, view_angle, dist)) ; - -// autumn colors - -float autumn_factor = season * 2.0 * (1.0 - local_autumn_factor) ; - - -texel.r = min(1.0, (1.0 + 2.5 * autumn_factor) * texel.r); -texel.g = texel.g; -texel.b = max(0.0, (1.0 - 4.0 * autumn_factor) * texel.b); - - -if (local_autumn_factor < 1.0) - { - intensity = length(texel.rgb) * (1.0 - 0.5 * smoothstep(1.1,2.0,season)); - texel.rgb = intensity * normalize(mix(texel.rgb, vec3(0.23,0.17,0.08), smoothstep(1.1,2.0, season))); - } - - // slope line overlay - texel.rgb = texel.rgb * (1.0 - 0.12 * slopenoise_50m - 0.08 * slopenoise_100m); - -//const vec4 dust_color = vec4 (0.76, 0.71, 0.56, 1.0); -const vec4 dust_color = vec4 (0.76, 0.65, 0.45, 1.0); -const vec4 lichen_color = vec4 (0.17, 0.20, 0.06, 1.0); - -// mix vegetation -float gradient_factor = smoothstep(0.5, 1.0, steepness); -texel = mix(texel, lichen_color, gradient_factor * (0.4 * lichen_cover_factor + 0.8 * lichen_cover_factor * 0.5 * (noise_10m + (1.0 - noise_5m))) ); -// mix dust -texel = mix(texel, dust_color, clamp(0.5 * dust_cover_factor *dust_resistance + 3.0 * dust_cover_factor * dust_resistance *(((noise_1500m - 0.5) * 0.125)+0.125 ),0.0, 1.0) ); -// mix snow -float snow_mix_factor = 0.0; -if (msl_altitude +500.0 > snowlevel) - { - snow_alpha = smoothstep(0.75, 0.85, abs(steepness)); - snow_mix_factor = snow_texel.a* smoothstep(snowlevel, snowlevel+200.0, snow_alpha * msl_altitude+ (noise_2000m + 0.1 * noise_10m -0.55) *400.0); - texel = mix(texel, snow_texel, snow_mix_factor); - } - - - - -// get distribution of water when terrain is wet - -float combined_wetness = min(1.0, wetness + intrinsic_wetness); -float water_threshold1; -float water_threshold2; -float water_factor =0.0; - - -if ((dist < 5000.0) && (combined_wetness>0.0)) - { - water_threshold1 = 1.0-0.5* combined_wetness; - water_threshold2 = 1.0 - 0.3 * combined_wetness; - water_factor = smoothstep(water_threshold1, water_threshold2 , (0.3 * (2.0 * (1.0-noise_10m) + (1.0 -noise_5m)) * (1.0 - smoothstep(2000.0, 5000.0, dist))) - 5.0 * (1.0 -steepness)); - } - -// darken wet terrain - - texel.rgb = texel.rgb * (1.0 - 0.6 * combined_wetness); - - - -// light computations - - - vec4 light_specular = gl_LightSource[0].specular; - - // 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 = normal;//vec3 (nvec.x, nvec.y, sqrt(1.0 -pow(nvec.x,2.0) - pow(nvec.y,2.0) )); - n = normalize(n); - - NdotL = dot(n, lightDir); - - noisegrad_10m = (noise_10m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),10.0))/0.05; - noisegrad_5m = (noise_5m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),5.0))/0.05; - noisegrad_2m = (noise_2m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),2.0))/0.05; - noisegrad_1m = (noise_1m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),1.0))/0.05; - - dotnoisegrad_10m = (dotnoise_10m - DotNoise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),10.0 * dot_size,0.5, dot_density))/0.05; - - - NdotL = NdotL + (noisegrad_10m * detail_fade(10.0, view_angle,dist) + 0.5* noisegrad_5m * detail_fade(5.0, view_angle,dist)) * mix_factor/0.8; - NdotL = NdotL + 0.15 * noisegrad_2m * mix_factor/0.8 * detail_fade(2.0,view_angle,dist); - NdotL = NdotL + 0.1 * noisegrad_2m * detail_fade(2.0,view_angle,dist); - NdotL = NdotL + 0.05 * noisegrad_1m * detail_fade(1.0, view_angle,dist); - NdotL = NdotL + (1.0-snow_mix_factor) * 0.3* dot_texel.a * (0.5* dotnoisegrad_10m * detail_fade(1.0 * dot_size, view_angle, dist) +0.5 * dotnoisegrad_10m * noise_01m * detail_fade(0.1, view_angle, dist)) ; - - if (NdotL > 0.0) { - float shadowmap = getShadowing(); - if (cloud_shadow_flag == 1) {NdotL = NdotL * shadow_func(relPos.x, relPos.y, 0.3 * noise_250m + 0.5 * noise_500m+0.2 * noise_1500m, dist);} - color += diffuse_term * NdotL * shadowmap; - NdotHV = max(dot(n, halfVector), 0.0); - if (gl_FrontMaterial.shininess > 0.0) - specular.rgb = ((gl_FrontMaterial.specular.rgb * 0.1 + (water_factor * vec3 (1.0, 1.0, 1.0))) - * light_specular.rgb - * pow(NdotHV, gl_FrontMaterial.shininess + (20.0 * water_factor)) - * shadowmap); - } - color.a = 1.0;//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); - - - 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); - } - color.rgb +=secondary_light * light_distance_fading(dist); - - - fragColor = color * texel + specular; - - float lightArg = (terminator-yprime_alt)/100000.0; - vec3 hazeColor = get_hazeColor(lightArg); - - - -// Rayleigh color shift due to out-scattering - 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); - fragColor.rgb = rayleigh_out_shift(fragColor.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(diffuse_term.rgb)/1.73 * rShade; - 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); - fragColor.rgb = mix(fragColor.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; - - - - -// 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; - } - } - -// blur of the haze layer edge - -float blur_thickness = 50.0; -float cphi = dot(vec3(0.0, 1.0, 0.0), relPos)/dist; -float ctlayer = delta_z/dist-0.01 + 0.02 * Noise2D(vec2(cphi,1.0),0.1) -0.01; -float ctblur = 0.035 ; - -float blur_dist; - -if (abs(delta_z) < 400.0) - { - blur_dist = dist * (1.0-smoothstep(0.0,300.0,-delta_z)) * smoothstep(-400.0,-200.0, -delta_z); - blur_dist = blur_dist * smoothstep(ctlayer-4.0*ctblur, ctlayer-ctblur, ct) * (1.0-smoothstep(ctlayer+0.5*ctblur, ctlayer+ctblur, ct)); - distance_in_layer = max(distance_in_layer, blur_dist); - } - - -// 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) - { - transmission_arg = transmission_arg + (distance_in_layer/(1.0 * visibility + 1.0 * visibility * fogstructure * 0.06 * (noise_1500m + noise_2000m -1.0) )); - eqColorFactor = 1.0 - 0.1 * delta_zv/visibility - (1.0 - effective_scattering); - } -else - { - transmission_arg = transmission_arg + (distance_in_layer/(1.0 * avisibility + 1.0 * avisibility * fogstructure * 0.06 * (noise_1500m + noise_2000m - 1.0) )); - 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 -{ - - - // 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(n,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.rgb *= eqColorFactor * eShade; -hazeColor.rgb = max(hazeColor.rgb, minLight.rgb); - -// finally, mix fog in - - -fragColor.rgb = mix(hazeColor+secondary_light * fog_backscatter(mvisibility) , fragColor.rgb,transmission); -} - -fragColor.rgb = filter_combined(fragColor.rgb); - -gl_FragColor = fragColor; -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; -} - diff --git a/Compositor/Shaders/ALS/terrain-ultra.vert b/Compositor/Shaders/ALS/terrain-ultra.vert deleted file mode 100644 index 3523a6e1e..000000000 --- a/Compositor/Shaders/ALS/terrain-ultra.vert +++ /dev/null @@ -1,303 +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 vec4 diffuse_term; -varying vec3 normal; -varying vec3 relPos; -varying vec2 rawPos; -varying vec3 worldPos; -varying vec3 ecViewdir; -varying vec2 grad_dir; - -varying float mie_angle; -varying float steepness; - -varying float flogz; - -uniform int colorMode; - -uniform bool raise_vertex; - -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; - -float earthShade; -float yprime_alt; - -void setupShadows(vec4 eyeSpacePos); - -vec3 moonlight_perception (in vec3 light); - -// 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_diffuse; - vec4 light_ambient; - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight + vec3 (0.005, 0.005, 0.005); - - moonLightColor = moonlight_perception (moonLightColor); - - - //float yprime_alt; - float yprime; - float lightArg; - float intensity; - float vertex_alt; - float scattering; - - rawPos = gl_Vertex.xy; - vec4 eyePos = gl_ModelViewMatrix * gl_Vertex; - worldPos = (osg_ViewMatrixInverse * eyePos).xyz; - - - steepness = dot(normalize(gl_Normal), vec3 (0.0, 0.0, 1.0)); - grad_dir = normalize(gl_Normal.xy); - - vec4 pos = gl_Vertex; - if (raise_vertex) - { - pos.z+=0.1; - gl_Position = gl_ModelViewProjectionMatrix * pos; - } - else gl_Position = ftransform(); - // logarithmic depth - flogz = 1.0 + gl_Position.w; - - -// this code is copied from default.vert - - //vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex; - //gl_Position = ftransform(); - gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; - normal = gl_NormalMatrix * gl_Normal; - //nvec = (gl_NormalMatrix * gl_Normal).xy; - 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; - - ecViewdir = (gl_ModelViewMatrix * (ep - gl_Vertex)).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); - - - // 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.a = 1.0; - light_diffuse = light_diffuse * scattering; - - //light_ambient.b = light_func(lightArg, 0.000506, 0.131, -3.315, 0.000457, 0.5); - //light_ambient.g = light_func(lightArg, 2.264e-05, 0.134, 0.967, 3.66e-05, 0.4); - 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_func(lightArg, 0.236, 0.253, 1.073, 0.572, 0.4); - light_ambient.b = light_ambient.r * 0.5/0.33; //light_func(lightArg, 0.236, 0.253, 1.073, 0.572, 0.5); - light_ambient.a = 1.0; - - - - -// correct ambient light intensity and hue before sunrise -if (earthShade < 0.5) - { - intensity = length(light_ambient.rgb); - light_ambient.rgb = intensity * normalize(mix(light_ambient.rgb, 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.rgb); - light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, 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 = vec4 (1.0, 1.0, 1.0, 1.0); - light_ambient = vec4 (0.33, 0.4, 0.5, 1.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_diffuse.a = 1.0; - - //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_ambient.g = light_ambient.r * 0.4/0.33; - light_ambient.b = light_ambient.r * 0.5/0.33; - light_ambient.a = 1.0; - } - - 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 - - diffuse_term = diffuse_color * light_diffuse; - vec4 constant_term = gl_FrontMaterial.emission + ambient_color * - (gl_LightModel.ambient + light_ambient); - - diffuse_term.a = yprime_alt; - gl_FrontColor.rgb = constant_term.rgb; //gl_FrontColor.a = 1.0; - gl_BackColor.rgb = constant_term.rgb; //gl_BackColor.a = 0.0; - gl_FrontColor.a = mie_angle; - gl_BackColor.a = mie_angle; - - setupShadows(eyePos); -} - - diff --git a/Compositor/Shaders/ALS/terrain-writedepth.frag b/Compositor/Shaders/ALS/terrain-writedepth.frag deleted file mode 100644 index 209a1afce..000000000 --- a/Compositor/Shaders/ALS/terrain-writedepth.frag +++ /dev/null @@ -1,12 +0,0 @@ -#version 120 - -uniform float fg_Fcoef; - -varying float flogz; - -void main() -{ - gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); - // logarithmic depth - gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; -} diff --git a/Compositor/Shaders/ALS/terrain-writedepth.vert b/Compositor/Shaders/ALS/terrain-writedepth.vert deleted file mode 100644 index d213937b4..000000000 --- a/Compositor/Shaders/ALS/terrain-writedepth.vert +++ /dev/null @@ -1,10 +0,0 @@ -#version 120 - -varying float flogz; - -void main() -{ - gl_Position = ftransform(); - // logarithmic depth - flogz = 1.0 + gl_Position.w; -} diff --git a/Compositor/Shaders/ALS/thrustflame.frag b/Compositor/Shaders/ALS/thrustflame.frag deleted file mode 100644 index f22d87817..000000000 --- a/Compositor/Shaders/ALS/thrustflame.frag +++ /dev/null @@ -1,148 +0,0 @@ -// -*-C++-*- - -#version 120 - -varying vec3 vertex; -varying vec3 viewDir; - -varying float flogz; - -uniform float fg_Fcoef; - -uniform float osg_SimulationTime; -uniform float thrust_collimation; -uniform float flame_radius_fraction; -uniform float thrust_density; -uniform float base_flame_density; -uniform float shock_frequency; -uniform float noise_strength; -uniform float noise_scale; -uniform float deflection_coeff; -uniform float random_seed; - -uniform float flame_color_low_r; -uniform float flame_color_low_g; -uniform float flame_color_low_b; - -uniform float flame_color_high_r; -uniform float flame_color_high_g; -uniform float flame_color_high_b; - -uniform float base_flame_r; -uniform float base_flame_g; -uniform float base_flame_b; - -uniform int use_shocks; -uniform int use_noise; - -float Noise2D(in vec2 coord, in float wavelength); - -const int n_steps = 15; - -float spherical_smoothstep (in vec3 pos) -{ - -float l = length(vec3 (pos.x/2.0, pos.y,pos.z) ); - -return 10.0 * thrust_density * base_flame_density * (1.0 - smoothstep(0.5* flame_radius_fraction, flame_radius_fraction, l)); - -} - - - -float thrust_flame (in vec3 pos) -{ - - -float noise = 0.0; - -pos.z +=8.0 * deflection_coeff; - -float d_rad = length(pos.yz - vec2 (0.0, deflection_coeff * pos.x * pos.x)); -//float longFade = smoothstep(0.0, 5.0, pos.x) ; -float longFade = pos.x/5.0; - -float density = 1.0 - longFade; -float radius = flame_radius_fraction + thrust_collimation * 1.0 * pow((pos.x+0.1),0.5); - -if (d_rad > radius) {return 0.0;} - - -if (use_noise ==1) - { - noise = Noise2D(vec2(pos.x - osg_SimulationTime * 30.0 + random_seed , d_rad), noise_scale); - } - -density *= (1.0 - smoothstep(0.125, radius, d_rad)) * (1.0 - noise_strength + noise_strength* noise); - -if (use_shocks == 1) - { - float shock = sin(pos.x * 10.0 * shock_frequency); - density += shock * shock * shock * shock * (1.0 - longFade) * (1.0 - smoothstep(0.25*flame_radius_fraction, 0.5*flame_radius_fraction, d_rad)) * (1.0 - smoothstep(0.0, 1.0, thrust_collimation)) * (1.0 + 0.5 * base_flame_density); - } - - -return 10.0 * thrust_density * density / (radius/0.2); -} - - - -void main() -{ - -vec3 vDir = normalize(viewDir); - -float x_E, y_E, z_E; - -if (vDir.x > 0.0) {x_E = 5.0;} else {x_E = 0.0;} -if (vDir.y > 0.0) {y_E = 1.0;} else {y_E = -1.0;} -if (vDir.z > 0.0) {z_E = 1.0;} else {z_E = -1.0;} - -float t_x = (x_E - vertex.x) / vDir.x; -float t_y = (y_E - vertex.y) / vDir.y; -float t_z = (z_E - vertex.z) / vDir.z; - -float t_min = min(t_x, t_y); -t_min = min(t_min, t_z); - - -float dt = t_min / float(n_steps); - -vec3 step = viewDir * dt; -vec3 pos = vertex; - -float density1 = 0.0; -float density2 = 0.0; - - - -for (int i = 0; i < n_steps; i++) - { - pos = pos + step; - density1 += spherical_smoothstep(pos) * dt; - density2 += thrust_flame(pos) * dt; - } - - - - -float density = density1 + density2; -//density = clamp(density,0.0,1.0); -density = 1.0 - exp(-density); - -density1 = 1.0 - exp(-density1); -density2 = 1.0 - exp(-density2); - - -vec3 flame_color_low = vec3 (flame_color_low_r, flame_color_low_g, flame_color_low_b); -vec3 flame_color_high = vec3 (flame_color_high_r, flame_color_high_g, flame_color_high_b); - -vec3 color = mix(flame_color_low, flame_color_high, density2); -color = mix(color, vec3(base_flame_r, base_flame_g, base_flame_b), density1); - -vec4 finalColor = vec4 (color.rgb, density); - -gl_FragColor = finalColor; -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; -} diff --git a/Compositor/Shaders/ALS/thrustflame.vert b/Compositor/Shaders/ALS/thrustflame.vert deleted file mode 100644 index d40a75b09..000000000 --- a/Compositor/Shaders/ALS/thrustflame.vert +++ /dev/null @@ -1,25 +0,0 @@ -// -*-C++-*- - -#version 120 - -varying vec3 vertex; -varying vec3 viewDir; - -varying float flogz; - -void main() -{ - -vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0); - -vertex = gl_Vertex.xyz; -viewDir = normalize(vertex - ep.xyz); - -gl_Position = ftransform(); -// logarithmic depth -flogz = 1.0 + gl_Position.w; -gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; - -gl_FrontColor = vec4 (1.0,1.0,1.0,1.0); -gl_BackColor = gl_FrontColor; -} diff --git a/Compositor/Shaders/ALS/tree-shadow.frag b/Compositor/Shaders/ALS/tree-shadow.frag deleted file mode 100644 index 2e5f418bd..000000000 --- a/Compositor/Shaders/ALS/tree-shadow.frag +++ /dev/null @@ -1,390 +0,0 @@ -// -*-C++-*- -#version 120 - -// written by Thorsten Renk, Oct 2011, based on default.frag - - -varying vec3 relPos; - - -uniform sampler2D texture; - - -varying float yprime_alt; - -varying float is_shadow; -varying float autumn_flag; - -uniform float visibility; -uniform float avisibility; -uniform float scattering; -uniform float ground_scattering; -uniform float cloud_self_shading; -uniform float terminator; -uniform float terrain_alt; -uniform float hazeLayerAltitude; -uniform float overcast; -uniform float eye_alt; -uniform float dust_cover_factor; -uniform float air_pollution; -uniform float landing_light1_offset; -uniform float landing_light2_offset; -uniform float landing_light3_offset; -uniform float cseason; - -uniform int use_searchlight; -uniform int use_landing_light; -uniform int use_alt_landing_light; -uniform int quality_level; -uniform int tquality_level; - - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - -float alt; -float mie_angle; - - -float light_distance_fading(in float dist); -float fog_backscatter(in float avisibility); -float rayleigh_in_func(in float dist, in float air_pollution, in float avisibility, in float eye_alt, in float vertex_alt); - -vec3 searchlight(); -vec3 landing_light(in float offset, in float offsetv); -vec3 get_hazeColor(in float light_arg); -vec3 filter_combined (in vec3 color) ; - -float luminance(vec3 color) -{ - return dot(vec3(0.212671, 0.715160, 0.072169), color); -} - - -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 > 30.0) {return e;} -if (x < -15.0) {return 0.0;} - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - -// this determines how light is attenuated in the distance -// physically this should be exp(-arg) but for technical reasons we use a sharper cutoff -// for distance > visibility - -float tree_fog_func (in float targ) -{ - - -float fade_mix; - -// for large altitude > 30 km, we switch to some component of quadratic distance fading to -// create the illusion of improved visibility range - -targ = 1.25 * targ * smoothstep(0.07,0.1,targ); // need to sync with the distance to which terrain is drawn - - -if (alt < 30000.0) - {return exp(-targ - targ * targ * targ * targ);} -else if (alt < 50000.0) - { - fade_mix = (alt - 30000.0)/20000.0; - return fade_mix * exp(-targ*targ - pow(targ,4.0)) + (1.0 - fade_mix) * exp(-targ - pow(targ,4.0)); - } -else - { - return exp(- targ * targ - pow(targ,4.0)); - } - -} - -float rand2D(in vec2 co){ - return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); -} - - -float simple_interpolate(in float a, in float b, in float x) -{ -return a + smoothstep(0.0,1.0,x) * (b-a); -} - -float interpolatedNoise2D(in float x, in float y) -{ - float integer_x = x - fract(x); - float fractional_x = x - integer_x; - - float integer_y = y - fract(y); - float fractional_y = y - integer_y; - - float v1 = rand2D(vec2(integer_x, integer_y)); - float v2 = rand2D(vec2(integer_x+1.0, integer_y)); - float v3 = rand2D(vec2(integer_x, integer_y+1.0)); - float v4 = rand2D(vec2(integer_x+1.0, integer_y +1.0)); - - float i1 = simple_interpolate(v1 , v2 , fractional_x); - float i2 = simple_interpolate(v3 , v4 , fractional_x); - - return simple_interpolate(i1 , i2 , fractional_y); -} - - - -float Noise2D(in vec2 coord, in float wavelength) -{ -return interpolatedNoise2D(coord.x/wavelength, coord.y/wavelength); - -} - -void main() -{ - - if (is_shadow > 1.0) {discard;} - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - - - vec3 lightDir = gl_LightSource[0].position.xyz; - float intensity; - - mie_angle = gl_Color.a; - vec4 texel = texture2D(texture, gl_TexCoord[0].st); - - // angle with horizon - float dist = length(relPos); - float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist; - - // determine tree shadow properties - if (is_shadow>0.0) - { - if (ct > -0.1) {discard;} // we eliminate shadows above the camera to avoid artifacts - float illumination = length(gl_Color.rgb); - texel = vec4 (0.1,0.1,0.1,texel.a); - texel.a *= illumination;// * smoothstep(0.0, 0.2, is_shadow); - texel.a *=0.6 * smoothstep(0.5,0.8,scattering); - texel.a = min(0.8, texel.a); - } - - float effective_scattering = min(scattering, cloud_self_shading); - - - if (quality_level > 3) - { - // seasonal color changes - - if ((cseason < 1.5)&& (autumn_flag > 0.0) && (is_shadow <0.0)) - { - texel.r = min(1.0, (1.0 + 5.0 *cseason * autumn_flag ) * texel.r); - texel.b = max(0.0, (1.0 - 8.0 * cseason) * texel.b); - } - - // mix dust - vec4 dust_color = vec4 (0.76, 0.71, 0.56, texel.a); - - texel = mix(texel, dust_color, clamp(0.6 * dust_cover_factor ,0.0, 1.0) ); - } - - -// ALS secondary light sources - - vec3 secondary_light = vec3 (0.0,0.0,0.0); - - if ((quality_level>5) && (tquality_level>5)) - { - 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); - } - } - - vec4 fragColor = vec4 (gl_Color.rgb +secondary_light * light_distance_fading(dist),1.0) * texel; - - -// Rayleigh haze - -float lightArg = (terminator-yprime_alt)/100000.0; -vec3 hazeColor = get_hazeColor(lightArg); - -// Rayleigh color shift due to in-scattering - - if ((quality_level > 5) && (tquality_level > 5)) - { - 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); - fragColor.rgb = mix(fragColor.rgb, rayleighColor,rayleighStrength); - } - - - - -// here comes the terrain haze model - - -float delta_z = hazeLayerAltitude - eye_alt; - - -if (dist > max(40.0, 0.07 * min(visibility,avisibility))) -{ - -alt = eye_alt; - - - -float transmission; -float vAltitude; -float delta_zv; -float H; -float distance_in_layer; -float transmission_arg; - - - - -// 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,min(visibility, avisibility)) * 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; - } - } - - -// blur of the haze layer edge - -float blur_thickness = 50.0; -float cphi = dot(vec3(0.0, 1.0, 0.0), relPos)/dist; -float ctlayer; -float ctblur = 0.035 ; - -float blur_dist; - -if ((abs(delta_z) < 400.0)&&(quality_level>5)&&(tquality_level>5)) - { - ctlayer = delta_z/dist-0.01 + 0.02 * Noise2D(vec2(cphi,1.0),0.1) -0.01; - blur_dist = dist * (1.0-smoothstep(0.0,300.0,-delta_z)) * smoothstep(-400.0,-200.0, -delta_z); - blur_dist = blur_dist * smoothstep(ctlayer-4.0*ctblur, ctlayer-ctblur, ct) * (1.0-smoothstep(ctlayer+0.5*ctblur, ctlayer+ctblur, ct)); - distance_in_layer = max(distance_in_layer, blur_dist); - } - -// 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; - -//float scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, relPos.z + eye_alt); - -if (visibility < avisibility) - { - 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 - { - 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 = tree_fog_func(transmission_arg); - -// 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 -float eShade = 0.9 * smoothstep(terminator_width+ terminator, -terminator_width + terminator, yprime_alt) + 0.1; - -// 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)) ); - } - -// high altitude desaturation of the haze color - -intensity = length(hazeColor); -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)))); - - - -// determine the right mix of transmission and haze - -//hazeColor = clamp(hazeColor,0.0,1.0); -fragColor.rgb = mix(eqColorFactor * hazeColor * eShade + secondary_light * fog_backscatter(avisibility), fragColor.rgb,transmission); - -} - -fragColor.rgb = filter_combined(fragColor.rgb); - -gl_FragColor = fragColor; - -} - diff --git a/Compositor/Shaders/ALS/tree-shadow.vert b/Compositor/Shaders/ALS/tree-shadow.vert deleted file mode 100644 index b2cb49f2f..000000000 --- a/Compositor/Shaders/ALS/tree-shadow.vert +++ /dev/null @@ -1,365 +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 - -uniform float fg_Fcoef; - -// 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 float yprime_alt; -varying float is_shadow; -varying float autumn_flag; - -uniform int colorMode; -uniform int wind_effects; -uniform int forest_effects; -uniform int num_deciduous_trees; -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 snow_level; -uniform float season; -uniform float forest_effect_size; -uniform float forest_effect_shape; -uniform float WindN; -uniform float WindE; - -uniform bool use_tree_shadows; -uniform bool use_forest_effect; -uniform bool use_optimization; -uniform bool tree_patches; - -uniform float osg_SimulationTime; - -uniform int cloud_shadow_flag; - -float earthShade; -float mie_angle; - -float shadow_func (in float x, in float y, in float noise, in float dist); -float VoronoiNoise2D(in vec2 coord, in float wavelength, in float xrand, in float yrand); - -// 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_diffuse; - vec4 light_ambient; - - vec3 shadedFogColor = vec3(0.65, 0.67, 0.78); - - float yprime; - float lightArg; - float intensity; - float vertex_alt; - float scattering; - is_shadow = -1.0; - - // 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)); - - // eye position in model space - vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0); - - float rn_dist = length(gl_Color.xyz - ep.xyz) + 300.0 * mod(10.0 * gl_Color.x,1.0); - float rn = mod(100.0 * gl_Color.x + 100.0 * gl_Color.y,1.0); - - float numVarieties = gl_Normal.z; - - bool cull_flag = false; - - float factor = 1.0; - float factor1 = 1.0; - - - if ((rn_dist > 2000.0) && (tree_patches == true) && (use_optimization == true)) - { - - if (rn > 0.15) - {cull_flag = true;} - else - { - numVarieties *=0.25; - factor = 5.2; - } - if (gl_FogCoord !=0.0) {cull_flag = true;} - } - - - - if (cull_flag) - { - // move everything out of the view frustrum - gl_Position = vec4 (0.0,0.0,10.0,1.0); - gl_FrontColor.a = 0.0; - } - else - { - - float texFract = floor(fract(gl_MultiTexCoord0.x) * numVarieties) / numVarieties; - -// determine whether the tree changes color in autumn - if (texFract < float(num_deciduous_trees)/float(numVarieties)) {autumn_flag = 0.5 + fract(gl_Color.x);} - else {autumn_flag = 0.0;} - - texFract += floor(gl_MultiTexCoord0.x) / numVarieties; - - // Determine the rotation for the tree. The Fog Coordinate provides rotation information - // to rotate one of the quands by 90 degrees. We then apply an additional position seed - // so that trees aren't all oriented N/S - float sr; - float cr; - sr = sin(gl_FogCoord + gl_Color.x); - cr = cos(gl_FogCoord + gl_Color.x); - - if (gl_FogCoord < 0.0) - { - sr = dot(lightHorizon.xy, vec2 (0.0,1.0)); - cr = dot(lightHorizon.xy, vec2 (-1.0,0.0)); - } - - - gl_TexCoord[0] = vec4(texFract, gl_MultiTexCoord0.y, 0.0, 0.0); - - // Determine the y texture coordinate based on whether it's summer, winter, snowy. - gl_TexCoord[0].y = gl_TexCoord[0].y + 0.25 * step(snow_level, gl_Color.z) + 0.5 * season; - - // scaling - vec3 position = gl_Vertex.xyz * gl_Normal.xxy; - - // Rotation of the generic quad to specific one for the tree. - position.xy = factor * vec2(dot(position.xy, vec2(cr, sr)), dot(position.xy, vec2(-sr, cr))); - - - // Shear by wind. Note that this only applies to the top vertices - if (wind_effects > 0) - { - position.x = position.x + position.z * (sin(osg_SimulationTime * 1.8 + (gl_Color.x + gl_Color.y + gl_Color.z) * 0.01) + 1.0) * 0.0025 * WindN; - position.y = position.y + position.z * (sin(osg_SimulationTime * 1.8 + (gl_Color.x + gl_Color.y + gl_Color.z) * 0.01) + 1.0) * 0.0025 * WindE; - } - - - - - - - // Scale by random domains - float voronoi; - if ((forest_effects > 0)&& use_forest_effect) - { - voronoi = 0.5 + 1.0 * VoronoiNoise2D(gl_Color.xy, forest_effect_size, forest_effect_shape, forest_effect_shape); - position.xyz = position.xyz * voronoi; - } - - // check if this is a shadow quad - if ((gl_FogCoord <0.0)&&(use_tree_shadows)) - { - is_shadow = 1.0; - float sinAlpha = dot(lightFull, vec3 (0.0,0.0,1.0)); - float cosAlpha = sqrt(1.0 - sinAlpha*sinAlpha); - float slope = dot(gl_SecondaryColor.xyz, vec3(0.0,0.0,1.0)); - //float slope = 1.0; - position.x += position.z * clamp(cosAlpha/sinAlpha,-5.0,5.0) * -dot(lightHorizon.xy, vec2(1.0,0.0)); - position.y += position.z * clamp(cosAlpha/sinAlpha,-5.0,5.0) * -dot(lightHorizon.xy, vec2 (0.0,1.0)); - if (position.z > 3.0) // we deal with an upper vertex - { - vec3 terrainNormal = gl_SecondaryColor.xyz; - position.z = 0.4 + 10.0*(1.0 - slope) ; - float sinPhi = dot(terrainNormal, vec3(1.0,0.0,0.0)); - float sinPsi = dot(terrainNormal, vec3(0.0,1.0,0.0)); - position.z -= position.x * sinPhi; - position.z -= position.y * sinPsi; - } - else - {position.z = 0.4 + 10.0* (1.0-slope);} - - } - - - // Move to correct location (stored in gl_Color) - position = position + gl_Color.xyz; - gl_Position = gl_ModelViewProjectionMatrix * vec4(position,1.0); - // logarithmic depth - gl_Position.z = (log2(max(1e-6, 1.0 + gl_Position.w)) * fg_Fcoef - 1.0) * gl_Position.w; - - vec3 ecPosition = vec3(gl_ModelViewMatrix * vec4(position, 1.0)); - //normal = normalize(-ecPosition); - - //float n = dot(normalize(gl_LightSource[0].position.xyz), normalize(-ecPosition)); - - - //vec4 diffuse_color = gl_FrontMaterial.diffuse * max(0.1, n); - //diffuse_color.a = 1.0; - vec4 ambient_color = gl_FrontMaterial.ambient; - - // here start computations for the haze layer - // we need several geometrical quantities - - - - relPos = position - 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(position.z,100.0); - scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_alt); - - // check whether we should see a shadow - - if (is_shadow >0.0) - { - float view_angle = dot ((gl_SecondaryColor.xyz), normalize(relPos)); - if (view_angle < 0.0) {is_shadow = -view_angle;} - else {is_shadow = 5.0;} - - // the surface element will be in shadow - if (dot(normalize(lightFull),(gl_SecondaryColor.xyz)) < 0.0) - { is_shadow = 5.0;} - } - - // branch dependent on daytime - -if (terminator < 1000000.0) // the full, sunrise and sunset computation -{ - - // 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_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.4 + 0.6 * smoothstep(0.2, 0.5, earthShade)); - intensity = length(light_ambient.rgb); - light_ambient.rgb = intensity * normalize(mix(light_ambient.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.8,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 -{ - - - earthShade = 1.0; - mie_angle = 1.0; - - if (terminator > 3000000.0) - {light_ambient = vec4 (0.33, 0.4, 0.5, 1.0); } - else - { - - lightArg = (terminator/100000.0 - 10.0)/20.0; - - light_ambient.r = 0.316 + lightArg * 0.016; - 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; - } - - - yprime_alt = -sqrt(2.0 * EarthRadius * hazeLayerAltitude); -} - - light_ambient.rgb = light_ambient.rgb * (1.0 + smoothstep(1000000.0, 3000000.0,terminator)); - -// tree shader lighting - -if (cloud_shadow_flag == 1) - {light_ambient.rgb = light_ambient.rgb * (0.5 + 0.5 * shadow_func(relPos.x, relPos.y, 1.0, dist));} - - - gl_FrontColor = light_ambient * gl_FrontMaterial.ambient; - gl_FrontColor.a = mie_angle; gl_BackColor.a = mie_angle; - - } - -} - diff --git a/Compositor/Shaders/ALS/tree.frag b/Compositor/Shaders/ALS/tree.frag deleted file mode 100644 index 2b5293c16..000000000 --- a/Compositor/Shaders/ALS/tree.frag +++ /dev/null @@ -1,370 +0,0 @@ -// -*-C++-*- -#version 120 - -// written by Thorsten Renk, Oct 2011, based on default.frag - - - -varying vec3 relPos; - - -uniform sampler2D texture; - - -varying float yprime_alt; -varying float autumn_flag; - -uniform float visibility; -uniform float avisibility; -uniform float scattering; -uniform float ground_scattering; -uniform float cloud_self_shading; -uniform float terminator; -uniform float terrain_alt; -uniform float hazeLayerAltitude; -uniform float overcast; -uniform float eye_alt; -uniform float dust_cover_factor; -uniform float air_pollution; -uniform float landing_light1_offset; -uniform float landing_light2_offset; -uniform float landing_light3_offset; -uniform float cseason; - -uniform int use_searchlight; -uniform int use_landing_light; -uniform int use_alt_landing_light; -uniform int quality_level; -uniform int tquality_level; - - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - -float alt; -float mie_angle; - - -float light_distance_fading(in float dist); -float fog_backscatter(in float avisibility); -float rayleigh_in_func(in float dist, in float air_pollution, in float avisibility, in float eye_alt, in float vertex_alt); - -vec3 searchlight(); -vec3 landing_light(in float offset, in float offsetv); -vec3 get_hazeColor(in float light_arg); -vec3 filter_combined (in vec3 color) ; - - - - -float tree_fog_func (in float targ) -{ - - -float fade_mix; - -// for large altitude > 30 km, we switch to some component of quadratic distance fading to -// create the illusion of improved visibility range - -targ = 1.25 * targ * smoothstep(0.07,0.1,targ); // need to sync with the distance to which terrain is drawn - - -if (alt < 30000.0) - {return exp(-targ - targ * targ * targ * targ);} -else if (alt < 50000.0) - { - fade_mix = (alt - 30000.0)/20000.0; - return fade_mix * exp(-targ*targ - pow(targ,4.0)) + (1.0 - fade_mix) * exp(-targ - pow(targ,4.0)); - } -else - { - return exp(- targ * targ - pow(targ,4.0)); - } - -} - -float rand2D(in vec2 co){ - return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); -} - - -float simple_interpolate(in float a, in float b, in float x) -{ -return a + smoothstep(0.0,1.0,x) * (b-a); -} - -float interpolatedNoise2D(in float x, in float y) -{ - float integer_x = x - fract(x); - float fractional_x = x - integer_x; - - float integer_y = y - fract(y); - float fractional_y = y - integer_y; - - float v1 = rand2D(vec2(integer_x, integer_y)); - float v2 = rand2D(vec2(integer_x+1.0, integer_y)); - float v3 = rand2D(vec2(integer_x, integer_y+1.0)); - float v4 = rand2D(vec2(integer_x+1.0, integer_y +1.0)); - - float i1 = simple_interpolate(v1 , v2 , fractional_x); - float i2 = simple_interpolate(v3 , v4 , fractional_x); - - return simple_interpolate(i1 , i2 , fractional_y); -} - - - -float Noise2D(in vec2 coord, in float wavelength) -{ -return interpolatedNoise2D(coord.x/wavelength, coord.y/wavelength); - -} - -void main() -{ - - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - - - - vec3 lightDir = gl_LightSource[0].position.xyz; - float intensity; - - mie_angle = gl_Color.a; - vec4 texel = texture2D(texture, gl_TexCoord[0].st); - - float effective_scattering = min(scattering, cloud_self_shading); - float dist = length(relPos); - - if (quality_level > 3) - { - - // seasonal color changes - - if ((cseason < 1.5)&& (autumn_flag > 0.0)) - { - texel.r = min(1.0, (1.0 + 5.0 *cseason * autumn_flag ) * texel.r); - //texel.g = texel.g + 0.05 * (autumn_flag-0.5) * cseason; - texel.b = max(0.0, (1.0 - 8.0 * cseason) * texel.b); - } - - // mix dust - vec4 dust_color = vec4 (0.76, 0.71, 0.56, texel.a); - - texel = mix(texel, dust_color, clamp(0.6 * dust_cover_factor ,0.0, 1.0) ); - - - } - - -// ALS secondary light sources - - vec3 secondary_light = vec3 (0.0,0.0,0.0); - - if ((quality_level>5) && (tquality_level>5)) - { - 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); - } - } - - vec4 fragColor = vec4 (gl_Color.rgb +secondary_light * light_distance_fading(dist),1.0) * texel; - - - - - float lightArg = (terminator-yprime_alt)/100000.0; - - vec3 hazeColor = get_hazeColor(lightArg); - - - -// Rayleigh color shift due to in-scattering - - if ((quality_level > 5) && (tquality_level > 5)) - { - 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); - fragColor.rgb = mix(fragColor.rgb, rayleighColor,rayleighStrength); - } - - - -// here comes the terrain haze model - - -float delta_z = hazeLayerAltitude - eye_alt; -float mvisibility = min(visibility,avisibility); - -if (dist > max(40.0, 0.07 * mvisibility)) -{ - -alt = eye_alt; - - -float transmission; -float vAltitude; -float delta_zv; -float H; -float distance_in_layer; -float transmission_arg; - -// 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; - } - } - - -// blur of the haze layer edge - -float blur_thickness = 50.0; -float cphi = dot(vec3(0.0, 1.0, 0.0), relPos)/dist; -float ctlayer; -float ctblur = 0.035 ; - -float blur_dist; - -if ((abs(delta_z) < 400.0)&&(quality_level>5)&&(tquality_level>5)) - { - ctlayer = delta_z/dist-0.01 + 0.02 * Noise2D(vec2(cphi,1.0),0.1) -0.01; - blur_dist = dist * (1.0-smoothstep(0.0,300.0,-delta_z)) * smoothstep(-400.0,-200.0, -delta_z); - blur_dist = blur_dist * smoothstep(ctlayer-4.0*ctblur, ctlayer-ctblur, ct) * (1.0-smoothstep(ctlayer+0.5*ctblur, ctlayer+ctblur, ct)); - distance_in_layer = max(distance_in_layer, blur_dist); - } - -// 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; - -//float scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, relPos.z + eye_alt); - -if (visibility < avisibility) - { - 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 - { - 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 = tree_fog_func(transmission_arg); - -// 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 -float 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)) ); - } - -// high altitude desaturation of the haze color - -intensity = length(hazeColor); -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)))); - - -// 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.rgb *= eqColorFactor * eShade; -hazeColor.rgb = max(hazeColor.rgb, minLight.rgb); - -// determine the right mix of transmission and haze - -//hazeColor = clamp(hazeColor,0.0,1.0); -fragColor.rgb = mix( hazeColor + secondary_light * fog_backscatter(mvisibility), fragColor.rgb,transmission); - -} - - -fragColor.rgb = filter_combined(fragColor.rgb); - -gl_FragColor = fragColor; -} - diff --git a/Compositor/Shaders/ALS/tree.vert b/Compositor/Shaders/ALS/tree.vert deleted file mode 100644 index 1c8511562..000000000 --- a/Compositor/Shaders/ALS/tree.vert +++ /dev/null @@ -1,280 +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 - -uniform float fg_Fcoef; - -// 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 float yprime_alt; -varying float autumn_flag; - -uniform int colorMode; -uniform int wind_effects; -uniform int forest_effects; -uniform int num_deciduous_trees; -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 snow_level; -uniform float season; -uniform float forest_effect_size; -uniform float forest_effect_shape; -uniform float WindN; -uniform float WindE; - -uniform float osg_SimulationTime; - -uniform int cloud_shadow_flag; - -uniform bool use_forest_effect; - -float earthShade; -float mie_angle; - -float shadow_func (in float x, in float y, in float noise, in float dist); -float VoronoiNoise2D(in vec2 coord, in float wavelength, in float xrand, in float yrand); - -// 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); - - float yprime; - float lightArg; - float intensity; - float vertex_alt; - float scattering; - -// this code is copied from tree.vert - - float numVarieties = gl_Normal.z; - float texFract = floor(fract(gl_MultiTexCoord0.x) * numVarieties) / numVarieties; - -// determine whether the tree changes color in autumn - if (texFract < float(num_deciduous_trees)/float(numVarieties)) {autumn_flag = 0.5 + fract(gl_Color.x);} - else {autumn_flag = 0.0;} - - - texFract += floor(gl_MultiTexCoord0.x) / numVarieties; - - // Determine the rotation for the tree. The Fog Coordinate provides rotation information - // to rotate one of the quands by 90 degrees. We then apply an additional position seed - // so that trees aren't all oriented N/S - float sr = sin(gl_FogCoord + gl_Color.x); - float cr = cos(gl_FogCoord + gl_Color.x); - gl_TexCoord[0] = vec4(texFract, gl_MultiTexCoord0.y, 0.0, 0.0); - - // Determine the y texture coordinate based on whether it's summer, winter, snowy. - gl_TexCoord[0].y = gl_TexCoord[0].y + 0.25 * step(snow_level, gl_Color.z) + 0.5 * season; - - // scaling - vec3 position = gl_Vertex.xyz * gl_Normal.xxy; - - // Rotation of the generic quad to specific one for the tree. - position.xy = vec2(dot(position.xy, vec2(cr, sr)), dot(position.xy, vec2(-sr, cr))); - - - // Shear by wind. Note that this only applies to the top vertices - if (wind_effects > 0) - { - position.x = position.x + position.z * (sin(osg_SimulationTime * 1.8 + (gl_Color.x + gl_Color.y + gl_Color.z) * 0.01) + 1.0) * 0.0025 * WindN; - position.y = position.y + position.z * (sin(osg_SimulationTime * 1.8 + (gl_Color.x + gl_Color.y + gl_Color.z) * 0.01) + 1.0) * 0.0025 * WindE; - } - - // Scale by random domains - float voronoi; - if ((forest_effects > 0)&& use_forest_effect) - { - voronoi = 0.5 + 1.0 * VoronoiNoise2D(gl_Color.xy, forest_effect_size, forest_effect_shape, forest_effect_shape); - position.xyz = position.xyz * voronoi; - } - - // Move to correct location (stored in gl_Color) - position = position + gl_Color.xyz; - gl_Position = gl_ModelViewProjectionMatrix * vec4(position,1.0); - // logarithmic depth - gl_Position.z = (log2(max(1e-6, 1.0 + gl_Position.w)) * fg_Fcoef - 1.0) * gl_Position.w; - - vec3 ecPosition = vec3(gl_ModelViewMatrix * vec4(position, 1.0)); - //normal = normalize(-ecPosition); - - //float n = dot(normalize(gl_LightSource[0].position.xyz), normalize(-ecPosition)); - - - //vec4 diffuse_color = gl_FrontMaterial.diffuse * max(0.1, n); - //diffuse_color.a = 1.0; - vec4 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 = position - 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(position.z,100.0); - scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_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_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.4 + 0.6 * smoothstep(0.2, 0.5, earthShade)); - intensity = length(light_ambient.rgb); - light_ambient.rgb = intensity * normalize(mix(light_ambient.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.8,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 -{ - - - earthShade = 1.0; - mie_angle = 1.0; - - if (terminator > 3000000.0) - {light_ambient = vec4 (0.33, 0.4, 0.5, 1.0); } - else - { - - lightArg = (terminator/100000.0 - 10.0)/20.0; - - light_ambient.r = 0.316 + lightArg * 0.016; - 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; - } - - - yprime_alt = -sqrt(2.0 * EarthRadius * hazeLayerAltitude); -} - - light_ambient.rgb = light_ambient.rgb * (1.0 + smoothstep(1000000.0, 3000000.0,terminator)); - -// tree shader lighting - -if (cloud_shadow_flag == 1) - {light_ambient.rgb = light_ambient.rgb * (0.5 + 0.5 * shadow_func(relPos.x, relPos.y, 1.0, dist));} - - - //vec4 ambientColor = gl_FrontLightModelProduct.sceneColor + - //gl_FrontColor = ambientColor; - gl_FrontColor = light_ambient * gl_FrontMaterial.ambient; - gl_FrontColor.a = mie_angle; gl_BackColor.a = mie_angle; - - - - -} - diff --git a/Compositor/Shaders/ALS/urban.frag b/Compositor/Shaders/ALS/urban.frag deleted file mode 100644 index f74cc9e9e..000000000 --- a/Compositor/Shaders/ALS/urban.frag +++ /dev/null @@ -1,610 +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) ; - -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);} - - - - - 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/Compositor/Shaders/ALS/urban.vert b/Compositor/Shaders/ALS/urban.vert deleted file mode 100644 index 75a6f2356..000000000 --- a/Compositor/Shaders/ALS/urban.vert +++ /dev/null @@ -1,291 +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 - -uniform float fg_Fcoef; - -// 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; - -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(); - // logarithmic depth - gl_Position.z = (log2(max(1e-6, 1.0 + gl_Position.w)) * fg_Fcoef - 1.0) * gl_Position.w; - 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); - - -} - diff --git a/Compositor/Shaders/ALS/wake.vert b/Compositor/Shaders/ALS/wake.vert deleted file mode 100644 index dee6ee2a4..000000000 --- a/Compositor/Shaders/ALS/wake.vert +++ /dev/null @@ -1,233 +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 -// Ported to the Atmospheric Light Scattering Framework -// by Thorsten Renk, Aug. 2013 - -#version 120 -#define fps2kts 0.5925 - -varying vec4 waterTex1; -varying vec4 waterTex2; -varying vec3 relPos; -varying vec3 rawPos; -varying vec3 viewerdir; -varying vec3 lightdir; -varying vec3 normal; - -varying float steepness; -varying float earthShade; -varying float yprime_alt; -varying float mie_angle; - -varying float flogz; - -uniform float osg_SimulationTime; -uniform float WindE, WindN, spd, hdg; -uniform float hazeLayerAltitude; -uniform float terminator; -uniform float terrain_alt; -uniform float avisibility; -uniform float visibility; -uniform float overcast; -uniform float ground_scattering; - -uniform mat4 osg_ViewMatrixInverse; - -vec3 specular_light; - -// 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; - -///////////////////////// - - -/////// 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)); -} - -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(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)); - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - rawPos = (osg_ViewMatrixInverse *gl_ModelViewMatrix * gl_Vertex).xyz; - - 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(); - // logarithmic depth - flogz = 1.0 + gl_Position.w; - - // here start computations for the haze layer - - - float yprime; - float lightArg; - float intensity; - float vertex_alt; - float scattering; - - // 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 = 0.5 + 0.5 * ground_scattering + 0.5* (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_alt); - - // branch dependent on daytime - -if (terminator < 1000000.0) // the full, sunrise and sunset computation -{ - - - // establish coordinates relative to sun position - vec3 lightHorizon = normalize(vec3(lightdir.x,lightdir.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; - - specular_light.b = light_func(lightArg, 1.330e-05, 0.264, 3.827, 1.08e-05, 1.0); - specular_light.g = light_func(lightArg, 3.931e-06, 0.264, 3.827, 7.93e-06, 1.0); - specular_light.r = light_func(lightArg, 8.305e-06, 0.161, 3.827, 3.04e-05, 1.0); - - specular_light = max(specular_light * scattering, vec3 (0.05, 0.05, 0.05)); - - intensity = length(specular_light.rgb); - specular_light.rgb = intensity * normalize(mix(specular_light.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.6,ground_scattering) )); - - specular_light.rgb = intensity * normalize(mix(specular_light.rgb, shadedFogColor, 1.0 -smoothstep(0.5, 0.7,earthShade))); - - - // directional scattering for low sun - if (lightArg < 10.0) - {mie_angle = (0.5 * dot(normalize(relPos), lightdir) ) + 0.5;} - else - {mie_angle = 1.0;} - - - - - -// 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) - {specular_light = vec3 (1.0, 1.0, 1.0);} - else - { - - lightArg = (terminator/100000.0 - 10.0)/20.0; - specular_light.b = 0.78 + lightArg * 0.21; - specular_light.g = 0.907 + lightArg * 0.091; - specular_light.r = 0.904 + lightArg * 0.092; - } - - specular_light = specular_light * scattering; - - yprime_alt = -sqrt(2.0 * EarthRadius * hazeLayerAltitude); - -} - -gl_FrontColor.rgb = specular_light; -gl_BackColor.rgb = gl_FrontColor.rgb; - -} diff --git a/Compositor/Shaders/ALS/water-base.frag b/Compositor/Shaders/ALS/water-base.frag deleted file mode 100644 index 1c118ef0c..000000000 --- a/Compositor/Shaders/ALS/water-base.frag +++ /dev/null @@ -1,565 +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 -// ported to lightfield shading Thorsten Renk 2012 - -#version 120 - -uniform float fg_Fcoef; - -uniform sampler2D water_normalmap; -uniform sampler2D water_dudvmap; -uniform sampler2D sea_foam; -uniform sampler2D perlin_normalmap; - - -uniform float saturation, Overcast, WindE, WindN; -uniform float osg_SimulationTime; - -varying vec4 waterTex1; //moving texcoords -varying vec4 waterTex2; //moving texcoords -varying vec4 waterTex4; //viewts -varying vec3 viewerdir; -varying vec3 lightdir; -//varying vec3 specular_light; -varying vec3 relPos; - -varying float earthShade; -varying float yprime_alt; -varying float mie_angle; - -varying float flogz; - -uniform float WaveFreq ; -uniform float WaveAmp ; -uniform float WaveSharp ; -uniform float WaveAngle ; -uniform float WaveFactor ; -uniform float WaveDAngle ; -uniform float normalmap_dds; - - -uniform float hazeLayerAltitude; -uniform float terminator; -uniform float terrain_alt; -uniform float avisibility; -uniform float visibility; -uniform float overcast; -uniform float scattering; -uniform float ground_scattering; -uniform float cloud_self_shading; -uniform float eye_alt; -uniform float sea_r; -uniform float sea_g; -uniform float sea_b; - - -vec3 specular_light; - -//uniform int wquality_level; - -const float terminator_width = 200000.0; -const float EarthRadius = 5800000.0; - -float fog_func (in float targ, in float alt); -vec3 get_hazeColor(in float light_arg); -vec3 filter_combined (in vec3 color) ; - -/////// 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) * cos( dot(w.dir, pos)*w.freq + t*w.phase); - } - -void sumWaves(float angle, float dangle, float windScale, float factor, out float ddx, float ddy) - { - mat4 RotationMatrix; - float deriv; - vec4 P = waterTex1 * 1024; - - 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) - { - - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - float effective_scattering = min(scattering, cloud_self_shading); - - float dist = length(relPos); - 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 = lightdir; // normalize(lightdir); - - // half vector - vec3 Hv = normalize(L + E); - - //vec3 Normal = normalize(normal); - vec3 Normal = vec3 (0.0, 0.0, 1.0); - - 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.01 + smoothstep(0.0, 40.0, windEffect); //wave roughness filter - - float mixFactor = 0.2 + 0.02 * smoothstep(0.0, 50.0, windEffect); - //mixFactor = 0.2; - mixFactor = clamp(mixFactor, 0.3, 0.8); - - // there's no need to do wave patterns or foam for pixels which are so far away that we can't actually see them - // we only need detail in the near zone or where the sun reflection is - - int detail_flag; - if ((dist > 15000.0) && (dot(normalize(vec3 (lightdir.x, lightdir.y, 0.0) ), normalize(relPos)) < 0.7 )) {detail_flag = 0;} - else {detail_flag = 1;} - - //detail_flag = 1; - - // sine waves - float ddx, ddx1, ddx2, ddx3, ddy, ddy1, ddy2, ddy3; - float angle; - - - ddx = 0.0, ddy = 0.0; - ddx1 = 0.0, ddy1 = 0.0; - ddx2 = 0.0, ddy2 = 0.0; - ddx3 = 0.0, ddy3 = 0.0; - if (detail_flag == 1) - { - angle = 0.0; - - wave0.freq = WaveFreq ; - wave0.amp = WaveAmp; - wave0.dir = vec2 (0.0, 1.0); //vec2(cos(radians(angle)), sin(radians(angle))); - - angle -= 45; - wave1.freq = WaveFreq * 2.0 ; - wave1.amp = WaveAmp * 1.25; - wave1.dir = vec2(0.70710, -0.7071); //vec2(cos(radians(angle)), sin(radians(angle))); - - angle += 30; - wave2.freq = WaveFreq * 3.5; - wave2.amp = WaveAmp * 0.75; - wave2.dir = vec2(0.96592, -0.2588);// vec2(cos(radians(angle)), sin(radians(angle))); - - angle -= 50; - wave3.freq = WaveFreq * 3.0 ; - wave3.amp = WaveAmp * 0.75; - wave3.dir = vec2(0.42261, -0.9063); //vec2(cos(radians(angle)), sin(radians(angle))); - - // sum waves - - sumWaves(WaveAngle, -1.5, windScale, WaveFactor, ddx, ddy); - sumWaves(WaveAngle, 1.5, windScale, WaveFactor, ddx1, ddy1); - - //reset the waves - angle = 0.0; - float waveamp = WaveAmp * 0.75; - - wave0.freq = WaveFreq ; - wave0.amp = waveamp; - wave0.dir = vec2 (0.0, 1.0); //vec2(cos(radians(angle)), sin(radians(angle))); - - angle -= 20; - wave1.freq = WaveFreq * 2.0 ; - wave1.amp = waveamp * 1.25; - wave1.dir = vec2(0.93969, -0.34202);// vec2(cos(radians(angle)), sin(radians(angle))); - - angle += 35; - wave2.freq = WaveFreq * 3.5; - wave2.amp = waveamp * 0.75; - wave2.dir = vec2(0.965925, 0.25881); //vec2(cos(radians(angle)), sin(radians(angle))); - - angle -= 45; - wave3.freq = WaveFreq * 3.0 ; - wave3.amp = waveamp * 0.75; - wave3.dir = vec2(0.866025, -0.5); //vec2(cos(radians(angle)), sin(radians(angle))); - - - //sumWaves(WaveAngle + WaveDAngle, -1.5, windScale, WaveFactor, ddx2, ddy2); - //sumWaves(WaveAngle + WaveDAngle, 1.5, windScale, WaveFactor, ddx3, ddy3); - - } - // end sine stuff - - //cover = 5.0 * smoothstep(0.6, 1.0, scattering); - //cover = 5.0 * ground_scattering; - - vec4 viewt = normalize(waterTex4); - - vec4 disdis = texture2D(water_dudvmap, vec2(waterTex2 * tscale)* windScale) * 2.0 - 1.0; - - vec4 vNorm; - - - //normalmaps - vec4 nmap = texture2D(water_normalmap, vec2(waterTex1 + disdis * sca2) * windScale) * 2.0 - 1.0; - vec4 nmap1 = texture2D(perlin_normalmap, vec2(waterTex1 + disdis * sca2) * windScale) * 2.0 - 1.0; - - rotationmatrix(radians(3.0 * sin(osg_SimulationTime * 0.0075)), RotationMatrix); - nmap += texture2D(water_normalmap, vec2(waterTex2 * RotationMatrix * tscale) * windScale) * 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 - vNorm = normalize(mix(nmap, nmap1, mixFactor) * waveRoughness); - vNorm.r += ddx + ddx1 + ddx2 + ddx3; - - - if (normalmap_dds > 0) - {vNorm = -vNorm;} //dds fix - - - //load reflection - - vec4 refl ; - - refl.r = sea_r; - refl.g = sea_g; - refl.b = sea_b; - refl.a = 1.0; - - - float intensity; - // de-saturate for reduced light - refl.rgb = mix(refl.rgb, vec3 (0.248, 0.248, 0.248), 1.0 - smoothstep(0.1, 0.8, ground_scattering)); - - // de-saturate light for overcast haze - intensity = length(refl.rgb); - refl.rgb = mix(refl.rgb, intensity * vec3 (1.0, 1.0, 1.0), 0.5 * smoothstep(0.1, 0.9, overcast)); - - vec3 N; - - - - - vec3 N0 = vec3(texture2D(water_normalmap, vec2(waterTex1 + disdis * sca2) * windScale) * 2.0 - 1.0); - vec3 N1 = vec3(texture2D(perlin_normalmap, vec2(waterTex1 + disdis * sca) * windScale) * 2.0 - 1.0); - - N0 += vec3(texture2D(water_normalmap, vec2(waterTex1 * tscale) * windScale) * 2.0 - 1.0); - N1 += vec3(texture2D(perlin_normalmap, vec2(waterTex2 * tscale) * windScale) * 2.0 - 1.0); - - - - rotationmatrix(radians(2.0 * sin(osg_SimulationTime * 0.005)), RotationMatrix); - N0 += vec3(texture2D(water_normalmap, vec2(waterTex2 * RotationMatrix * (tscale + sca2)) * windScale) * 2.0 - 1.0); - N1 += vec3(texture2D(perlin_normalmap, vec2(waterTex2 * RotationMatrix * (tscale + sca2)) * windScale) * 2.0 - 1.0); - - rotationmatrix(radians(-4.0 * sin(osg_SimulationTime * 0.003)), RotationMatrix); - N0 += vec3(texture2D(water_normalmap, vec2(waterTex1 * RotationMatrix + disdis * sca2) * windScale) * 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; - - N0.r += (ddx + ddx1 + ddx2 + ddx3); - N0.g += (ddy + ddy1 + ddy2 + ddy3); - - N = normalize(mix(Normal + N0, Normal + N1, mixFactor) * waveRoughness); - - if (normalmap_dds > 0) - {N = -N;} //dds fix - - - - - - specular_light = gl_Color.rgb * earthShade; - - - vec3 specular_color = vec3(specular_light) - * pow(max(0.0, dot(N, Hv)), water_shininess) * 6.0; - - // secondary reflection of sky irradiance - - vec3 ER = E - 2.0 * N * dot(E,N); - float ctrefl = dot(vec3(0.0,0.0,1.0), -normalize(ER)); - //float fresnel = -0.5 + 8.0 * (1.0-smoothstep(0.0,0.4, dot(E,N))); - float fresnel = 8.0 * (1.0-smoothstep(0.0,0.4, dot(E,N))); - //specular_color += (ctrefl*ctrefl) * fresnel* specular_light.rgb; - - specular_color += ((0.15*(1.0-ctrefl* ctrefl) * fresnel) - 0.3) * specular_light.rgb; - - - - vec4 specular = vec4(specular_color, 0.5); - - specular = specular * saturation * 0.3 * earthShade ; - - //calculate fresnel - vec4 invfres = vec4( dot(vNorm, viewt) ); - vec4 fres = vec4(1.0) + invfres; - refl *= fres; - - - - vec4 ambient_light; - //intensity = length(specular_light.rgb); - ambient_light.rgb = max(specular_light.rgb, vec3(0.05, 0.05, 0.05)); - //ambient_light.rgb = max(intensity * normalize(vec3 (0.33, 0.4, 0.5)), vec3 (0.1,0.1,0.1)); - ambient_light.a = 1.0; - - - vec4 finalColor; - - - - finalColor = refl + specular * smoothstep(0.3, 0.6, ground_scattering); - - //add foam - vec4 foam_texel = texture2D(sea_foam, vec2(waterTex2 * tscale) * 25.0); - - if (dist < 10000.0) - { - float foamSlope = 0.10 + 0.1 * windScale; - 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; - - - -// here comes the terrain haze model - - -float delta_z = hazeLayerAltitude - eye_alt; -float mvisibility = min(visibility,avisibility); - - -if (dist > 0.04 * mvisibility) -{ - - -float transmission; -float vAltitude; -float delta_zv; -float H; -float distance_in_layer; -float transmission_arg; - - -// 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) - { - 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 - { - 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, eye_alt); - -// there's always residual intensity, we should never be driven to zero -if (eqColorFactor < 0.2) {eqColorFactor = 0.2;} - - -float lightArg = (terminator-yprime_alt)/100000.0; -vec3 hazeColor = get_hazeColor(lightArg); - - -// now dim the light for haze -float 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)) ); - } - -// high altitude desaturation of the haze color - -intensity = length(hazeColor); - - -if (intensity > 0.0) // this needs to be a condition, because otherwise hazeColor doesn't come out correctly - { - hazeColor = intensity * normalize (mix(hazeColor, intensity * vec3 (1.0,1.0,1.0), 0.7* smoothstep(5000.0, 50000.0, eye_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)))); - } - - // 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, finalColor.rgb,transmission); - - - } - - finalColor.rgb = filter_combined(finalColor.rgb); - - gl_FragColor = finalColor; - // logarithmic depth - gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; -} diff --git a/Compositor/Shaders/ALS/water-high.frag b/Compositor/Shaders/ALS/water-high.frag deleted file mode 100644 index d850d7c96..000000000 --- a/Compositor/Shaders/ALS/water-high.frag +++ /dev/null @@ -1,748 +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 -// ported to ALS Thorsten Renk 2012 - -#version 120 - -uniform float fg_Fcoef; - -uniform sampler2D water_normalmap; -uniform sampler2D water_dudvmap; -uniform sampler2D sea_foam; -uniform sampler2D perlin_normalmap; -uniform sampler2D ice_texture; -uniform sampler2D topo_map; - - -uniform float saturation, Overcast, WindE, WindN; -uniform float osg_SimulationTime; - -varying vec4 waterTex1; //moving texcoords -varying vec4 waterTex2; //moving texcoords -varying vec4 waterTex4; //viewts -varying vec3 viewerdir; -varying vec3 lightdir; -varying vec3 relPos; -varying vec3 rawPos; -varying vec2 TopoUV; - - -varying float earthShade; -varying float yprime_alt; -varying float mie_angle; -varying float steepness; - -varying float flogz; - -uniform float WaveFreq ; -uniform float WaveAmp ; -uniform float WaveSharp ; -uniform float WaveAngle ; -uniform float WaveFactor ; -uniform float WaveDAngle ; -uniform float normalmap_dds; - - -uniform float hazeLayerAltitude; -uniform float terminator; -uniform float terrain_alt; -uniform float avisibility; -uniform float visibility; -uniform float overcast; -uniform float scattering; -uniform float ground_scattering; -uniform float cloud_self_shading; -uniform float eye_alt; -uniform float fogstructure; -uniform float ice_cover; -uniform float sea_r; -uniform float sea_g; -uniform float sea_b; -uniform float air_pollution; -uniform float landing_light1_offset; -uniform float landing_light2_offset; -uniform float landing_light3_offset; - -uniform float wash_x; -uniform float wash_y; -uniform float wash_strength; - -uniform int quality_level; -uniform int tquality_level; -uniform int ocean_flag; -uniform int cloud_shadow_flag; -uniform int use_searchlight; -uniform int use_landing_light; -uniform int use_alt_landing_light; - -vec3 specular_light; - - -const float terminator_width = 200000.0; -const float EarthRadius = 5800000.0; - -////included functions ///// - -float Noise3D(in vec3 coord, in float wavelength); -float Noise2D(in vec2 coord, in float wavelength); -float shadow_func (in float x, in float y, in float noise, in float dist); -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) ; - - -////////////////////// - -/////// 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) * cos( dot(w.dir, pos)*w.freq + t*w.phase); - } - -void sumWaves(float angle, float dangle, float windScale, float factor, out float ddx, float ddy) - { - mat4 RotationMatrix; - float deriv; - vec4 P = waterTex1 * 1024; - - 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; - } - - -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 > 30.0) {return e;} -if (x < -15.0) {return 0.0;} - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - -// this determines how light is attenuated in the distance -// physically this should be exp(-arg) but for technical reasons we use a sharper cutoff -// for distance > visibility - - - -void main(void) - { - - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - float effective_scattering = min(scattering, cloud_self_shading); - - float dist = length(relPos); - 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); - - float noise_50m = Noise3D(rawPos.xyz, 50.0); - float noise_250m = Noise3D(rawPos.xyz,250.0); - float noise_500m = Noise3D(rawPos.xyz,500.0); - float noise_1500m = Noise3D(rawPos.xyz,1500.0); - float noise_2000m = Noise3D(rawPos.xyz,2000.0); - float noise_2500m = Noise3D(rawPos.xyz, 2500.0); - - // get depth map - vec4 topoTexel = texture2D(topo_map, TopoUV); - float floorMixFactor = smoothstep(0.3, 0.985, topoTexel.a); - vec3 floorColour = topoTexel.rgb; - - mat4 RotationMatrix; - - // compute direction to viewer - vec3 E = normalize(viewerdir); - - // compute direction to light source - vec3 L = lightdir; // normalize(lightdir); - - // half vector - vec3 Hv = normalize(L + E); - - //vec3 Normal = normalize(normal); - vec3 Normal = vec3 (0.0, 0.0, 1.0); - - 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.01 + smoothstep(0.0, 40.0, windEffect); //wave roughness filter - - float mixFactor = 0.2 + 0.02 * smoothstep(0.0, 50.0, windEffect); - //mixFactor = 0.2; - mixFactor = clamp(mixFactor, 0.3, 0.8); - - // there's no need to do wave patterns or foam for pixels which are so far away that we can't actually see them - // we only need detail in the near zone or where the sun reflection is - - int detail_flag; - if ((dist > 15000.0) && (dot(normalize(vec3 (lightdir.x, lightdir.y, 0.0) ), normalize(relPos)) < 0.7 )) {detail_flag = 0;} - else {detail_flag = 1;} - - //detail_flag = 1; - - // sine waves - float ddx, ddx1, ddx2, ddx3, ddy, ddy1, ddy2, ddy3; - float angle; - - ddx = 0.0, ddy = 0.0; - ddx1 = 0.0, ddy1 = 0.0; - ddx2 = 0.0, ddy2 = 0.0; - ddx3 = 0.0, ddy3 = 0.0; - - if (detail_flag == 1) - { - angle = 0.0; - - wave0.freq = WaveFreq ; - wave0.amp = WaveAmp; - wave0.dir = vec2 (0.0, 1.0); //vec2(cos(radians(angle)), sin(radians(angle))); - - angle -= 45; - wave1.freq = WaveFreq * 2.0 ; - wave1.amp = WaveAmp * 1.25; - wave1.dir = vec2(0.70710, -0.7071); //vec2(cos(radians(angle)), sin(radians(angle))); - - angle += 30; - wave2.freq = WaveFreq * 3.5; - wave2.amp = WaveAmp * 0.75; - wave2.dir = vec2(0.96592, -0.2588);// vec2(cos(radians(angle)), sin(radians(angle))); - - angle -= 50; - wave3.freq = WaveFreq * 3.0 ; - wave3.amp = WaveAmp * 0.75; - wave3.dir = vec2(0.42261, -0.9063); //vec2(cos(radians(angle)), sin(radians(angle))); - - // sum waves - - - sumWaves(WaveAngle, -1.5, windScale, WaveFactor, ddx, ddy); - sumWaves(WaveAngle, 1.5, windScale, WaveFactor, ddx1, ddy1); - - //reset the waves - angle = 0.0; - float waveamp = WaveAmp * 0.75; - - wave0.freq = WaveFreq ; - wave0.amp = waveamp; - wave0.dir = vec2 (0.0, 1.0); //vec2(cos(radians(angle)), sin(radians(angle))); - - angle -= 20; - wave1.freq = WaveFreq * 2.0 ; - wave1.amp = waveamp * 1.25; - wave1.dir = vec2(0.93969, -0.34202);// vec2(cos(radians(angle)), sin(radians(angle))); - - angle += 35; - wave2.freq = WaveFreq * 3.5; - wave2.amp = waveamp * 0.75; - wave2.dir = vec2(0.965925, 0.25881); //vec2(cos(radians(angle)), sin(radians(angle))); - - angle -= 45; - wave3.freq = WaveFreq * 3.0 ; - wave3.amp = waveamp * 0.75; - wave3.dir = vec2(0.866025, -0.5); //vec2(cos(radians(angle)), sin(radians(angle))); - - - sumWaves(WaveAngle + WaveDAngle, -1.5, windScale, WaveFactor, ddx2, ddy2); - sumWaves(WaveAngle + WaveDAngle, 1.5, windScale, WaveFactor, ddx3, ddy3); - - } - // end sine stuff - - //cover = 5.0 * smoothstep(0.6, 1.0, scattering); - //cover = 5.0 * ground_scattering; - - vec4 viewt = normalize(waterTex4); - vec4 disdis = texture2D(water_dudvmap, vec2(waterTex2 * tscale)* windScale) * 2.0 - 1.0; - vec4 vNorm; - - - //normalmaps - vec4 nmap = texture2D(water_normalmap, vec2(waterTex1 + disdis * sca2) * windScale) * 2.0 - 1.0; - vec4 nmap1 = texture2D(perlin_normalmap, vec2(waterTex1 + disdis * sca2) * windScale) * 2.0 - 1.0; - - rotationmatrix(radians(3.0 * sin(osg_SimulationTime * 0.0075)), RotationMatrix); - nmap += texture2D(water_normalmap, vec2(waterTex2 * RotationMatrix * tscale) * windScale) * 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 - vNorm = normalize(mix(nmap, nmap1, mixFactor) * waveRoughness); - vNorm.r += ddx + ddx1 + ddx2 + ddx3; - - - if (normalmap_dds > 0) - {vNorm = -vNorm;} //dds fix - - vNorm = vNorm * (0.5 + 0.5 * noise_250m); - - //load reflection - - vec4 refl ; - - refl.r = sea_r; - refl.g = sea_g; - refl.b = sea_b; - refl.a = 1.0; - - refl.g = refl.g * (0.9 + 0.2* noise_2500m); - - - // the depth map works perfectly fine for both ocean and inland water texels - refl.rgb = mix(refl.rgb, 0.65* floorColour, floorMixFactor); - refl.rgb = refl.rgb * (0.5 + 0.5 * smoothstep(0.0,0.3,topoTexel.a)); - - - float intensity; - // de-saturate for reduced light - refl.rgb = mix(refl.rgb, vec3 (0.248, 0.248, 0.248), 1.0 - smoothstep(0.1, 0.8, ground_scattering)); - - // de-saturate light for overcast haze - intensity = length(refl.rgb); - refl.rgb = mix(refl.rgb, intensity * vec3 (1.0, 1.0, 1.0), 0.5 * smoothstep(0.1, 0.9, overcast)); - - vec3 N; - - - - - vec3 N0 = vec3(texture2D(water_normalmap, vec2(waterTex1 + disdis * sca2) * windScale) * 2.0 - 1.0); - vec3 N1 = vec3(texture2D(perlin_normalmap, vec2(waterTex1 + disdis * sca) * windScale) * 2.0 - 1.0); - - N0 += vec3(texture2D(water_normalmap, vec2(waterTex1 * tscale) * windScale) * 2.0 - 1.0); - N1 += vec3(texture2D(perlin_normalmap, vec2(waterTex2 * tscale) * windScale) * 2.0 - 1.0); - - - - rotationmatrix(radians(2.0 * sin(osg_SimulationTime * 0.005)), RotationMatrix); - N0 += vec3(texture2D(water_normalmap, vec2(waterTex2 * RotationMatrix * (tscale + sca2)) * windScale) * 2.0 - 1.0); - N1 += vec3(texture2D(perlin_normalmap, vec2(waterTex2 * RotationMatrix * (tscale + sca2)) * windScale) * 2.0 - 1.0); - - rotationmatrix(radians(-4.0 * sin(osg_SimulationTime * 0.003)), RotationMatrix); - N0 += vec3(texture2D(water_normalmap, vec2(waterTex1 * RotationMatrix + disdis * sca2) * windScale) * 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; - - N0.r += (ddx + ddx1 + ddx2 + ddx3); - N0.g += (ddy + ddy1 + ddy2 + ddy3); - - N = normalize(mix(Normal + N0, Normal + N1, mixFactor) * waveRoughness); - - if (normalmap_dds > 0) - {N = -N;} //dds fix - - // primary reflection of the sun - specular_light = gl_Color.rgb * earthShade; - - - vec3 specular_color = vec3(specular_light) - * pow(max(0.0, dot(N, Hv)), water_shininess) * 6.0; - - // secondary reflection of sky irradiance - - vec3 ER = E - 2.0 * N * dot(E,N); - float ctrefl = dot(vec3(0.0,0.0,1.0), -normalize(ER)); - //float fresnel = -0.5 + 8.0 * (1.0-smoothstep(0.0,0.4, dot(E,N))); - float fresnel = 8.0 * (1.0-smoothstep(0.0,0.4, dot(E,N))); - //specular_color += (ctrefl*ctrefl) * fresnel* specular_light.rgb; - - specular_color += ((0.15*(1.0-ctrefl* ctrefl) * fresnel) - 0.3) * specular_light.rgb; - - - vec4 specular = vec4(specular_color, 0.5); - - specular = specular * saturation * 0.3 * earthShade ; - - //calculate fresnel - vec4 invfres = vec4( dot(vNorm, viewt) ); - vec4 fres = vec4(1.0) + invfres; - refl *= fres; - - - - vec4 ambient_light; - //intensity = length(specular_light.rgb); - ambient_light.rgb = max(specular_light.rgb, vec3(0.05, 0.05, 0.05)); - //ambient_light.rgb = max(intensity * normalize(vec3 (0.33, 0.4, 0.5)), vec3 (0.1,0.1,0.1)); - ambient_light.a = 1.0; - - - vec4 finalColor; - - // compute cloud shadow effect - - float shadowValue; - if (cloud_shadow_flag == 1) - { - shadowValue = shadow_func(relPos.x, relPos.y, 0.3 * noise_250m + 0.5 * noise_500m+0.2 * noise_1500m, dist); - specular = specular * shadowValue; - refl = refl * (0.7 + 0.3 *shadowValue); - } - - // compute secondary light effect - - - vec3 secondary_light = vec3 (0.0,0.0,0.0); - - if ((quality_level >5)&&(tquality_level > 5)) - { - 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); - } - } - - - - finalColor = refl + specular * smoothstep(0.3, 0.6, ground_scattering) + vec4 (secondary_light, 0.0) * light_distance_fading(dist) * 2.0 * pow(max(0.0,dot(E,N)), water_shininess); - - finalColor = clamp(finalColor, 0.0,1.0); - - //add foam - vec4 foam_texel = texture2D(sea_foam, vec2(waterTex2 * tscale) * 25.0); - - - if (dist < 10000.0) - { - float foamSlope = 0.10 + 0.1 * windScale; - - // rotor wash - vec2 washDir = vec2 (wash_x, wash_y) - relPos.xy; - - float washDist = length(washDir); - float washStrength = 3.0 * min(14.0 * wash_strength/(washDist + 1.0), 1.0); - - float timeFact = sin(-30.0 * osg_SimulationTime + 1.5 * washDist + dot(normalize(washDir), vec2(1.0, 0.0))); - - float noiseFact = 0.5 * Noise2D(vec2 (relPos.x + 30.0 * osg_SimulationTime, relPos.y), 1.1); - noiseFact+= 0.5 * Noise2D(vec2 (relPos.x - 31.0 *osg_SimulationTime, relPos.y ), 1.0); - - washStrength *= (0.5 + (0.3 * noiseFact) + (0.2 * noiseFact * clamp(timeFact, -0.2, 1.0))); - //washStrength *= (0.5 + (0.3 * noiseFact * clamp(timeFact, -0.2, 1.0))); - - float waveSlope = N.g; - float surfFact = 0.0; - surfFact += washStrength; - - - if ((windEffect >= 8.0) || (steepness < 0.999) || (topoTexel.a > 0.98) || (washStrength > 0.5)) - { - if ((waveSlope > 0.0) && (ocean_flag ==1)) - { - surfFact = surfFact +(1.0 -smoothstep(0.97,1.0,steepness)); - surfFact += 0.5 * smoothstep(0.98,1.0,topoTexel.a); - - } - waveSlope = waveSlope + 2.0 * surfFact; - - - if (waveSlope >= foamSlope){ - finalColor = mix(finalColor, max(finalColor, finalColor + foam_texel), smoothstep(0.01, 0.50, N.g+0.2 * surfFact)); - } - } - } - - - - // add ice - vec4 ice_texel = texture2D(ice_texture, vec2(waterTex2) * 0.2 ); - - float nSum = 0.5 * (noise_250m + noise_50m); - float mix_factor = smoothstep(1.0 - ice_cover, 1.04-ice_cover, nSum); - finalColor = mix(finalColor, ice_texel, mix_factor * ice_texel.a); - finalColor.a = 1.0; - - - - - - - finalColor *= vec4 (ambient_light.rgb + secondary_light * light_distance_fading(dist), ambient_light.a); - - float lightArg = (terminator-yprime_alt)/100000.0; - vec3 hazeColor = get_hazeColor(lightArg); ; - - - -// Rayleigh color shift due to out-scattering - - float rayleigh_length; - float outscatter; - - if ((quality_level > 5) && (tquality_level > 5)) - { - rayleigh_length = 0.4 * avisibility * (2.5 - 1.9 * air_pollution)/alt_factor(eye_alt, eye_alt+relPos.z); - outscatter = 1.0-exp(-dist/rayleigh_length); - finalColor.rgb = rayleigh_out_shift(finalColor.rgb,outscatter); - } - -// Rayleigh color shift due to in-scattering - - if ((quality_level > 5) && (tquality_level > 5)) - { - float rShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt+420000.0); - //float lightIntensity = length(gl_Color.rgb* gl_FrontMaterial.diffuse.rgb)/1.73 * rShade; - 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) -{ - - -float transmission; -float vAltitude; -float delta_zv; -float H; -float distance_in_layer; -float transmission_arg; - - -// 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 (quality_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 (quality_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, eye_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 -float 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)) ); - } - -// high altitude desaturation of the haze color - -intensity = length(hazeColor); - - -if (intensity > 0.0) // this needs to be a condition, because otherwise hazeColor doesn't come out correctly - { - hazeColor = intensity * normalize (mix(hazeColor, intensity * vec3 (1.0,1.0,1.0), 0.7* smoothstep(5000.0, 50000.0, eye_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)))); - } - - - // 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; -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; - -} diff --git a/Compositor/Shaders/ALS/water.vert b/Compositor/Shaders/ALS/water.vert deleted file mode 100644 index 24ebfcb0e..000000000 --- a/Compositor/Shaders/ALS/water.vert +++ /dev/null @@ -1,299 +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 float flogz; - -varying vec4 waterTex1; -varying vec4 waterTex2; -varying vec4 waterTex4; -varying vec3 relPos; -varying vec3 rawPos; -varying vec2 TopoUV; - -varying vec3 viewerdir; -varying vec3 lightdir; -varying float steepness; - - -varying float earthShade; -varying float yprime_alt; -varying float mie_angle; - -uniform float osg_SimulationTime; -uniform float WindE, WindN; -uniform float hazeLayerAltitude; -uniform float terminator; -uniform float terrain_alt; -uniform float avisibility; -uniform float visibility; -uniform float overcast; -uniform float ground_scattering; - -uniform int ocean_flag; - -uniform mat4 osg_ViewMatrixInverse; - -// constants for the cartesian 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 - - -vec3 specular_light; - -// 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)); -} - - -////fog "include"//////// -// uniform int fogType; -// -// void fog_Func(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) -{ - - mat4 RotationMatrix; - - - vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); - rawPos = (osg_ViewMatrixInverse *gl_ModelViewMatrix * gl_Vertex).xyz; - - vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex; - - viewerdir = vec3(gl_ModelViewMatrixInverse[3]) - vec3(gl_Vertex); - lightdir = normalize(vec3(gl_ModelViewMatrixInverse * gl_LightSource[0].position)); - if (ocean_flag == 1) - {steepness = dot(normalize(gl_Normal), vec3 (0.0, 0.0, 1.0));} - else - {steepness = 0.0;} - - - waterTex4 = vec4( ecPosition.xzy, 0.0 ); - - 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); - gl_Position = ftransform(); - // logarithmic depth - flogz = 1.0 + gl_Position.w; - - -// here start computations for the haze layer - - - float yprime; - float lightArg; - float intensity; - float vertex_alt; - float scattering; - - // 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 = 0.5 + 0.5 * ground_scattering + 0.5* (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_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)); - vec3 lightHorizon = normalize(vec3(lightdir.x,lightdir.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; - - specular_light.b = light_func(lightArg, 1.330e-05, 0.264, 3.827, 1.08e-05, 1.0); - specular_light.g = light_func(lightArg, 3.931e-06, 0.264, 3.827, 7.93e-06, 1.0); - specular_light.r = light_func(lightArg, 8.305e-06, 0.161, 3.827, 3.04e-05, 1.0); - - specular_light = max(specular_light * scattering, vec3 (0.05, 0.05, 0.05)); - - intensity = length(specular_light.rgb); - specular_light.rgb = intensity * normalize(mix(specular_light.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.6,ground_scattering) )); - - specular_light.rgb = intensity * normalize(mix(specular_light.rgb, shadedFogColor, 1.0 -smoothstep(0.5, 0.7,earthShade))); - - // correct ambient light intensity and hue before sunrise - seems unnecessary and create artefacts though... - //if (earthShade < 0.5) - //{ - //specular_light.rgb = intensity * normalize(mix(specular_light.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.7,earthShade) )); - //} - - // directional scattering for low sun - if (lightArg < 10.0) - {mie_angle = (0.5 * dot(normalize(relPos), lightdir) ) + 0.5;} - else - {mie_angle = 1.0;} - - - - - -// 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) - {specular_light = vec3 (1.0, 1.0, 1.0);} - else - { - - lightArg = (terminator/100000.0 - 10.0)/20.0; - specular_light.b = 0.78 + lightArg * 0.21; - specular_light.g = 0.907 + lightArg * 0.091; - specular_light.r = 0.904 + lightArg * 0.092; - } - - specular_light = specular_light * scattering; - - 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); - - specular_light.rgb *= (1.0 + 1.2 * shade_depth); - - yprime_alt = -sqrt(2.0 * EarthRadius * hazeLayerAltitude); - -} - -// Geodesy lookup for depth map - float e2 = abs(1.0 - squash * squash); - float ra2 = 1.0/(a * a); - float e4 = e2 * e2; - float XXpYY = rawPos.x * rawPos.x + rawPos.y * rawPos.y; - float Z = rawPos.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(rawPos.xy); - vec2 NormPosXZ = normalize(vec2(D, rawPos.z)); - float signS = sign(rawPos.y); - if (-0.00015 <= rawPos.y && rawPos.y<=.00015) - signS = 1.0; - float signT = sign(rawPos.z); - if (-0.0002 <= rawPos.z && rawPos.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; - -// - - - - -gl_FrontColor.rgb = specular_light; -gl_BackColor.rgb = gl_FrontColor.rgb; - - -} diff --git a/Compositor/Shaders/Default/3dcloud.frag b/Compositor/Shaders/Default/3dcloud.frag deleted file mode 100644 index 728c8cf92..000000000 --- a/Compositor/Shaders/Default/3dcloud.frag +++ /dev/null @@ -1,17 +0,0 @@ -#version 120 - -uniform sampler2D baseTexture; -varying float fogFactor; -varying vec4 cloudColor; - -void main(void) -{ - vec4 base = texture2D( baseTexture, gl_TexCoord[0].st); - if (base.a < 0.02) - discard; - - vec4 finalColor = base * cloudColor; - gl_FragColor.rgb = mix(gl_Fog.color.rgb, finalColor.rgb, fogFactor ); - gl_FragColor.a = finalColor.a; -} - diff --git a/Compositor/Shaders/Default/3dcloud.vert b/Compositor/Shaders/Default/3dcloud.vert deleted file mode 100644 index 28455e34c..000000000 --- a/Compositor/Shaders/Default/3dcloud.vert +++ /dev/null @@ -1,90 +0,0 @@ -// -*-C++-*- -#version 120 - -varying float fogFactor; -varying vec4 cloudColor; - -uniform float range; // From /sim/rendering/clouds3d-vis-range -uniform float detail_range; // From /sim/rendering/clouds3d_detail-range - -attribute vec3 usrAttr1; -attribute vec3 usrAttr2; - -float shade_factor = usrAttr1.g; -float cloud_height = usrAttr1.b; -float bottom_factor = usrAttr2.r; -float middle_factor = usrAttr2.g; -float top_factor = usrAttr2.b; - -void main(void) -{ - gl_TexCoord[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 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]. 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; - gl_Position.xyz += gl_Vertex.z * w; - // Apply Z scaling to allow sprites to be squashed in the z-axis - gl_Position.z = gl_Position.z * gl_Color.w; - - // Now shift the sprite to the correct position in the cloud. - gl_Position.xyz += gl_Color.xyz; - - // Determine the position - used for fog and shading calculations - float fogCoord = length(vec3(gl_ModelViewMatrix * vec4(gl_Color.x, gl_Color.y, gl_Color.z, 1.0))); - float center_dist = length(vec3(gl_ModelViewMatrix * vec4(0.0,0.0,0.0,1.0))); - - if ((fogCoord > detail_range) && (fogCoord > center_dist) && (shade_factor < 0.7)) { - // More than detail_range away, so discard all sprites on opposite side of - // cloud center by shifting them beyond the view fustrum - gl_Position = vec4(0.0,0.0,10.0,1.0); - cloudColor = vec4(0.0); - } else { - // 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(vec3(gl_ModelViewMatrix * vec4(- gl_Position.x, - gl_Position.y, - gl_Position.z, 0.0)))); - - // Determine the shading of the vertex. We shade it based on it's position - // in the cloud relative to the sun, and it's vertical position in the cloud. - float shade = mix(shade_factor, top_factor, smoothstep(-0.3, 0.3, n)); - //if (n < 0) { - // shade = mix(top_factor, shade_factor, abs(n)); - //} - - if (gl_Position.z < 0.5 * cloud_height) { - shade = min(shade, mix(bottom_factor, middle_factor, gl_Position.z * 2.0 / cloud_height)); - } else { - shade = min(shade, mix(middle_factor, top_factor, gl_Position.z * 2.0 / cloud_height - 1.0)); - } - - // Final position of the sprite - gl_Position = gl_ModelViewProjectionMatrix * gl_Position; - cloudColor = gl_LightSource[0].diffuse * shade + gl_FrontLightModelProduct.sceneColor; - - if ((fogCoord > (0.9 * detail_range)) && (fogCoord > center_dist) && (shade_factor < 0.7)) { - // cloudlet is almost at the detail range, so fade it out. - cloudColor.a = 1.0 - smoothstep(0.9 * detail_range, detail_range, fogCoord); - } else { - // As we get within 100m of the sprite, it is faded out. Equally at large distances it also fades out. - cloudColor.a = min(smoothstep(10.0, 100.0, fogCoord), 1.0 - smoothstep(0.9 * range, range, fogCoord)); - } - - //gl_BackColor = cloudColor; - - // Fog doesn't affect clouds as much as other objects. - fogFactor = exp( -gl_Fog.density * fogCoord * 0.5); - fogFactor = clamp(fogFactor, 0.0, 1.0); - } -} diff --git a/Compositor/Shaders/Default/bowwave.frag b/Compositor/Shaders/Default/bowwave.frag deleted file mode 100644 index f25e0b082..000000000 --- a/Compositor/Shaders/Default/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/Compositor/Shaders/Default/building-default.vert b/Compositor/Shaders/Default/building-default.vert deleted file mode 100644 index 0079abdce..000000000 --- a/Compositor/Shaders/Default/building-default.vert +++ /dev/null @@ -1,135 +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 -#extension GL_EXT_draw_instanced : enable -#define MODE_OFF 0 -#define MODE_DIFFUSE 1 -#define MODE_AMBIENT_AND_DIFFUSE 2 - -attribute vec3 instancePosition; // (x,y,z) -attribute vec3 instanceScale ; // (width, depth, height) -attribute vec3 attrib1; // Generic packed attributes -attribute vec3 attrib2; - -// 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; - -uniform int colorMode; - -////fog "include"//////// -//uniform int fogType; -// -//void fog_Func(int type); -///////////////////////// - -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() -{ - // 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); - - // 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; - - // Rotate the normal. - normal = gl_Normal; - normal.xy = vec2(dot(normal.xy, vec2(cr, sr)), dot(normal.xy, vec2(-sr, cr))); - normal = gl_NormalMatrix * normal; - - vec4 ambient_color, diffuse_color; - if (colorMode == MODE_DIFFUSE) { - diffuse_color = vec4(1.0,1.0,1.0,1.0); - ambient_color = gl_FrontMaterial.ambient; - } else if (colorMode == MODE_AMBIENT_AND_DIFFUSE) { - diffuse_color = vec4(1.0,1.0,1.0,1.0); - ambient_color = vec4(1.0,1.0,1.0,1.0); - } 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 = 1.0; - // 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); - //fog_Func(fogType); -} diff --git a/Compositor/Shaders/Default/building-ubershader.vert b/Compositor/Shaders/Default/building-ubershader.vert deleted file mode 100644 index 6615dffef..000000000 --- a/Compositor/Shaders/Default/building-ubershader.vert +++ /dev/null @@ -1,126 +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; -uniform int rembrandt_enabled; - -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); - - if(rembrandt_enabled < 1){ - gl_FrontColor = gl_FrontMaterial.emission + vec4(1.0) - * (gl_LightModel.ambient + gl_LightSource[0].ambient); - } else { - gl_FrontColor = vec4(1.0); - } - 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/Compositor/Shaders/Default/cloud-static.frag b/Compositor/Shaders/Default/cloud-static.frag deleted file mode 100644 index bac1712e7..000000000 --- a/Compositor/Shaders/Default/cloud-static.frag +++ /dev/null @@ -1,14 +0,0 @@ -#version 120 - -uniform sampler2D baseTexture; -varying float fogFactor; - -vec3 filter_combined (in vec3 color) ; - -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/Compositor/Shaders/Default/cloud-static.vert b/Compositor/Shaders/Default/cloud-static.vert deleted file mode 100644 index 96c2ec80a..000000000 --- a/Compositor/Shaders/Default/cloud-static.vert +++ /dev/null @@ -1,55 +0,0 @@ -// -*-C++-*- -#version 120 - -varying float fogFactor; - - -float shade = 0.8; -float cloud_height = 1000.0; - -void main(void) -{ - - 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); - - gl_Position = vec4(0.0, 0.0, 0.0, 1.0); - gl_Position.x = gl_Vertex.x; - gl_Position.y += gl_Vertex.y; - gl_Position.z += gl_Vertex.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); - - - 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(100.0, 250.0, fogCoord), 1.0 - smoothstep(70000.0, 75000.0, fogCoord)); - gl_BackColor = gl_FrontColor; - - // Fog doesn't affect rain as much as other objects. - fogFactor = exp( -gl_Fog.density * fogCoord * 0.4); - fogFactor = clamp(fogFactor, 0.0, 1.0); -} diff --git a/Compositor/Shaders/Default/clouds-box.frag b/Compositor/Shaders/Default/clouds-box.frag deleted file mode 100644 index 8bf1aa59f..000000000 --- a/Compositor/Shaders/Default/clouds-box.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/Compositor/Shaders/Default/clouds-box.vert b/Compositor/Shaders/Default/clouds-box.vert deleted file mode 100644 index 11b2cbb75..000000000 --- a/Compositor/Shaders/Default/clouds-box.vert +++ /dev/null @@ -1,72 +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; - -void main(void) -{ - - float shade = 0.9; - float cloud_height = 1000.0; - - 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]. 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 * 1.0; - //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(25000.0, 30000.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/Compositor/Shaders/Default/clouds-layered.frag b/Compositor/Shaders/Default/clouds-layered.frag deleted file mode 100644 index 8bf1aa59f..000000000 --- a/Compositor/Shaders/Default/clouds-layered.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/Compositor/Shaders/Default/clouds-layered.vert b/Compositor/Shaders/Default/clouds-layered.vert deleted file mode 100644 index e0e6be78e..000000000 --- a/Compositor/Shaders/Default/clouds-layered.vert +++ /dev/null @@ -1,63 +0,0 @@ -// -*-C++-*- -#version 120 - -varying float fogFactor; - -float shade = 0.4; -float cloud_height = 1000.0; - -void main(void) -{ - - 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 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]. 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 * 1.0;//0.4; - //gl_Position.xyz += gl_Vertex.y * r * wScale; - //gl_Position.xyz += gl_Vertex.z * w * hScale; - gl_Position.xyz += gl_Color.xyz; - - gl_Position.z = gl_Position.z * 0.4; - - // 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(100.0, 300.0, fogCoord), 1.0 - smoothstep(40000.0, 45000.0, fogCoord)); - gl_BackColor = gl_FrontColor; - - // Fog doesn't affect clouds as much as other objects. - fogFactor = exp( -gl_Fog.density * fogCoord * 0.5); - fogFactor = clamp(fogFactor, 0.0, 1.0); -} diff --git a/Compositor/Shaders/Default/clouds-thick.frag b/Compositor/Shaders/Default/clouds-thick.frag deleted file mode 100644 index 8bf1aa59f..000000000 --- a/Compositor/Shaders/Default/clouds-thick.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/Compositor/Shaders/Default/clouds-thick.vert b/Compositor/Shaders/Default/clouds-thick.vert deleted file mode 100644 index d25947f2a..000000000 --- a/Compositor/Shaders/Default/clouds-thick.vert +++ /dev/null @@ -1,63 +0,0 @@ -// -*-C++-*- -#version 120 - -varying float fogFactor; - -float shade = 0.4; -float cloud_height = 1000.0; - -void main(void) -{ - - 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]. 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; - gl_Position.xyz += gl_Vertex.z * w; - //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); - 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(40000.0, 45000.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/Compositor/Shaders/Default/clouds-thin.frag b/Compositor/Shaders/Default/clouds-thin.frag deleted file mode 100644 index 8bf1aa59f..000000000 --- a/Compositor/Shaders/Default/clouds-thin.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/Compositor/Shaders/Default/clouds-thin.vert b/Compositor/Shaders/Default/clouds-thin.vert deleted file mode 100644 index 2cb900d83..000000000 --- a/Compositor/Shaders/Default/clouds-thin.vert +++ /dev/null @@ -1,72 +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; - -void main(void) -{ - - float shade = 0.8; - float cloud_height = 1000.0; - - 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]. 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 * 0.35; - gl_Position.xyz += gl_Vertex.z * w * 0.35; - //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(40000.0, 45000.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/Compositor/Shaders/Default/clouds-thinlayer.frag b/Compositor/Shaders/Default/clouds-thinlayer.frag deleted file mode 100644 index 8bf1aa59f..000000000 --- a/Compositor/Shaders/Default/clouds-thinlayer.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/Compositor/Shaders/Default/clouds-thinlayer.vert b/Compositor/Shaders/Default/clouds-thinlayer.vert deleted file mode 100644 index 75802b752..000000000 --- a/Compositor/Shaders/Default/clouds-thinlayer.vert +++ /dev/null @@ -1,63 +0,0 @@ -// -*-C++-*- -#version 120 - -varying float fogFactor; - -float shade = 0.7; -float cloud_height = 1000.0; - -void main(void) -{ - - 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 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]. 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 * 1.0;//0.4; - //gl_Position.xyz += gl_Vertex.y * r * wScale; - //gl_Position.xyz += gl_Vertex.z * w * hScale; - gl_Position.xyz += gl_Color.xyz; - - gl_Position.z = gl_Position.z * 0.2; - - // 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(100.0, 300.0, fogCoord), 1.0 - smoothstep(40000.0, 45000.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/Compositor/Shaders/Default/crop.frag b/Compositor/Shaders/Default/crop.frag deleted file mode 100644 index fb7a69e3b..000000000 --- a/Compositor/Shaders/Default/crop.frag +++ /dev/null @@ -1,79 +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); -////////////////////// - -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)); - vec4 ambient_light = constantColor + gl_LightSource[0].diffuse * 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/Compositor/Shaders/Default/crop.vert b/Compositor/Shaders/Default/crop.vert deleted file mode 100644 index 9e70bfa6d..000000000 --- a/Compositor/Shaders/Default/crop.vert +++ /dev/null @@ -1,24 +0,0 @@ -#version 120 - -varying vec4 rawpos; -varying vec4 ecPosition; -varying vec3 VNormal; -varying vec3 Normal; -varying vec4 constantColor; - -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(); -} \ No newline at end of file diff --git a/Compositor/Shaders/Default/default.frag b/Compositor/Shaders/Default/default.frag deleted file mode 100644 index 1c3fbaf84..000000000 --- a/Compositor/Shaders/Default/default.frag +++ /dev/null @@ -1,57 +0,0 @@ -// -*-C++-*- - -// Ambient term comes in gl_Color.rgb. -#version 120 - -varying vec4 diffuse_term; -varying vec3 normal; - -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; - 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); - - // 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); - fragColor = color * texel + specular; - - fragColor.rgb = fog_Func(fragColor.rgb, fogType); - gl_FragColor = fragColor; -} \ No newline at end of file diff --git a/Compositor/Shaders/Default/default.vert b/Compositor/Shaders/Default/default.vert deleted file mode 100644 index 1bc240585..000000000 --- a/Compositor/Shaders/Default/default.vert +++ /dev/null @@ -1,61 +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 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; - -uniform int colorMode; - -////fog "include"//////// -//uniform int fogType; -// -//void fog_Func(int type); -///////////////////////// - -void main() -{ - 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); - //fog_Func(fogType); -} diff --git a/Compositor/Shaders/Default/flutter.vert b/Compositor/Shaders/Default/flutter.vert deleted file mode 100644 index 0d07a042f..000000000 --- a/Compositor/Shaders/Default/flutter.vert +++ /dev/null @@ -1,143 +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; - -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); -///////////////////////// - -/////// 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 - vec4 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); - - } diff --git a/Compositor/Shaders/Default/forest.frag b/Compositor/Shaders/Default/forest.frag deleted file mode 100644 index 4d8a7d349..000000000 --- a/Compositor/Shaders/Default/forest.frag +++ /dev/null @@ -1,193 +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 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); - - c1 *= ambient_light; - vec4 finalColor = c1; - - finalColor.rgb = fog_Func(finalColor.rgb, fogType); - gl_FragColor = finalColor; -} diff --git a/Compositor/Shaders/Default/forest.vert b/Compositor/Shaders/Default/forest.vert deleted file mode 100644 index 226ebb141..000000000 --- a/Compositor/Shaders/Default/forest.vert +++ /dev/null @@ -1,34 +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/Compositor/Shaders/Default/include_fog.frag b/Compositor/Shaders/Default/include_fog.frag deleted file mode 100644 index 0ada4dc0e..000000000 --- a/Compositor/Shaders/Default/include_fog.frag +++ /dev/null @@ -1,18 +0,0 @@ -#version 120 - -//#define fog_FuncTION -//varying vec3 PointPos; - -vec3 fog_Func(vec3 color, int type) -{ - //if (type == 0){ - const float LOG2 = 1.442695; - //float fogCoord =length(PointPos); - float fogCoord = gl_ProjectionMatrix[3].z/(gl_FragCoord.z * -2.0 + 1.0 - gl_ProjectionMatrix[2].z); - float fogFactor = exp2(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord * LOG2); - - if(gl_Fog.density == 1.0) - fogFactor=1.0; - - return mix(gl_Fog.color.rgb, color, fogFactor); -} diff --git a/Compositor/Shaders/Default/include_fog.vert b/Compositor/Shaders/Default/include_fog.vert deleted file mode 100644 index 6e3657517..000000000 --- a/Compositor/Shaders/Default/include_fog.vert +++ /dev/null @@ -1,12 +0,0 @@ -#version 120 -//varying float fogCoord; -varying vec3 PointPos; -//varying vec4 EyePos; - -void fog_Func(int type) -{ - PointPos = (gl_ModelViewMatrix * gl_Vertex).xyz; - //PointPos = gl_Vertex; - //EyePos = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0); - //fogCoord = abs(ecPosition.z); -} diff --git a/Compositor/Shaders/Default/landmass-g.vert b/Compositor/Shaders/Default/landmass-g.vert deleted file mode 100644 index 199134a37..000000000 --- a/Compositor/Shaders/Default/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/Compositor/Shaders/Default/landmass.frag b/Compositor/Shaders/Default/landmass.frag deleted file mode 100644 index 6f0c35ef7..000000000 --- a/Compositor/Shaders/Default/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/Compositor/Shaders/Default/landmass.geom b/Compositor/Shaders/Default/landmass.geom deleted file mode 100644 index 41f15b253..000000000 --- a/Compositor/Shaders/Default/landmass.geom +++ /dev/null @@ -1,124 +0,0 @@ -#version 150 -#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. -in vec4 rawposIn[3]; -in vec3 NormalIn[3]; -in vec4 ecPosIn[3]; -in vec3 ecNormalIn[3]; -in vec3 VTangentIn[3]; -in vec3 VBinormalIn[3]; -in vec4 constantColorIn[3]; - -uniform float canopy_height; - -// model position -out vec4 rawpos; -// eye position -out vec4 ecPosition; -// eye space surface matrix -out vec3 VNormal; -out vec3 VTangent; -out vec3 VBinormal; -// model normal -out vec3 Normal; -out vec4 constantColor; -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/Compositor/Shaders/Default/landmass.vert b/Compositor/Shaders/Default/landmass.vert deleted file mode 100644 index 83ea4bc7b..000000000 --- a/Compositor/Shaders/Default/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/Compositor/Shaders/Default/rain-layer.frag b/Compositor/Shaders/Default/rain-layer.frag deleted file mode 100644 index 41c1e4a23..000000000 --- a/Compositor/Shaders/Default/rain-layer.frag +++ /dev/null @@ -1,12 +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/Compositor/Shaders/Default/rain-layer.vert b/Compositor/Shaders/Default/rain-layer.vert deleted file mode 100644 index a0f677297..000000000 --- a/Compositor/Shaders/Default/rain-layer.vert +++ /dev/null @@ -1,56 +0,0 @@ -// -*-C++-*- -#version 120 - -varying float fogFactor; - -uniform float range; // From /sim/rendering/clouds3d-vis-range - -float shade = 0.8; -float cloud_height = 1000.0; - -void main(void) -{ - - 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); - - gl_Position = vec4(0.0, 0.0, 0.0, 1.0); - gl_Position.x = gl_Vertex.x; - gl_Position.y += gl_Vertex.y; - gl_Position.z += gl_Vertex.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); - - - 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(100.0, 250.0, fogCoord), 1.0 - smoothstep(range*0.9, range, fogCoord)); - gl_BackColor = gl_FrontColor; - - // Fog doesn't affect rain as much as other objects. - fogFactor = exp( -gl_Fog.density * fogCoord * 0.4); - fogFactor = clamp(fogFactor, 0.0, 1.0); -} diff --git a/Compositor/Shaders/Default/reflect-bump-spec.frag b/Compositor/Shaders/Default/reflect-bump-spec.frag deleted file mode 100644 index 5245f36ff..000000000 --- a/Compositor/Shaders/Default/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/Compositor/Shaders/Default/reflect-bump-spec.vert b/Compositor/Shaders/Default/reflect-bump-spec.vert deleted file mode 100644 index 45d6f7273..000000000 --- a/Compositor/Shaders/Default/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/Compositor/Shaders/Default/runway.frag b/Compositor/Shaders/Default/runway.frag deleted file mode 100644 index ca7b5ab00..000000000 --- a/Compositor/Shaders/Default/runway.frag +++ /dev/null @@ -1,132 +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 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); -////////////////////// - -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); - - vec4 Diffuse = gl_LightSource[0].diffuse * nDotVP; - //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; - - 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 = fog_Func(fragColor.rgb, fogType); - gl_FragColor = fragColor; -} \ No newline at end of file diff --git a/Compositor/Shaders/Default/terrain-nocolor.frag b/Compositor/Shaders/Default/terrain-nocolor.frag deleted file mode 100644 index 7943cc1a7..000000000 --- a/Compositor/Shaders/Default/terrain-nocolor.frag +++ /dev/null @@ -1,26 +0,0 @@ -// -*-C++-*- -#version 120 - -uniform sampler2D texture; - -////fog "include" ///// -uniform int fogType; - -vec3 fog_Func(vec3 color, int type); -////////////////////// - - -void main() -{ - vec4 color = vec4(1.0, 1.0, 1.0, 1.0); - vec4 texel; - vec4 fragColor; - vec4 finalColor; - - texel = texture2D(texture, gl_TexCoord[0].st); - fragColor = color * texel; - - finalColor.rgb = fog_Func(fragColor.rgb, fogType); - gl_FragColor = finalColor; - -} diff --git a/Compositor/Shaders/Default/transition.frag b/Compositor/Shaders/Default/transition.frag deleted file mode 100644 index 521755f1f..000000000 --- a/Compositor/Shaders/Default/transition.frag +++ /dev/null @@ -1,171 +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; - -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); -////////////////////// - -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; - - 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; - - 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/Compositor/Shaders/Default/transition.vert b/Compositor/Shaders/Default/transition.vert deleted file mode 100644 index fdfade826..000000000 --- a/Compositor/Shaders/Default/transition.vert +++ /dev/null @@ -1,25 +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 vec3 normal; -varying vec3 Vnormal; - -uniform mat4 osg_ViewMatrixInverse; - -void main() - { - RawPosZ = gl_Vertex.z; - WorldPos = (osg_ViewMatrixInverse *gl_ModelViewMatrix * gl_Vertex).xyz; - gl_Position = ftransform(); - gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; - normal = normalize(gl_Normal); - Vnormal = normalize(gl_NormalMatrix * gl_Normal); - } diff --git a/Compositor/Shaders/Default/tree.frag b/Compositor/Shaders/Default/tree.frag deleted file mode 100644 index 30b7ceaa2..000000000 --- a/Compositor/Shaders/Default/tree.frag +++ /dev/null @@ -1,22 +0,0 @@ -#version 120 -uniform sampler2D baseTexture; -//varying float fogFactor; -//varying vec4 PointPos; -//varying vec4 EyePos; - -////fog "include" ///// -uniform int fogType; - -vec3 fog_Func(vec3 color, int type); -////////////////////// - -void main(void) -{ - vec4 base = texture2D( baseTexture, gl_TexCoord[0].st); - if (base.a <= 0.01) - discard; - vec4 fragColor = base * gl_Color; - //gl_FragColor = vec4(mix(gl_Fog.color.rgb, finalColor.rgb, fogFactor ), finalColor.a); - fragColor.rgb = fog_Func(fragColor.rgb, fogType); - gl_FragColor = fragColor; -} diff --git a/Compositor/Shaders/Default/tree.vert b/Compositor/Shaders/Default/tree.vert deleted file mode 100644 index 0f03a4d0e..000000000 --- a/Compositor/Shaders/Default/tree.vert +++ /dev/null @@ -1,52 +0,0 @@ -// Tree instance scheme: -// vertex - local position of quad vertex. -// normal - x y scaling, z number of varieties -// fog coord - rotation -// color - xyz of tree quad origin, replicated 4 times. -#version 120 -//varying float fogCoord; -// varying vec3 PointPos; -//varying vec4 EyePos; -// ////fog "include"//////// -// uniform int fogType; -// -// void fog_Func(int type); -// ///////////////////////// -uniform float season; - -void main(void) -{ - float numVarieties = gl_Normal.z; - float texFract = floor(fract(gl_MultiTexCoord0.x) * numVarieties) / numVarieties; - texFract += floor(gl_MultiTexCoord0.x) / numVarieties; - - // Determine the rotation for the tree. The Fog Coordinate provides rotation information - // to rotate one of the quands by 90 degrees. We then apply an additional position seed - // so that trees aren't all oriented N/S - float sr = sin(gl_FogCoord + gl_Color.x); - float cr = cos(gl_FogCoord + gl_Color.x); - gl_TexCoord[0] = vec4(texFract, gl_MultiTexCoord0.y, 0.0, 0.0); - gl_TexCoord[0].y = gl_TexCoord[0].y + 0.5 * season; - - // scaling - vec3 position = gl_Vertex.xyz * gl_Normal.xxy; - - // Rotation of the generic quad to specific one for the tree. - position.xy = vec2(dot(position.xy, vec2(cr, sr)), dot(position.xy, vec2(-sr, cr))); - position = position + gl_Color.xyz; - gl_Position = gl_ModelViewProjectionMatrix * vec4(position,1.0); - vec3 ecPosition = vec3(gl_ModelViewMatrix * vec4(position, 1.0)); - - float n = dot(normalize(gl_LightSource[0].position.xyz), normalize(-ecPosition)); - - vec3 diffuse = gl_FrontMaterial.diffuse.rgb * max(0.1, n); - vec4 ambientColor = gl_FrontLightModelProduct.sceneColor + gl_LightSource[0].ambient * gl_FrontMaterial.ambient; - gl_FrontColor = ambientColor + gl_LightSource[0].diffuse * vec4(diffuse, 1.0); - - //fogCoord = abs(ecPosition.z); - //fogFactor = exp( -gl_Fog.density * gl_Fog.density * fogCoord * fogCoord); - //fogFactor = clamp(fogFactor, 0.0, 1.0); -// fog_Func(fogType); -// PointPos = ecPosition; - //EyePos = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0); -} diff --git a/Compositor/Shaders/Default/trivial.frag b/Compositor/Shaders/Default/trivial.frag deleted file mode 100644 index e15ff0a53..000000000 --- a/Compositor/Shaders/Default/trivial.frag +++ /dev/null @@ -1,12 +0,0 @@ -// -*-C++-*- -#version 120 - - - -void main() -{ - - gl_FragColor = vec4 (1.0, 1.0, 1.0, 1.0); - - -} diff --git a/Compositor/Shaders/Default/trivial.vert b/Compositor/Shaders/Default/trivial.vert deleted file mode 100644 index f4240d0c6..000000000 --- a/Compositor/Shaders/Default/trivial.vert +++ /dev/null @@ -1,18 +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 - -void main() -{ - gl_Position = ftransform(); -} diff --git a/Compositor/Shaders/Default/trivial_transparent.frag b/Compositor/Shaders/Default/trivial_transparent.frag deleted file mode 100644 index c03ed6e8f..000000000 --- a/Compositor/Shaders/Default/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/Compositor/Shaders/Default/ubershader.frag b/Compositor/Shaders/Default/ubershader.frag deleted file mode 100644 index 1a8507ee4..000000000 --- a/Compositor/Shaders/Default/ubershader.frag +++ /dev/null @@ -1,287 +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); -//////////////////////////////////// - - -//////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); - - vec4 Diffuse = gl_LightSource[0].diffuse * nDotVP; - vec4 Specular = gl_FrontMaterial.specular * gl_LightSource[0].diffuse * pf; - - 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; - - ////////////////////////////////////////////////////////////////////// - // 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/Compositor/Shaders/Default/ubershader.vert b/Compositor/Shaders/Default/ubershader.vert deleted file mode 100644 index 5379107a0..000000000 --- a/Compositor/Shaders/Default/ubershader.vert +++ /dev/null @@ -1,67 +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; -uniform int rembrandt_enabled; - -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; - - if(rembrandt_enabled < 1){ - gl_FrontColor = gl_FrontMaterial.emission + gl_Color - * (gl_LightModel.ambient + gl_LightSource[0].ambient); - } else { - gl_FrontColor = gl_Color; - } - - gl_Position = ftransform(); - gl_ClipVertex = ecPosition; - gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; -} diff --git a/Compositor/Shaders/Default/urban.frag b/Compositor/Shaders/Default/urban.frag deleted file mode 100644 index 057a8b92a..000000000 --- a/Compositor/Shaders/Default/urban.frag +++ /dev/null @@ -1,255 +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); -////////////////////// - -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)); - 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/Compositor/Shaders/Default/urban.vert b/Compositor/Shaders/Default/urban.vert deleted file mode 100644 index c065bc59e..000000000 --- a/Compositor/Shaders/Default/urban.vert +++ /dev/null @@ -1,36 +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 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); -} diff --git a/Compositor/Shaders/Default/wake.vert b/Compositor/Shaders/Default/wake.vert deleted file mode 100644 index d95ba57ec..000000000 --- a/Compositor/Shaders/Default/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/Compositor/Shaders/Default/water-orig.frag b/Compositor/Shaders/Default/water-orig.frag deleted file mode 100644 index 4262ac1c2..000000000 --- a/Compositor/Shaders/Default/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/Compositor/Shaders/Default/water-orig.vert b/Compositor/Shaders/Default/water-orig.vert deleted file mode 100644 index a191481ba..000000000 --- a/Compositor/Shaders/Default/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/Compositor/Shaders/Default/water.frag b/Compositor/Shaders/Default/water.frag deleted file mode 100644 index dfd7f5746..000000000 --- a/Compositor/Shaders/Default/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/Compositor/Shaders/Default/water.vert b/Compositor/Shaders/Default/water.vert deleted file mode 100644 index 40f49be78..000000000 --- a/Compositor/Shaders/Default/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/Compositor/Shaders/Default/water_sine.frag b/Compositor/Shaders/Default/water_sine.frag deleted file mode 100644 index 96538b557..000000000 --- a/Compositor/Shaders/Default/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/Compositor/als.xml b/Compositor/als.xml deleted file mode 100644 index 5ff5869c6..000000000 --- a/Compositor/als.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - ALS - - - color - 2d - screen - screen - rgba8 - - - depth - 2d - screen - screen - depth32f - - - sun-shadowmap-atlas - 2d - /sim/rendering/als/shadows/sun-atlas-size - /sim/rendering/als/shadows/sun-atlas-size - depth32f - clamp-to-border - clamp-to-border - clamp-to-border - linear - linear - 1.0 1.0 1.0 1.0 - true - - - - - - csm0 - 0.1 - 3.0 - - 0.0 - 0.0 - 0.5 - 0.5 - - - - csm1 - 3.0 - 50.0 - - 0.5 - 0.0 - 0.5 - 0.5 - - - - csm2 - 50.0 - 150.0 - - 0.0 - 0.5 - 0.5 - 0.5 - - - - csm3 - 150.0 - 1500.0 - - 0.5 - 0.5 - 0.5 - 0.5 - - - - - forward - scene - als-lighting - - - 128 - 1 - 1 - - - csm0 - csm1 - csm2 - csm3 - - - sun-shadowmap-atlas - 10 - - - - color - color0 - 4 - 4 - - - depth - depth - 4 - 4 - - - - - display - quad - - color - 0 - - - diff --git a/Compositor/default.xml b/Compositor/default.xml index 3e3c5126d..f2a4ce02e 100644 --- a/Compositor/default.xml +++ b/Compositor/default.xml @@ -4,4 +4,4 @@ This Compositor is used by default when none has been specified in the CameraGroup settings. --> - + diff --git a/Compositor/low-spec.xml b/Compositor/low-spec.xml deleted file mode 100644 index 8a22a859b..000000000 --- a/Compositor/low-spec.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - low-spec - - far - scene - 100.0 - - - near - scene - 0xfff7ff - - depth - 100.0 - - diff --git a/Compositor/Effects/ALS/shadow-pass.eff b/Effects/Fallback/classic-shadow.eff similarity index 79% rename from Compositor/Effects/ALS/shadow-pass.eff rename to Effects/Fallback/classic-shadow.eff index 0b049c937..29073f2dc 100644 --- a/Compositor/Effects/ALS/shadow-pass.eff +++ b/Effects/Fallback/classic-shadow.eff @@ -1,8 +1,8 @@ - Effects/ALS/shadow-pass - - als-shadow + Effects/Fallback/classic-shadow + + classic-shadow false 0 0 0 0 diff --git a/Effects/Fallback/legacy-shadow.eff b/Effects/Fallback/legacy-shadow.eff new file mode 100644 index 000000000..29073f2dc --- /dev/null +++ b/Effects/Fallback/legacy-shadow.eff @@ -0,0 +1,19 @@ + + + Effects/Fallback/classic-shadow + + classic-shadow + + false + 0 0 0 0 + back + + false + + + greater + 0.5 + + + + diff --git a/Effects/agriculture.eff b/Effects/agriculture.eff index a5a2c9818..89f9a30af 100644 --- a/Effects/agriculture.eff +++ b/Effects/agriculture.eff @@ -240,12 +240,14 @@ Shaders/terrain-ALS-ultra.vert Shaders/filters-ALS.vert + Shaders/shadows-include.vert Shaders/agriculture-ALS.frag Shaders/cloud-shadowfunc.frag - Shaders/noise.frag - Shaders/hazes.frag - Shaders/secondary_lights.frag + Shaders/noise.frag + Shaders/hazes.frag + Shaders/secondary_lights.frag Shaders/filters-ALS.frag + Shaders/shadows-include.frag grain_strength @@ -760,6 +762,27 @@ 2 + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + lequal diff --git a/Effects/airfield.eff b/Effects/airfield.eff index ea34136ab..1a3bd60f4 100644 --- a/Effects/airfield.eff +++ b/Effects/airfield.eff @@ -139,12 +139,14 @@ Shaders/terrain-ALS-ultra.vert Shaders/filters-ALS.vert + Shaders/shadows-include.vert Shaders/airfield-ALS.frag - Shaders/cloud-shadowfunc.frag - Shaders/noise.frag - Shaders/hazes.frag - Shaders/secondary_lights.frag + Shaders/cloud-shadowfunc.frag + Shaders/noise.frag + Shaders/hazes.frag + Shaders/secondary_lights.frag Shaders/filters-ALS.frag + Shaders/shadows-include.frag visibility @@ -619,6 +621,27 @@ int 2 + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + lequal false diff --git a/Effects/ambient.eff b/Effects/ambient.eff deleted file mode 100644 index d5bd2ad4a..000000000 --- a/Effects/ambient.eff +++ /dev/null @@ -1,94 +0,0 @@ - - - Effects/ambient - - /sim/rendering/rembrandt/ambient-occlusion - /sim/rendering/rembrandt/ambient-occlusion-strength - - - - false - - false - - - 0 - RenderBin - - - 0 - buffer - depth - - - 1 - buffer - normal - - - 2 - buffer - diffuse - - - 3 - buffer - spec-emis - - - 4 - buffer - ao-3 - - - Shaders/fullscreen.vert - Shaders/ambient.frag - - - depth_tex - sampler-2d - 0 - - - normal_tex - sampler-2d - 1 - - - color_tex - sampler-2d - 2 - - - spec_emis_tex - sampler-2d - 3 - - - ao_tex - sampler-2d - 4 - - - ambientOcclusion - bool - ambient-occlusion - - - ambientOcclusionStrength - float - ambient-occlusion-strength - - - - - diff --git a/Effects/bloom-blur-1.eff b/Effects/bloom-blur-1.eff deleted file mode 100644 index 2e5f259f5..000000000 --- a/Effects/bloom-blur-1.eff +++ /dev/null @@ -1,10 +0,0 @@ - - - Effects/bloom-blur-1 - Effects/blur - - 4.0 - 0.0 - bloom-1 - - diff --git a/Effects/bloom-blur-2.eff b/Effects/bloom-blur-2.eff deleted file mode 100644 index a764658b6..000000000 --- a/Effects/bloom-blur-2.eff +++ /dev/null @@ -1,10 +0,0 @@ - - - Effects/bloom-blur-2 - Effects/blur - - 0.0 - 4.0 - bloom-2 - - diff --git a/Effects/bloom-combine.eff b/Effects/bloom-combine.eff deleted file mode 100644 index d07a5b242..000000000 --- a/Effects/bloom-combine.eff +++ /dev/null @@ -1,34 +0,0 @@ - - - Effects/bloom-combine - - - - - - 0 - buffer - spec-emis - - - 1 - buffer - diffuse - - - Shaders/fullscreen.vert - Shaders/bloom-combine.frag - - - spec_emis_tex - sampler-2d - 0 - - - color_tex - sampler-2d - 1 - - - - diff --git a/Effects/blur.eff b/Effects/blur.eff deleted file mode 100644 index b80ddb095..000000000 --- a/Effects/blur.eff +++ /dev/null @@ -1,37 +0,0 @@ - - - Effects/blur - - 0.0 - 0.0 - - - - - - 0 - buffer - buffer-name - - - Shaders/fullscreen.vert - Shaders/blur.frag - - - input_tex - sampler-2d - 0 - - - blurOffset_x - float - blurOffset_x - - - blurOffset_y - float - blurOffset_y - - - - diff --git a/Effects/chute.eff b/Effects/chute.eff index f991365d2..163322f6d 100644 --- a/Effects/chute.eff +++ b/Effects/chute.eff @@ -74,11 +74,13 @@ Shaders/chute-ALS.vert + Shaders/shadows-include.vert Shaders/model-ALS-base.frag Shaders/hazes.frag Shaders/secondary_lights.frag Shaders/noise.frag Shaders/filters-ALS.frag + Shaders/shadows-include.frag visibility @@ -325,6 +327,27 @@ int tquality_level + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + diff --git a/Effects/cliffs.eff b/Effects/cliffs.eff index e9fcaa4ec..373f097dc 100644 --- a/Effects/cliffs.eff +++ b/Effects/cliffs.eff @@ -89,12 +89,14 @@ Shaders/terrain-ALS-ultra.vert Shaders/filters-ALS.vert + Shaders/shadows-include.vert Shaders/cliffs-ALS.frag Shaders/cloud-shadowfunc.frag - Shaders/noise.frag - Shaders/hazes.frag - Shaders/secondary_lights.frag - Shaders/filters-ALS.frag + Shaders/noise.frag + Shaders/hazes.frag + Shaders/secondary_lights.frag + Shaders/filters-ALS.frag + Shaders/shadows-include.frag intrinsic_wetness diff --git a/Effects/crop.eff b/Effects/crop.eff index 5e7d265fa..961b44163 100644 --- a/Effects/crop.eff +++ b/Effects/crop.eff @@ -25,10 +25,6 @@ /sim/rendering/shaders/quality-level /sim/rendering/shaders/crop - - 0.0 - /sim/rendering/rembrandt/enabled - 2.0 @@ -89,8 +85,10 @@ Shaders/crop.vert - Shaders/include_fog.frag + Shaders/shadows-include.vert + Shaders/include_fog.frag Shaders/crop.frag + Shaders/shadows-include.frag NoiseTex @@ -112,6 +110,27 @@ float snow-level + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + diff --git a/Effects/default-pipeline.xml b/Effects/default-pipeline.xml deleted file mode 100644 index c6c641505..000000000 --- a/Effects/default-pipeline.xml +++ /dev/null @@ -1,428 +0,0 @@ - - - - - depth - - - false - /sim/rendering/rembrandt/use-color-for-depth - - - depth-component32 - depth-component - float - screen - screen - 1.0 - clamp-to-border - - - real-depth - - - true - /sim/rendering/rembrandt/use-color-for-depth - - - depth-component32 - depth-component - float - screen - screen - 1.0 - clamp-to-border - - - depth - - - true - /sim/rendering/rembrandt/use-color-for-depth - - - rgba8 - rgba - unsigned-byte - screen - screen - 1.0 - clamp-to-border - - - normal - - - true - /sim/rendering/rembrandt/no-16bit-buffer - - - rgba8 - rgba - unsigned-byte - screen - screen - 1.0 - clamp-to-border - - - normal - - - false - /sim/rendering/rembrandt/no-16bit-buffer - - - rg16 - rg - unsigned-short - screen - screen - 1.0 - clamp-to-border - - - shadow - depth-component32 - depth-component - float - /sim/rendering/shadows/map-size - /sim/rendering/shadows/map-size - 1.0 - true - luminance - 1.0 1.0 1.0 1.0 - clamp-to-border - - - diffuse - rgba8 - rgba - unsigned-byte - screen - screen - 1.0 - clamp-to-border - - - spec-emis - rgba8 - rgba - unsigned-byte - screen - screen - 1.0 - clamp-to-border - - - ao-1 - - /sim/rendering/rembrandt/ambient-occlusion-buffers - - rgba8 - rgba - unsigned-byte - screen - screen - 0.25 - clamp-to-border - - - ao-2 - - /sim/rendering/rembrandt/ambient-occlusion-buffers - - rgba8 - rgba - unsigned-byte - screen - screen - 0.25 - clamp-to-border - - - ao-3 - - /sim/rendering/rembrandt/ambient-occlusion-buffers - - rgba8 - rgba - unsigned-byte - screen - screen - 0.25 - clamp-to-border - - - lighting - rgba8 - rgba - unsigned-byte - screen - screen - 1.0 - clamp-to-border - - - bloom-1 - - /sim/rendering/rembrandt/bloom-buffers - - rgba8 - rgba - unsigned-byte - screen - screen - 0.25 - clamp-to-border - - - bloom-2 - - /sim/rendering/rembrandt/bloom-buffers - - rgba8 - rgba - unsigned-byte - screen - screen - 0.25 - clamp-to-border - - - bloom-3 - - /sim/rendering/rembrandt/bloom-buffers - - rgba8 - rgba - unsigned-byte - screen - screen - 0.25 - clamp-to-border - - - - - geometry - 0 - - depth - depth - - - false - /sim/rendering/rembrandt/use-color-for-depth - - - - - depth - real-depth - - - true - /sim/rendering/rembrandt/use-color-for-depth - - - - - color3 - depth - - - true - /sim/rendering/rembrandt/use-color-for-depth - - - - - - color0 - normal - - - color1 - diffuse - - - color2 - spec-emis - - - - shadow - 1 - - depth - shadow - - - - ssao-1 - fullscreen - - /sim/rendering/rembrandt/ambient-occlusion-buffers - - 2 - Effects/ssao - true - 0.25 - - color0 - ao-1 - - - - ssao-2 - fullscreen - - /sim/rendering/rembrandt/ambient-occlusion-buffers - - 3 - Effects/ssao-blur-1 - 0.25 - - color0 - ao-2 - - - - ssao-3 - fullscreen - - /sim/rendering/rembrandt/ambient-occlusion-buffers - - 4 - Effects/ssao-blur-2 - 0.25 - - color0 - ao-3 - - - - lighting - 50 - - depth - depth - - - false - /sim/rendering/rembrandt/use-color-for-depth - - - - - depth - real-depth - - - true - /sim/rendering/rembrandt/use-color-for-depth - - - - - color0 - lighting - - - - sky-clouds - /sim/rendering/rembrandt/debug/lighting/sky - - - ambient - fullscreen - Effects/ambient - 1 - /sim/rendering/rembrandt/debug/lighting/ambient - - - sunlight - fullscreen - Effects/sunlight - 2 - /sim/rendering/rembrandt/debug/lighting/sunlight - - - fog - fullscreen - Effects/fog - 3 - /sim/rendering/rembrandt/debug/lighting/fog - - - lights - 4 - /sim/rendering/rembrandt/debug/lighting/lights - - - - - - bloom-1 - fullscreen - - /sim/rendering/rembrandt/bloom-buffers - - 60 - Effects/bloom-combine - 0.25 - - color0 - bloom-1 - - - - bloom-2 - fullscreen - - /sim/rendering/rembrandt/bloom-buffers - - 61 - Effects/bloom-blur-1 - 0.25 - - color0 - bloom-2 - - - - bloom-3 - fullscreen - - /sim/rendering/rembrandt/bloom-buffers - - 62 - Effects/bloom-blur-2 - 0.25 - - color0 - bloom-3 - - - - - display - 99 - Effects/display - - diff --git a/Effects/dirt-runway.eff b/Effects/dirt-runway.eff index 5c09702b2..333fc3776 100644 --- a/Effects/dirt-runway.eff +++ b/Effects/dirt-runway.eff @@ -140,12 +140,14 @@ Shaders/terrain-ALS-ultra.vert Shaders/filters-ALS.vert + Shaders/shadows-include.vert Shaders/drunway-ALS.frag - Shaders/cloud-shadowfunc.frag - Shaders/noise.frag - Shaders/hazes.frag - Shaders/secondary_lights.frag - Shaders/filters-ALS.frag + Shaders/cloud-shadowfunc.frag + Shaders/noise.frag + Shaders/hazes.frag + Shaders/secondary_lights.frag + Shaders/filters-ALS.frag + Shaders/shadows-include.frag visibility @@ -655,6 +657,27 @@ 2 + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + lequal diff --git a/Effects/display.eff b/Effects/display.eff deleted file mode 100644 index 3aaa20cc6..000000000 --- a/Effects/display.eff +++ /dev/null @@ -1,394 +0,0 @@ - - - Effects/display - - /sim/rendering/rembrandt/show-buffers - /sim/rendering/rembrandt/bloom - /sim/rendering/rembrandt/bloom-strength - /sim/rendering/rembrandt/bloom-buffers - - Textures\noise_tex.jpg - linear-mipmap-linear - repeat - repeat - normalized - - - Textures\film-dirt.png - linear-mipmap-linear - repeat - repeat - normalized - - - - /sim/rendering/rembrandt/cinema/vignette - /sim/rendering/rembrandt/cinema/inner-circle - /sim/rendering/rembrandt/cinema/outer-circle - /sim/rendering/rembrandt/cinema/color-shift - /sim/rendering/rembrandt/cinema/red-shift - /sim/rendering/rembrandt/cinema/green-shift - /sim/rendering/rembrandt/cinema/blue-shift - /sim/rendering/rembrandt/cinema/distortion - /sim/rendering/rembrandt/cinema/distortion-factor - /sim/rendering/rembrandt/cinema/color-fringe - /sim/rendering/rembrandt/cinema/color-fringe-factor - /sim/rendering/rembrandt/cinema/film-wear - - - /sim/rendering/rembrandt/debug-buffer[0]/enabled - /sim/rendering/rembrandt/debug-buffer[0]/name - /sim/rendering/rembrandt/debug-buffer[1]/enabled - /sim/rendering/rembrandt/debug-buffer[1]/name - /sim/rendering/rembrandt/debug-buffer[2]/enabled - /sim/rendering/rembrandt/debug-buffer[2]/name - /sim/rendering/rembrandt/debug-buffer[3]/enabled - /sim/rendering/rembrandt/debug-buffer[3]/name - - - - - /sim/rendering/rembrandt/night-vision - - 0.0 - /sim/rendering/rembrandt/show-buffers - - - - - - 99999 - RenderBin - - - 0 - buffer - lighting - - - 1 - buffer - bloom-3 - - - 2 - buffer - spec-emis - - - 3 - buffer - diffuse - - - 4 - texture[0]/image - texture[0]/filter - texture[0]/wrap-s - texture[0]/wrap-t - texture[0]/internal-format - - - - Shaders/fullscreen.vert - Shaders/night-vision.frag - - - lighting_tex - sampler-2d - 0 - - - bloom_tex - sampler-2d - 1 - - - spec_emis_tex - sampler-2d - 2 - - - color_tex - sampler-2d - 3 - - - noise_tex - sampler-2d - 4 - - - - bloomEnabled - bool - bloom - - - bloomStrength - float - bloom-strength - - - bloomBuffers - bool - bloom-buffers - - - - - - - - /sim/rendering/rembrandt/cinema/vignette - /sim/rendering/rembrandt/cinema/color-shift - /sim/rendering/rembrandt/cinema/distortion - - - 0.0 - /sim/rendering/rembrandt/show-buffers - - - - - - 99999 - RenderBin - - - 0 - buffer - lighting - - - 1 - buffer - bloom-3 - - - 2 - texture[1]/image - texture[1]/filter - texture[1]/wrap-s - texture[1]/wrap-t - texture[1]/internal-format - - - - Shaders/fullscreen.vert - Shaders/cinema.frag - - - lighting_tex - sampler-2d - 0 - - - bloom_tex - sampler-2d - 1 - - - film_tex - sampler-2d - 2 - - - - bloomEnabled - bool - bloom - - - bloomStrength - float - bloom-strength - - - bloomBuffers - bool - bloom-buffers - - - - vignette - bool - cinema/vignette - - - innerCircle - float - cinema/inner-circle - - - outerCircle - float - cinema/outer-circle - - - colorShift - bool - cinema/color-shift - - - redShift - float-vec3 - cinema/red-shift - - - greenShift - float-vec3 - cinema/green-shift - - - blueShift - float-vec3 - cinema/blue-shift - - - - distortion - bool - cinema/distortion - - - distortionFactor - float-vec3 - cinema/distortion-factor - - - - colorFringe - bool - cinema/color-fringe - - - colorFringeFactor - float - cinema/color-fringe-factor - - - - filmWear - bool - cinema/film-wear - - - - - - - 99999 - RenderBin - - - 0 - buffer - lighting - - - 1 - buffer - bloom-3 - - - - 2 - buffer - buffer-nw-name - - - 3 - buffer - buffer-ne-name - - - 4 - buffer - buffer-sw-name - - - 5 - buffer - buffer-se-name - - - - Shaders/fullscreen.vert - Shaders/display.frag - - - lighting_tex - sampler-2d - 0 - - - bloom_tex - sampler-2d - 1 - - - bufferNW_tex - sampler-2d - 2 - - - bufferNE_tex - sampler-2d - 3 - - - bufferSW_tex - sampler-2d - 4 - - - bufferSE_tex - sampler-2d - 5 - - - showBuffers - bool - show-buffers - - - - bufferNW_enabled - bool - buffer-nw-enabled - - - bufferNE_enabled - bool - buffer-ne-enabled - - - bufferSW_enabled - bool - buffer-sw-enabled - - - bufferSE_enabled - bool - buffer-se-enabled - - - - bloomEnabled - bool - bloom - - - bloomStrength - float - bloom-strength - - - bloomBuffers - bool - bloom-buffers - - - - diff --git a/Effects/flutter.eff b/Effects/flutter.eff index f3b3bb642..2f965b850 100644 --- a/Effects/flutter.eff +++ b/Effects/flutter.eff @@ -145,10 +145,12 @@ Shaders/flutter-ALS.vert + Shaders/shadows-include.vert Shaders/terrain-ALS-base.frag Shaders/hazes.frag Shaders/noise.frag Shaders/filters-ALS.frag + Shaders/shadows-include.frag colorMode @@ -299,7 +301,28 @@ int display_ysize - + + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + @@ -406,8 +429,10 @@ Shaders/flutter.vert + Shaders/shadows-include.vert Shaders/include_fog.frag Shaders/default.frag + Shaders/shadows-include.frag + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + diff --git a/Effects/fog.eff b/Effects/fog.eff deleted file mode 100644 index b35de4b16..000000000 --- a/Effects/fog.eff +++ /dev/null @@ -1,78 +0,0 @@ - - - Effects/fog - - - false - - false - - - src-alpha - one-minus-src-alpha - - - 1 - RenderBin - - - 0 - buffer - depth - - - 1 - buffer - normal - - - 2 - buffer - diffuse - - - 3 - buffer - spec-emis - - - Shaders/fog.vert - Shaders/fog.frag - Shaders/gbuffer-functions.frag - - - depth_tex - sampler-2d - 0 - - - normal_tex - sampler-2d - 1 - - - color_tex - sampler-2d - 2 - - - spec_emis_tex - sampler-2d - 3 - - - - - - diff --git a/Effects/forest.eff b/Effects/forest.eff index 1405c9eca..f4737cd04 100644 --- a/Effects/forest.eff +++ b/Effects/forest.eff @@ -75,10 +75,6 @@ /sim/rendering/shaders/quality-level /sim/rendering/shaders/transition - - 0.0 - /sim/rendering/rembrandt/enabled - 2.0 @@ -162,8 +158,10 @@ Shaders/forest.vert + Shaders/shadows-include.vert Shaders/include_fog.frag Shaders/forest.frag + Shaders/shadows-include.frag tangent 6 @@ -277,6 +275,27 @@ + + + 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 77baa46c7..287ecc642 100644 --- a/Effects/glacier.eff +++ b/Effects/glacier.eff @@ -75,10 +75,6 @@ /sim/rendering/shaders/quality-level /sim/rendering/shaders/transition - - 0.0 - /sim/rendering/rembrandt/enabled - 2.0 @@ -162,8 +158,10 @@ Shaders/forest.vert + Shaders/shadows-include.vert Shaders/include_fog.frag Shaders/forest.frag + Shaders/shadows-include.frag tangent 6 @@ -277,6 +275,27 @@ + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + diff --git a/Effects/grass.eff b/Effects/grass.eff old mode 100755 new mode 100644 index d01d89ba1..34898b1b1 --- a/Effects/grass.eff +++ b/Effects/grass.eff @@ -39,10 +39,6 @@ 1.0 /sim/rendering/shaders/vegetation-effects - - 0.0 - /sim/rendering/rembrandt/enabled - 2.0 @@ -136,12 +132,14 @@ Shaders/terrain-ALS-ultra.vert Shaders/filters-ALS.vert + Shaders/shadows-include.vert Shaders/airfield-ALS.frag Shaders/cloud-shadowfunc.frag Shaders/noise.frag Shaders/hazes.frag Shaders/secondary_lights.frag Shaders/filters-ALS.frag + Shaders/shadows-include.frag visibility @@ -616,6 +614,27 @@ int 2 + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + lequal false @@ -663,6 +682,7 @@ Shaders/grass-ALS.frag Shaders/noise.frag Shaders/filters-ALS.frag + Shaders/shadows-include.frag 96 triangles triangle-strip @@ -812,6 +832,27 @@ int wind_effects + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + true diff --git a/Effects/herbtundra.eff b/Effects/herbtundra.eff index 6a13b6f61..d1834bcc4 100644 --- a/Effects/herbtundra.eff +++ b/Effects/herbtundra.eff @@ -76,10 +76,6 @@ /sim/rendering/shaders/quality-level /sim/rendering/shaders/transition - - 0.0 - /sim/rendering/rembrandt/enabled - 2.0 @@ -162,8 +158,10 @@ Shaders/forest.vert + Shaders/shadows-include.vert Shaders/include_fog.frag Shaders/forest.frag + Shaders/shadows-include.frag tangent 6 @@ -277,6 +275,27 @@ + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + diff --git a/Effects/landmass.eff b/Effects/landmass.eff index 3198ff71f..107c3bef8 100644 --- a/Effects/landmass.eff +++ b/Effects/landmass.eff @@ -54,10 +54,6 @@ 4.0 /sim/rendering/shaders/landmass - - 0.0 - /sim/rendering/rembrandt/enabled - 2.0 @@ -388,10 +384,6 @@ /sim/rendering/shaders/quality-level /sim/rendering/shaders/landmass - - 0.0 - /sim/rendering/rembrandt/enabled - 2.0 diff --git a/Effects/light-point.eff b/Effects/light-point.eff index 3d1f74814..0b9996e02 100644 --- a/Effects/light-point.eff +++ b/Effects/light-point.eff @@ -1,107 +1,8 @@ + Effects/light-point - - - - - false - false - - front - - 2 - RenderBin - - - one - one - - - 0 - buffer - depth - - - 1 - buffer - normal - - - 2 - buffer - diffuse - - - 3 - buffer - spec-emis - - - Shaders/light-spot.vert - Shaders/light-point.frag - Shaders/gbuffer-functions.frag - - attenuation - 12 - - - - depth_tex - sampler-2d - 0 - - - normal_tex - sampler-2d - 1 - - - color_tex - sampler-2d - 2 - - - spec_emis_tex - sampler-2d - 3 - - - LightPosition - float-vec4 - position - true - - - Ambient - float-vec4 - ambient - - - Diffuse - float-vec4 - diffuse - - - Specular - float-vec4 - specular - - - Attenuation - float-vec3 - attenuation - - - Near - float - near - - - Far - float - far - - - diff --git a/Effects/light-spot.eff b/Effects/light-spot.eff index 2b8630e52..549f6d8ea 100644 --- a/Effects/light-spot.eff +++ b/Effects/light-spot.eff @@ -1,128 +1,8 @@ + Effects/light-spot - - - - - false - false - - front - - 2 - RenderBin - - - one - one - - - 0 - buffer - depth - - - 1 - buffer - normal - - - 2 - buffer - diffuse - - - 3 - buffer - spec-emis - - - Shaders/light-spot.vert - Shaders/light-spot.frag - Shaders/gbuffer-functions.frag - - attenuation - 12 - - - - depth_tex - sampler-2d - 0 - - - normal_tex - sampler-2d - 1 - - - color_tex - sampler-2d - 2 - - - spec_emis_tex - sampler-2d - 3 - - - LightPosition - float-vec4 - position - true - - - LightDirection - float-vec4 - direction - true - - - Ambient - float-vec4 - ambient - - - Diffuse - float-vec4 - diffuse - - - Specular - float-vec4 - specular - - - Attenuation - float-vec3 - attenuation - - - Exponent - float - exponent - - - Cutoff - float - cutoff - - - CosCutoff - float - cosCutoff - - - Near - float - near - - - Far - float - far - - - diff --git a/Effects/model-combined-deferred.eff b/Effects/model-combined-deferred.eff index f4e0a87ff..37968b334 100644 --- a/Effects/model-combined-deferred.eff +++ b/Effects/model-combined-deferred.eff @@ -1,607 +1,9 @@ - Effects/model-combined-deferred Effects/model-combined - - - - - /sim/rendering/shaders/model - /sim/rendering/rembrandt/enabled - - - 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/ubershader-gbuffer.frag - Shaders/gbuffer-functions.frag - Shaders/gbuffer-encode.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 - - - - - - - - rembrandt_enabled - int - - rembrandt - - - - - \ No newline at end of file + diff --git a/Effects/model-combined-transparent.eff b/Effects/model-combined-transparent.eff index ad8ea1a57..936fb32d5 100644 --- a/Effects/model-combined-transparent.eff +++ b/Effects/model-combined-transparent.eff @@ -112,581 +112,4 @@ and fallback to plain transparency when the model shader is disabled. --> - - - - - - /sim/rendering/shaders/model - /sim/rendering/rembrandt/enabled - - - 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 - - - rendering-hint - - - transparent - - - transparent - - - 111 - DepthSortedBin - - - - 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/include_fog.frag - Shaders/ubershader.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 - - - - - rembrandt_enabled - int - - rembrandt - - - - diff --git a/Effects/model-combined.eff b/Effects/model-combined.eff index fc8b9c895..1ffb95bbb 100644 --- a/Effects/model-combined.eff +++ b/Effects/model-combined.eff @@ -193,7 +193,6 @@ please see Docs/README.model-combined.eff for documentation /local-weather/cloud-shadows/cloudpos-x[19] /local-weather/cloud-shadows/cloudpos-y[19] /local-weather/cloud-shadows/cloud-shadow-flag - /sim/rendering/rembrandt/enabled 0 @@ -443,12 +442,14 @@ please see Docs/README.model-combined.eff for documentation Shaders/model-ALS-ultra.vert + Shaders/shadows-include.vert Shaders/model-ALS-ultra.frag Shaders/cloud-shadowfunc.frag Shaders/hazes.frag Shaders/secondary_lights.frag Shaders/noise.frag Shaders/filters-ALS.frag + Shaders/shadows-include.frag @@ -1268,14 +1269,28 @@ please see Docs/README.model-combined.eff for documentation - - - rembrandt_enabled - int - - rembrandt - - + + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + @@ -1497,8 +1512,10 @@ please see Docs/README.model-combined.eff for documentation Shaders/ubershader.vert + Shaders/shadows-include.vert Shaders/include_fog.frag Shaders/ubershader.frag + Shaders/shadows-include.frag @@ -1848,13 +1865,27 @@ please see Docs/README.model-combined.eff for documentation - - rembrandt_enabled - int - - rembrandt - - + + + 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 1ad02e801..be34c6906 100644 --- a/Effects/model-default.eff +++ b/Effects/model-default.eff @@ -57,6 +57,14 @@ /sim/rendering/shaders/landmass /sim/rendering/shaders/transition + + + /sim/rendering/shadows/enabled + + + /sim/rendering/shadows/sun-atlas-size + + @@ -122,11 +130,13 @@ Shaders/generic-ALS-base.vert + Shaders/shadows-include.vert Shaders/model-ALS-base.frag Shaders/hazes.frag Shaders/secondary_lights.frag Shaders/noise.frag Shaders/filters-ALS.frag + Shaders/shadows-include.frag visibility @@ -353,81 +363,30 @@ int tquality_level + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + - - - - /sim/rendering/rembrandt/enabled - - - 2.0 - - - - GL_ARB_shader_objects - GL_ARB_shading_language_100 - GL_ARB_vertex_shader - GL_ARB_fragment_shader - - - - - - false - - material/ambient - material/diffuse - material/specular - material/emissive - material/shininess - ambient-and-diffuse - - false - true - smooth - cull-face - - 1 - RenderBin - - - 0 - texture[0]/type - texture[0]/image - texture[0]/filter - texture[0]/wrap-s - texture[0]/wrap-t - - texture[0]/internal-format - - - modulate - - - - vertex-program-two-side - - - Shaders/deferred-gbuffer.vert - Shaders/deferred-gbuffer.frag - Shaders/gbuffer-functions.frag - Shaders/gbuffer-encode.frag - - - texture - sampler-2d - 0 - - - - - @@ -525,8 +484,10 @@ Shaders/default.vert + Shaders/shadows-include.vert Shaders/include_fog.frag Shaders/default.frag + Shaders/shadows-include.frag @@ -584,6 +545,27 @@ material/color-mode-uniform + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + diff --git a/Effects/model-wingflex.eff b/Effects/model-wingflex.eff index c6c3babb5..3e295696b 100644 --- a/Effects/model-wingflex.eff +++ b/Effects/model-wingflex.eff @@ -200,7 +200,6 @@ /local-weather/cloud-shadows/cloudpos-x[19] /local-weather/cloud-shadows/cloudpos-y[19] /local-weather/cloud-shadows/cloud-shadow-flag - /sim/rendering/rembrandt/enabled 0 @@ -450,12 +449,14 @@ Shaders/model-ALS-wingflex.vert - Shaders/model-ALS-ultra.frag + Shaders/shadows-include.vert + Shaders/model-ALS-ultra.frag Shaders/cloud-shadowfunc.frag Shaders/hazes.frag Shaders/secondary_lights.frag Shaders/noise.frag Shaders/filters-ALS.frag + Shaders/shadows-include.frag @@ -1303,14 +1304,28 @@ - - rembrandt_enabled - int - - rembrandt - - - + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + + @@ -1531,9 +1546,11 @@ Shaders/ubershader.vert - Shaders/include_fog.frag + Shaders/shadows-include.vert + Shaders/include_fog.frag Shaders/ubershader.frag - + Shaders/shadows-include.frag + BaseTex @@ -1882,13 +1899,27 @@ - - rembrandt_enabled - int - - rembrandt - - + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + diff --git a/Effects/road.eff b/Effects/road.eff index 42cae761e..dd3869ca8 100644 --- a/Effects/road.eff +++ b/Effects/road.eff @@ -307,12 +307,14 @@ Shaders/model-ALS-ultra.vert + Shaders/shadows-include.vert Shaders/road-ALS-ultra.frag Shaders/cloud-shadowfunc.frag Shaders/hazes.frag Shaders/secondary_lights.frag Shaders/noise.frag Shaders/filters-ALS.frag + Shaders/shadows-include.frag tangent 6 @@ -1070,7 +1072,27 @@ display_ysize - + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + diff --git a/Effects/rock.eff b/Effects/rock.eff index b24f14a70..3d0bd0b74 100644 --- a/Effects/rock.eff +++ b/Effects/rock.eff @@ -89,12 +89,14 @@ Shaders/terrain-ALS-ultra.vert Shaders/filters-ALS.vert + Shaders/shadows-include.vert Shaders/rock-ALS.frag Shaders/cloud-shadowfunc.frag Shaders/noise.frag Shaders/hazes.frag Shaders/secondary_lights.frag Shaders/filters-ALS.frag + Shaders/shadows-include.frag intrinsic_wetness @@ -579,6 +581,27 @@ 2 + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + lequal diff --git a/Effects/runway.eff b/Effects/runway.eff index e7e2e4af2..60181bef2 100644 --- a/Effects/runway.eff +++ b/Effects/runway.eff @@ -204,13 +204,15 @@ Shaders/terrain-ALS-ultra.vert Shaders/filters-ALS.vert + Shaders/shadows-include.vert Shaders/runway-ALS.frag - Shaders/cloud-shadowfunc.frag - Shaders/noise.frag - Shaders/hazes.frag - Shaders/secondary_lights.frag - Shaders/filters-ALS.frag - Shaders/lightspot-ALS.frag + Shaders/cloud-shadowfunc.frag + Shaders/noise.frag + Shaders/hazes.frag + Shaders/secondary_lights.frag + Shaders/filters-ALS.frag + Shaders/lightspot-ALS.frag + Shaders/shadows-include.frag visibility @@ -852,6 +854,27 @@ 2 + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + - - - - - 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 - - false - - - material/ambient - - - material/diffuse - - - material/specular - - - material/emissive - - - material/shininess - - ambient-and-diffuse - - back - - Shaders/runway-gbuffer.vert - Shaders/runway-gbuffer.frag - Shaders/gbuffer-functions.frag - Shaders/gbuffer-encode.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 - - - - @@ -1354,8 +1042,10 @@ Shaders/reflect-bump-spec.vert - Shaders/include_fog.frag + Shaders/shadows-include.vert + Shaders/include_fog.frag Shaders/runway.frag + Shaders/shadows-include.frag tangent 6 diff --git a/Effects/schemes.xml b/Effects/schemes.xml index 4f2de8bd5..aeb1e3feb 100644 --- a/Effects/schemes.xml +++ b/Effects/schemes.xml @@ -1,7 +1,7 @@ - als-shadow - Effects/ALS/shadow-pass + classic-shadow + Effects/Fallback/classic-shadow diff --git a/Effects/shadow-vol.eff b/Effects/shadow-vol.eff index fbf7dc5df..92ef4316c 100644 --- a/Effects/shadow-vol.eff +++ b/Effects/shadow-vol.eff @@ -1,357 +1,8 @@ + - Effects/shadow - - - - white - - false - - 1 - - - 0 - - /environment/ground-visibility-m - /environment/visibility-m - /environment/ground-haze-thickness-m - /rendering/scene/scattering - /environment/surface/scattering - /environment/terminator-relative-position-m - /environment/mean-terrain-elevation-m - /rendering/scene/overcast - /sim/rendering/eye-altitude-m - /environment/cloud-self-shading - /environment/moonlight - /position/altitude-agl-m - /orientation/model/pitch-deg - /orientation/model/roll-deg - 0.5 - - - - - - - /sim/rendering/shaders/skydome - - - 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 - - 10 - DepthSortedBin - - rendering-hint - - 0 - texture[0]/type - texture[0]/image - texture[0]/filter - texture[0]/wrap-s - texture[0]/wrap-t - - - Shaders/shadow-vol-ALS.vert - Shaders/shadow-ALS.frag - - - hazeLayerAltitude - float - lthickness - - - scattering - float - scattering - - - terminator - float - terminator - - - ground_scattering - float - ground_scattering - - - terrain_alt - float - terrain_alt - - - overcast - float - overcast - - - eye_alt - float - eye_alt - - - moonlight - float - moonlight - - - alt_agl - float - alt_agl - - - pitch - float - model-pitch - - - roll - float - model-roll - - - gear_clearance - float - gear_clearance - - - lequal - true - - 0 0 0 0 - - - - true - - material/active - material/ambient - material/diffuse - material/specular - material/emissive - material/shininess - material/color-mode - - - blend/active - blend/source - blend/destination - - shade-model - back - - 10 - DepthSortedBin - - rendering-hint - - 0 - texture[0]/type - texture[0]/image - texture[0]/filter - texture[0]/wrap-s - texture[0]/wrap-t - - - Shaders/shadow-vol-ALS.vert - Shaders/shadow-ALS.frag - - - visibility - float - visibility - - - avisibility - float - avisibility - - - hazeLayerAltitude - float - lthickness - - - scattering - float - scattering - - - terminator - float - terminator - - - ground_scattering - float - ground_scattering - - - terrain_alt - float - terrain_alt - - - overcast - float - overcast - - - eye_alt - float - eye_alt - - - cloud_self_shading - float - cloud_self_shading - - - moonlight - float - moonlight - - - alt_agl - float - alt_agl - - - pitch - float - model-pitch - - - roll - float - model-roll - - - gear_clearance - float - gear_clearance - - - lequal - true - - - - - - - - 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 - - - - - + Effects/shadow-vol diff --git a/Effects/shadow.eff b/Effects/shadow.eff index eefb4c90e..d5ce9e1fa 100644 --- a/Effects/shadow.eff +++ b/Effects/shadow.eff @@ -1,261 +1,8 @@ + Effects/shadow - - - - white - - false - - 1 - - - 0 - - /environment/ground-visibility-m - /environment/visibility-m - /environment/ground-haze-thickness-m - /rendering/scene/scattering - /environment/surface/scattering - /environment/terminator-relative-position-m - /environment/mean-terrain-elevation-m - /rendering/scene/overcast - /sim/rendering/eye-altitude-m - /environment/cloud-self-shading - /environment/moonlight - /position/gear-agl-m - 1.5 - - - - - - - /sim/rendering/shaders/skydome - - - 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 - - 10 - DepthSortedBin - - rendering-hint - - - 0 - - texture[0]/type - texture[0]/image - texture[0]/filter - texture[0]/wrap-s - texture[0]/wrap-t - - - - vertex-program-two-side - - - Shaders/shadow-ALS.vert - Shaders/shadow-ALS.frag - - - visibility - float - visibility - - - avisibility - float - avisibility - - - hazeLayerAltitude - float - lthickness - - - scattering - float - scattering - - - terminator - float - terminator - - - ground_scattering - float - ground_scattering - - - terminator - float - terminator - - - terrain_alt - float - terrain_alt - - - overcast - float - overcast - - - eye_alt - float - eye_alt - - - cloud_self_shading - float - cloud_self_shading - - - moonlight - float - moonlight - - - alt_agl - float - alt_agl - - - gear_clearance - float - gear_clearance - - - greater - 0.01 - - - lequal - true - - - - - - - - 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 - - - - - diff --git a/Effects/ssao-blur-1.eff b/Effects/ssao-blur-1.eff deleted file mode 100644 index f5bae695f..000000000 --- a/Effects/ssao-blur-1.eff +++ /dev/null @@ -1,10 +0,0 @@ - - - Effects/ssao-blur-1 - Effects/blur - - 4.0 - 0.0 - ao-1 - - diff --git a/Effects/ssao-blur-2.eff b/Effects/ssao-blur-2.eff deleted file mode 100644 index c3b630c06..000000000 --- a/Effects/ssao-blur-2.eff +++ /dev/null @@ -1,10 +0,0 @@ - - - Effects/ssao-blur-2 - Effects/blur - - 0.0 - 4.0 - ao-2 - - diff --git a/Effects/ssao.eff b/Effects/ssao.eff deleted file mode 100644 index 31b36f44e..000000000 --- a/Effects/ssao.eff +++ /dev/null @@ -1,84 +0,0 @@ - - - Effects/ssao - - 1.0 - 0.0 - 7.0 - 0.03 - 800.0 - - - - - 0 - buffer - depth - - - 1 - buffer - normal - - - 2 - buffer - spec-emis - - - 3 - noise - - - Shaders/ssao.vert - Shaders/ssao.frag - Shaders/gbuffer-functions.frag - - - depth_tex - sampler-2d - 0 - - - normal_tex - sampler-2d - 1 - - - spec_emis_tex - sampler-2d - 2 - - - noise_tex - sampler-2d - 3 - - - g_scale - float - g_scale - - - g_bias - float - g_bias - - - g_intensity - float - g_intensity - - - g_sample_rad - float - g_sample_rad - - - random_size - float - random_size - - - - diff --git a/Effects/sunlight.eff b/Effects/sunlight.eff deleted file mode 100644 index 05c917ada..000000000 --- a/Effects/sunlight.eff +++ /dev/null @@ -1,272 +0,0 @@ - - - Effects/sunlight - - /sim/rendering/shadows/filtering - - - - - /sim/rendering/shadows/enabled - - 1.0 - /sim/rendering/shadows/filtering - - - - - false - - false - - - one - one - - - 1 - RenderBin - - - 0 - buffer - depth - - - 1 - buffer - normal - - - 2 - buffer - diffuse - - - 3 - buffer - spec-emis - - - 4 - buffer - shadow - - - Shaders/sunlight.vert - Shaders/sunlight.frag - Shaders/gbuffer-functions.frag - - - depth_tex - sampler-2d - 0 - - - normal_tex - sampler-2d - 1 - - - color_tex - sampler-2d - 2 - - - spec_emis_tex - sampler-2d - 3 - - - shadow_tex - sampler-2d - 4 - - - filtering - int - filtering - - - - - - - - /sim/rendering/shadows/enabled - - - - false - - false - - - one - one - - - 1 - RenderBin - - - 0 - buffer - depth - - - 1 - buffer - normal - - - 2 - buffer - diffuse - - - 3 - buffer - spec-emis - - - 4 - buffer - shadow - - - Shaders/sunlight.vert - Shaders/sunlight-nofiltering.frag - Shaders/gbuffer-functions.frag - - - depth_tex - sampler-2d - 0 - - - normal_tex - sampler-2d - 1 - - - color_tex - sampler-2d - 2 - - - spec_emis_tex - sampler-2d - 3 - - - shadow_tex - sampler-2d - 4 - - - - - - - false - - false - - - one - one - - - 1 - RenderBin - - - 0 - buffer - depth - - - 1 - buffer - normal - - - 2 - buffer - diffuse - - - 3 - buffer - spec-emis - - - Shaders/sunlight.vert - Shaders/sunlight-noshadow.frag - Shaders/gbuffer-functions.frag - - - depth_tex - sampler-2d - 0 - - - normal_tex - sampler-2d - 1 - - - color_tex - sampler-2d - 2 - - - spec_emis_tex - sampler-2d - 3 - - - - - - diff --git a/Effects/terrain-default.eff b/Effects/terrain-default.eff index d88718fb1..5a6c9073c 100644 --- a/Effects/terrain-default.eff +++ b/Effects/terrain-default.eff @@ -181,6 +181,14 @@ /local-weather/cloud-shadows/nearest-cloudpos-x /local-weather/cloud-shadows/nearest-cloudpos-y /local-weather/cloud-shadows/cloud-shadow-flag + + + /sim/rendering/shadows/enabled + + + /sim/rendering/shadows/sun-atlas-size + + @@ -314,12 +322,14 @@ Shaders/terrain-ALS-ultra.vert Shaders/filters-ALS.vert + Shaders/shadows-include.vert Shaders/terrain-ALS-ultra.frag Shaders/noise.frag Shaders/cloud-shadowfunc.frag Shaders/hazes.frag Shaders/secondary_lights.frag Shaders/filters-ALS.frag + Shaders/shadows-include.frag grain_strength @@ -825,6 +835,27 @@ 2 + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + lequal @@ -936,10 +967,12 @@ Shaders/terrain-ALS-detailed.vert Shaders/filters-ALS.vert + Shaders/shadows-include.vert Shaders/terrain-ALS-detailed.frag Shaders/noise.frag Shaders/hazes.frag Shaders/filters-ALS.frag + Shaders/shadows-include.frag visibility @@ -1128,6 +1161,27 @@ 2 + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + lequal false --> @@ -1222,10 +1276,12 @@ Shaders/generic-ALS-base.vert + Shaders/shadows-include.vert Shaders/terrain-ALS-base.frag Shaders/hazes.frag Shaders/noise.frag Shaders/filters-ALS.frag + Shaders/shadows-include.frag visibility @@ -1349,81 +1405,34 @@ 2 + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + lequal - - - - - - /sim/rendering/rembrandt/enabled - - - 2.0 - - - - GL_ARB_shader_objects - GL_ARB_shading_language_100 - GL_ARB_vertex_shader - GL_ARB_fragment_shader - - - - - - false - - material/ambient - material/diffuse - material/specular - material/emissive - material/shininess - ambient-and-diffuse - - false - true - smooth - back - - 1 - RenderBin - - - 0 - texture[0]/type - texture[0]/image - texture[0]/filter - texture[0]/wrap-s - texture[0]/wrap-t - texture[0]/internal-format - - modulate - - - - Shaders/deferred-gbuffer.vert - Shaders/deferred-gbuffer.frag - Shaders/gbuffer-functions.frag - Shaders/gbuffer-encode.frag - - - texture - sampler-2d - 0 - - - - - + @@ -1516,8 +1525,10 @@ Shaders/include_fog.vert Shaders/default.vert + Shaders/shadows-include.vert Shaders/default.frag Shaders/include_fog.frag + Shaders/shadows-include.frag visibility @@ -1560,6 +1571,27 @@ 2 + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + lequal diff --git a/Effects/terrain-overlay.eff b/Effects/terrain-overlay.eff index 9076213b6..97ea9067b 100644 --- a/Effects/terrain-overlay.eff +++ b/Effects/terrain-overlay.eff @@ -151,13 +151,15 @@ Shaders/terrain-ALS-ultra.vert - Shaders/filters-ALS.vert + Shaders/filters-ALS.vert + Shaders/shadows-include.vert Shaders/terrain-ALS-ultra.frag Shaders/noise.frag Shaders/cloud-shadowfunc.frag Shaders/hazes.frag Shaders/secondary_lights.frag Shaders/filters-ALS.frag + Shaders/shadows-include.frag grain_strength @@ -663,6 +665,27 @@ 2 + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + lequal @@ -720,6 +743,7 @@ Shaders/noise.frag Shaders/filters-ALS.frag Shaders/cloud-shadowfunc.frag + Shaders/shadows-include.frag 96 triangles triangle-strip @@ -905,7 +929,27 @@ int cloud_shadow_flag - + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + true diff --git a/Effects/test.eff b/Effects/test.eff deleted file mode 100644 index e153a2445..000000000 --- a/Effects/test.eff +++ /dev/null @@ -1,91 +0,0 @@ - - - Effects/test - - - - - - - - /sim/rendering/shaders/generic - - 1.0 - - - - - - - true - - 0.5 0.5 0.5 1.0 - 0.5 0.5 0.5 1.0 - off - - - greater - 0.01 - - smooth - - src-alpha - one-minus-src-alpha - - - false - - - 10 - DepthSortedBin - - - 0 - - texture[0]/type - - - texture[0]/image - - - texture[0]/filter - - - texture[0]/wrap-s - - - texture[0]/wrap-t - - - - - - Shaders/test.vert - Shaders/test.frag - - - - baseTexture - sampler-2d - 0 - - - shading - float - 0.5 - - true - - - diff --git a/Effects/transition.eff b/Effects/transition.eff index b0e1682cd..4349a9e68 100644 --- a/Effects/transition.eff +++ b/Effects/transition.eff @@ -92,323 +92,12 @@ parameters : 6 7 --> - - - - /sim/rendering/shaders/transition - /sim/rendering/rembrandt/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 - - 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-gbuffer.vert - Shaders/transition-gbuffer.frag - Shaders/gbuffer-functions.frag - Shaders/gbuffer-encode.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 - - - - - /sim/rendering/shaders/quality-level /sim/rendering/shaders/transition - - 0.0 - /sim/rendering/rembrandt/enabled - 2.0 @@ -558,8 +247,10 @@ parameters : Shaders/transition.vert + Shaders/shadows-include.vert Shaders/include_fog.frag Shaders/transition.frag + Shaders/shadows-include.frag @@ -708,6 +399,27 @@ parameters : + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + diff --git a/Effects/tree.eff b/Effects/tree.eff index 2488ba9e6..9a8677db3 100644 --- a/Effects/tree.eff +++ b/Effects/tree.eff @@ -1591,52 +1591,6 @@ - - - - - /sim/rendering/rembrandt/enabled - /sim/rendering/random-vegetation - - - - true - - 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 - off - - - gequal - 0.1 - - - 0 - 2d - - texture[0]/image - - clamp - clamp - - - Shaders/deferred-tree.vert - Shaders/deferred-tree.frag - Shaders/gbuffer-functions.frag - Shaders/gbuffer-encode.frag - - - season - float - season - - - texture - sampler-2d - 0 - - - diff --git a/Effects/urban.eff b/Effects/urban.eff index c2552047a..a904e7f28 100644 --- a/Effects/urban.eff +++ b/Effects/urban.eff @@ -218,12 +218,14 @@ 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 @@ -747,7 +749,28 @@ - + + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + @@ -893,12 +916,14 @@ 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/filters-ALS.frag + Shaders/shadows-include.frag tangent 6 @@ -1406,389 +1431,30 @@ osm-buildings + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + - - - - - - /sim/rendering/rembrandt/enabled - /sim/rendering/shaders/urban - - 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 - - - - - false - - - material/ambient - - - material/diffuse - - - material/specular - - ambient-and-diffuse - - false - false - smooth - back - - 0 - RenderBin - - - 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-gbuffer.vert - Shaders/urban-gbuffer.frag - Shaders/gbuffer-functions.frag - Shaders/gbuffer-encode.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 - - - - 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 - - - - - - - - /sim/rendering/rembrandt/enabled - /sim/rendering/shaders/urban - - 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 - - - - - - - false - - - material/ambient - - - material/diffuse - - - material/specular - - ambient-and-diffuse - - false - false - smooth - back - - 0 - RenderBin - - - 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-gbuffer.vert - Shaders/urban-gbuffer.frag - Shaders/gbuffer-functions.frag - Shaders/gbuffer-encode.frag - - tangent - 6 - - - binormal - 7 - - - - 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 - - - - random_buildings - bool - - random-buildings - - - - osm_buildings - bool - - osm-buildings - - - - @@ -1921,8 +1587,10 @@ Shaders/urban.vert + Shaders/shadows-include.vert Shaders/include_fog.frag Shaders/urban.frag + Shaders/shadows-include.frag tangent 6 @@ -2052,6 +1720,27 @@ + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + @@ -2157,8 +1846,10 @@ Shaders/urban.vert + Shaders/shadows-include.vert Shaders/include_fog.frag Shaders/urban.frag + Shaders/shadows-include.frag tangent 6 @@ -2262,6 +1953,27 @@ snow-level + + + shadow_tex + sampler-2d + 10 + + + shadows_enabled + bool + + shadows_enabled + + + + sun_atlas_size + int + + sun_atlas_size + + + diff --git a/Effects/water-inland.eff b/Effects/water-inland.eff index f484f6b1e..b7034eef9 100644 --- a/Effects/water-inland.eff +++ b/Effects/water-inland.eff @@ -1414,397 +1414,6 @@ - - - - - - /sim/rendering/shaders/water - /sim/rendering/rembrandt/enabled - - 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 - - - - - - - - material/ambient - - - material/diffuse - - - material/specular - - - material/emissive - - - material/shininess - - 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-gbuffer.vert - Shaders/water-gbuffer.frag - Shaders/gbuffer-functions.frag - Shaders/gbuffer-encode.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 f3be756d2..8007c801a 100644 --- a/Effects/water.eff +++ b/Effects/water.eff @@ -1391,853 +1391,6 @@ - - - - /sim/rendering/shaders/water - /sim/rendering/rembrandt/enabled - - 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 - - - - - - false - - - material/ambient - - - material/diffuse - - - material/specular - - - material/emissive - - - material/shininess - - 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-gbuffer.vert - Shaders/water_sine-gbuffer.frag - Shaders/gbuffer-functions.frag - Shaders/gbuffer-encode.frag - - tangent - 6 - - - binormal - 7 - - - - 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 - - - - - rembrandt_enabled - int - - rembrandt - - - - - - - - - /sim/rendering/shaders/water - /sim/rendering/rembrandt/enabled - - 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 - - - - - - - - material/ambient - - - material/diffuse - - - material/specular - - - material/emissive - - - material/shininess - - 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-gbuffer.vert - Shaders/water-gbuffer.frag - Shaders/gbuffer-functions.frag - Shaders/gbuffer-encode.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 - - - - - rembrandt_enabled - int - - rembrandt - - - - - @@ -2670,13 +1823,6 @@ - - rembrandt_enabled - int - - rembrandt - - @@ -3068,13 +2214,6 @@ - - rembrandt_enabled - int - - rembrandt - - diff --git a/Compositor/Effects/ws30.eff b/Effects/ws30.eff similarity index 97% rename from Compositor/Effects/ws30.eff rename to Effects/ws30.eff index acece4aa5..13302464b 100644 --- a/Compositor/Effects/ws30.eff +++ b/Effects/ws30.eff @@ -406,10 +406,10 @@ - - als-lighting + + /sim/rendering/shaders/skydome 2.0 @@ -599,13 +599,13 @@ - Shaders/ALS/generic-base.vert - Shaders/ALS/shadows-include.vert - Shaders/ALS/ws30.frag - Shaders/ALS/hazes.frag - Shaders/ALS/noise.frag - Shaders/ALS/filters.frag - Shaders/ALS/shadows-include.frag + Shaders/generic-ALS-base.vert + Shaders/shadows-include.vert + Shaders/ws30.frag + Shaders/hazes.frag + Shaders/noise.frag + Shaders/filters-ALS.frag + Shaders/shadows-include.frag visibility diff --git a/Shaders/agriculture-ALS.frag b/Shaders/agriculture-ALS.frag index a1176d668..ad132b962 100644 --- a/Shaders/agriculture-ALS.frag +++ b/Shaders/agriculture-ALS.frag @@ -92,6 +92,8 @@ vec3 searchlight(); vec3 landing_light(in float offset, in float offsetv); vec3 filter_combined (in vec3 color) ; +float getShadowing(); + // a fade function for procedural scales which are smaller than a pixel @@ -417,13 +419,15 @@ if ((dist < 5000.0)&& (quality_level > 3) && (combined_wetness>0.0)) NdotL = NdotL + 0.05 * noisegrad_1m * detail_fade(1.0, view_angle,dist); if (NdotL > 0.0) { + float shadowmap = getShadowing(); if (cloud_shadow_flag == 1) {NdotL = NdotL * shadow_func(relPos.x, relPos.y, 0.3 * noise_250m + 0.5 * noise_500m+0.2 * noise_1500m, dist);} - color += diffuse_term * NdotL; + color += diffuse_term * NdotL * shadowmap; NdotHV = max(dot(n, halfVector), 0.0); if (gl_FrontMaterial.shininess > 0.0) specular.rgb = ((gl_FrontMaterial.specular.rgb * 0.1 + (water_factor * vec3 (1.0, 1.0, 1.0))) * light_specular.rgb - * pow(NdotHV, gl_FrontMaterial.shininess + (20.0 * water_factor))); + * pow(NdotHV, gl_FrontMaterial.shininess + (20.0 * water_factor)) + * shadowmap); } color.a = 1.0;//diffuse_term.a; // This shouldn't be necessary, but our lighting becomes very diff --git a/Shaders/airfield-ALS.frag b/Shaders/airfield-ALS.frag index 12bdd2e23..753ed0555 100644 --- a/Shaders/airfield-ALS.frag +++ b/Shaders/airfield-ALS.frag @@ -78,6 +78,8 @@ vec3 searchlight(); vec3 landing_light(in float offset, in float offsetv); vec3 filter_combined (in vec3 color) ; +float getShadowing(); + float detail_fade (in float scale, in float angle, in float dist) { @@ -282,9 +284,10 @@ if (quality_level > 3) } if (NdotL > 0.0) { + float shadowmap = getShadowing(); if (cloud_shadow_flag == 1) {NdotL = NdotL * shadow_func(relPos.x, relPos.y, noise_1500m, dist);} - color += diffuse_term * NdotL; + color += diffuse_term * NdotL * shadowmap; @@ -294,7 +297,8 @@ if (quality_level > 3) if (gl_FrontMaterial.shininess > 0.0) specular.rgb = ((gl_FrontMaterial.specular.rgb + (water_factor * vec3 (1.0, 1.0, 1.0))) * light_specular.rgb - * pow(NdotHV, (gl_FrontMaterial.shininess + 20.0 * water_factor))); + * pow(NdotHV, (gl_FrontMaterial.shininess + 20.0 * water_factor)) + * shadowmap); } color.a = 1.0; // This shouldn't be necessary, but our lighting becomes very diff --git a/Shaders/ambient.frag b/Shaders/ambient.frag deleted file mode 100644 index d4e726e0a..000000000 --- a/Shaders/ambient.frag +++ /dev/null @@ -1,22 +0,0 @@ -#version 120 - -uniform sampler2D color_tex; -uniform sampler2D ao_tex; -uniform sampler2D normal_tex; -uniform sampler2D spec_emis_tex; -uniform vec4 fg_SunAmbientColor; -uniform bool ambientOcclusion; -uniform float ambientOcclusionStrength; - -void main() { - vec2 coords = gl_TexCoord[0].xy; - float initialized = texture2D( spec_emis_tex, coords ).a; - if ( initialized < 0.1 ) - discard; - vec3 tcolor = texture2D( color_tex, coords ).rgb; - float ao = 1.0; - if (ambientOcclusion) { - ao = 1.0 - ambientOcclusionStrength * (1.0 - texture2D( ao_tex, coords ).r); - } - gl_FragColor = vec4(tcolor * fg_SunAmbientColor.rgb * ao, 1.0); -} diff --git a/Shaders/bloom-combine.frag b/Shaders/bloom-combine.frag deleted file mode 100644 index 4452cab40..000000000 --- a/Shaders/bloom-combine.frag +++ /dev/null @@ -1,12 +0,0 @@ -#version 120 - -uniform sampler2D color_tex; -uniform sampler2D spec_emis_tex; -void main() { - vec2 coords = gl_TexCoord[0].xy; - vec4 spec_emis = texture2D( spec_emis_tex, coords ); - if ( spec_emis.a < 0.1 ) - spec_emis.z = 0.0; - vec3 tcolor = texture2D( color_tex, coords ).rgb; - gl_FragColor = vec4(tcolor * spec_emis.z, 1.0); -} diff --git a/Shaders/blur.frag b/Shaders/blur.frag deleted file mode 100644 index 9d7cdc830..000000000 --- a/Shaders/blur.frag +++ /dev/null @@ -1,18 +0,0 @@ -#version 120 - -uniform sampler2D input_tex; -uniform vec2 fg_BufferSize; -uniform float blurOffset_x; -uniform float blurOffset_y; -const float f[5] = float[](0.0, 1.0, 2.0, 3.0, 4.0); -const float w[5] = float[](0.2270270270, 0.1945945946, 0.1216216216, 0.0540540541, 0.0162162162 ); -void main() { - vec2 blurOffset = vec2(blurOffset_x, blurOffset_y) / fg_BufferSize; - vec2 coords = gl_TexCoord[0].xy; - vec4 color = vec4( texture2D( input_tex, coords + f[0] * blurOffset ).rgb * w[0], 1.0 ); - for (int i=1; i<5; ++i ) { - color.rgb += texture2D( input_tex, coords - f[i] * blurOffset ).rgb * w[i]; - color.rgb += texture2D( input_tex, coords + f[i] * blurOffset ).rgb * w[i]; - } - gl_FragColor = color; -} diff --git a/Shaders/building-deferred-gbuffer.vert b/Shaders/building-deferred-gbuffer.vert deleted file mode 100644 index 907a799d7..000000000 --- a/Shaders/building-deferred-gbuffer.vert +++ /dev/null @@ -1,91 +0,0 @@ -// -*- mode: C; -*- -// Licence: GPL v2 -// Author: Frederic Bouvier. -// -#version 120 -#extension GL_EXT_draw_instanced : enable - -attribute vec3 instancePosition; // (x,y,z) -attribute vec3 instanceScaleRotate; // (width, depth, height) -attribute vec3 attrib1; // Generic packed attributes -attribute vec3 attrib2; - -varying vec3 ecNormal; -varying float alpha; - -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() { - // 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 (instanceScaleRotate.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 * instanceScaleRotate.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); - - // 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; - - // Rotate the normal. - ecNormal = gl_Normal; - ecNormal.xy = vec2(dot(ecNormal.xy, vec2(cr, sr)), dot(ecNormal.xy, vec2(-sr, cr))); - ecNormal = gl_NormalMatrix * ecNormal; - - gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; - gl_FrontColor = vec4(1.0, 1.0, 1.0, 1.0); - gl_BackColor = vec4(1.0, 1.0, 1.0, 1.0); - alpha = 1.0; -} diff --git a/Shaders/building-model-ALS-ultra.vert b/Shaders/building-model-ALS-ultra.vert index af1489c25..c88e04d5d 100644 --- a/Shaders/building-model-ALS-ultra.vert +++ b/Shaders/building-model-ALS-ultra.vert @@ -27,7 +27,6 @@ uniform float hdg; uniform int refl_dynamic; uniform int nmap_enabled; uniform int shader_qual; -uniform int rembrandt_enabled; uniform int color_is_position; //////Fog Include/////////// @@ -177,11 +176,8 @@ void main(void) reflVec = reflVec_stat; } - if(rembrandt_enabled < 1){ gl_FrontColor = gl_FrontMaterial.emission + vec4(1.0,1.0,1.0,1.0) * (gl_LightModel.ambient + gl_LightSource[0].ambient); - } else { - gl_FrontColor = vec4(1.0,1.0,1.0,1.0); - } + gl_Position = gl_ModelViewProjectionMatrix * vec4(rawpos,1.0); } diff --git a/Shaders/building-ubershader.vert b/Shaders/building-ubershader.vert index 6615dffef..758ae7850 100644 --- a/Shaders/building-ubershader.vert +++ b/Shaders/building-ubershader.vert @@ -15,7 +15,6 @@ varying vec3 normal; uniform int refl_dynamic; uniform int nmap_enabled; uniform int shader_qual; -uniform int rembrandt_enabled; attribute vec3 instancePosition; // (x,y,z) attribute vec3 instanceScale; // (width, depth, height) @@ -89,12 +88,9 @@ void main(void) // Force no alpha on random buildings diffuseColor = vec4(gl_FrontMaterial.diffuse.rgb,1.0); - if(rembrandt_enabled < 1){ gl_FrontColor = gl_FrontMaterial.emission + vec4(1.0) * (gl_LightModel.ambient + gl_LightSource[0].ambient); - } else { - gl_FrontColor = vec4(1.0); - } + gl_ClipVertex = ecPosition; // Texture coordinates are stored as: diff --git a/Shaders/chute-ALS.vert b/Shaders/chute-ALS.vert index a46a3087e..9c97fdc8b 100644 --- a/Shaders/chute-ALS.vert +++ b/Shaders/chute-ALS.vert @@ -41,6 +41,7 @@ uniform float chute_bend; uniform float chute_projection_z; uniform float osg_SimulationTime; +void setupShadows(vec4 eyeSpacePos); // This is the value used in the skydome scattering shader - use the same here for consistency? const float EarthRadius = 5800000.0; @@ -286,6 +287,7 @@ else // the faster, full-day version without lightfields gl_BackColor.rgb = constant_term.rgb; gl_BackColor.a = 0.0; gl_Position = gl_ModelViewProjectionMatrix * vertex; + setupShadows(gl_ModelViewMatrix * vertex); } diff --git a/Shaders/cinema.frag b/Shaders/cinema.frag deleted file mode 100644 index 7dffdebc6..000000000 --- a/Shaders/cinema.frag +++ /dev/null @@ -1,96 +0,0 @@ -#version 120 - -uniform sampler2D lighting_tex; -uniform sampler2D bloom_tex; -uniform sampler2D film_tex; - -uniform bool colorShift; -uniform vec3 redShift; -uniform vec3 greenShift; -uniform vec3 blueShift; - -uniform bool vignette; -uniform float innerCircle; -uniform float outerCircle; - -uniform bool distortion; -uniform vec3 distortionFactor; - -uniform bool colorFringe; -uniform float colorFringeFactor; - -uniform bool filmWear; - -uniform vec2 fg_BufferSize; -uniform float osg_SimulationTime; -// uniform float shutterFreq; -// uniform float shutterDuration; - -uniform bool bloomEnabled; -uniform float bloomStrength; -uniform bool bloomBuffers; - -void main() { - vec2 c1 = gl_TexCoord[0].xy; - vec2 initialCoords = c1; - vec2 c2; - - if (distortion) { - c1 = 2.0 * initialCoords - vec2(1.,1.); - c1 *= vec2( 1.0, fg_BufferSize.y / fg_BufferSize.x ); - float r = length(c1); - - c1 += c1 * dot(distortionFactor.xy, vec2(r*r, r*r*r*r)); - c1 /= distortionFactor.z; - - c1 *= vec2( 1.0, fg_BufferSize.x / fg_BufferSize.y ); - c1 = c1 * .5 + .5; - - if (colorFringe) { - c2 = 2.0 * initialCoords - vec2(1.,1.); - c2 *= vec2( 1.0, fg_BufferSize.y / fg_BufferSize.x ); - r = length(c2); - - c2 += c2 * dot(distortionFactor.xy*colorFringeFactor, vec2(r*r, r*r*r*r)); - c2 /= distortionFactor.z; - - c2 *= vec2( 1.0, fg_BufferSize.x / fg_BufferSize.y ); - c2 = c2 * .5 + .5; - } - } - - vec3 dirt = vec3(1.0); - if (filmWear) { - dirt = texture2D(film_tex, initialCoords*vec2( 1.0, fg_BufferSize.y / fg_BufferSize.x ) + vec2(0.0, osg_SimulationTime * 7.7)).rgb; - } - - vec4 color = texture2D( lighting_tex, c1 ); - if (bloomEnabled && bloomBuffers) - color += bloomStrength * texture2D( bloom_tex, c1 ); - - if (distortion && colorFringe) { - color.g = texture2D( lighting_tex, c2 ).g; - if (bloomEnabled && bloomBuffers) - color.g += bloomStrength * texture2D( bloom_tex, c2 ).g; - } - - if (colorShift) { - vec3 col2; - col2.r = dot(color.rgb, redShift); - col2.g = dot(color.rgb, greenShift); - col2.b = dot(color.rgb, blueShift); - color.rgb = col2; - } - - if (vignette) { - vec2 c = 2.0 * initialCoords - vec2(1.,1.); - c = c * vec2( 1.0, fg_BufferSize.y / fg_BufferSize.x ); - float l = length(c); - float f = smoothstep( innerCircle, innerCircle * outerCircle, l ); - color.rgb = (1.0 - f) * color.rgb; - } - // if ((osg_FrameNumber % 6) == 0) - // f = 1.0; - - gl_FragColor = color * vec4(dirt, 1.0); -} diff --git a/Shaders/cliffs-ALS.frag b/Shaders/cliffs-ALS.frag index 956b93159..b96e7b7e5 100644 --- a/Shaders/cliffs-ALS.frag +++ b/Shaders/cliffs-ALS.frag @@ -83,6 +83,8 @@ vec3 searchlight(); vec3 landing_light(in float offset, in float offsetv); vec3 filter_combined (in vec3 color) ; +float getShadowing(); + 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; @@ -388,8 +390,9 @@ if ((dist < 5000.0) && (combined_wetness>0.0)) float fresnel; if (NdotL > 0.0) { + float shadowmap = getShadowing(); if (cloud_shadow_flag == 1) {NdotL = NdotL * shadow_func(relPos.x, relPos.y, 0.3 * noise_250m + 0.5 * noise_500m+0.2 * noise_1500m, dist);} - color += diffuse_term * NdotL; + color += diffuse_term * NdotL * shadowmap; NdotHV = max(dot(n, halfVector), 0.0); fresnel = 1.0 + 5.0 * (1.0-smoothstep(0.0,0.2, dot(normalize(ecViewdir),n))); @@ -397,7 +400,8 @@ if ((dist < 5000.0) && (combined_wetness>0.0)) //if (gl_FrontMaterial.shininess > 0.0) specular.rgb = ((gl_FrontMaterial.specular.rgb * 0.1 + (water_factor * vec3 (1.0, 1.0, 1.0))) * light_specular.rgb - * pow(NdotHV, max(gl_FrontMaterial.shininess,4.0) + (20.0 * water_factor))); + * pow(NdotHV, max(gl_FrontMaterial.shininess,4.0) + (20.0 * water_factor)) + * shadowmap); } color.a = 1.0;//diffuse_term.a; // This shouldn't be necessary, but our lighting becomes very diff --git a/Shaders/clustered-include.frag b/Shaders/clustered-include.frag new file mode 100644 index 000000000..9b042033a --- /dev/null +++ b/Shaders/clustered-include.frag @@ -0,0 +1,243 @@ +#version 120 + +uniform sampler3D fg_Clusters; +uniform sampler2D fg_ClusteredPointLights; +uniform sampler2D fg_ClusteredSpotLights; + +uniform int fg_ClusteredTileSize; +uniform float fg_ClusteredSliceScale; +uniform float fg_ClusteredSliceBias; +uniform int fg_ClusteredHorizontalTiles; +uniform int fg_ClusteredVerticalTiles; + +const int MAX_POINTLIGHTS = 1024; +const int MAX_SPOTLIGHTS = 1024; +const int MAX_LIGHT_GROUPS_PER_CLUSTER = 255; + +struct PointLight { + vec4 position; + vec4 ambient; + vec4 diffuse; + vec4 specular; + vec4 attenuation; +}; + +struct SpotLight { + vec4 position; + vec4 direction; + vec4 ambient; + vec4 diffuse; + vec4 specular; + vec4 attenuation; + float cos_cutoff; + float exponent; +}; + + +PointLight unpackPointLight(int index) +{ + PointLight light; + float v = (float(index) + 0.5) / float(MAX_POINTLIGHTS); + light.position = texture2D(fg_ClusteredPointLights, vec2(0.1, v)); + light.ambient = texture2D(fg_ClusteredPointLights, vec2(0.3, v)); + light.diffuse = texture2D(fg_ClusteredPointLights, vec2(0.5, v)); + light.specular = texture2D(fg_ClusteredPointLights, vec2(0.7, v)); + light.attenuation = texture2D(fg_ClusteredPointLights, vec2(0.9, v)); + return light; +} + +SpotLight unpackSpotLight(int index) +{ + SpotLight light; + float v = (float(index) + 0.5) / float(MAX_SPOTLIGHTS); + light.position = texture2D(fg_ClusteredSpotLights, vec2(0.0714, v)); + light.direction = texture2D(fg_ClusteredSpotLights, vec2(0.2143, v)); + light.ambient = texture2D(fg_ClusteredSpotLights, vec2(0.3571, v)); + light.diffuse = texture2D(fg_ClusteredSpotLights, vec2(0.5, v)); + light.specular = texture2D(fg_ClusteredSpotLights, vec2(0.6429, v)); + light.attenuation = texture2D(fg_ClusteredSpotLights, vec2(0.7857, v)); + vec2 reminder = texture2D(fg_ClusteredSpotLights, vec2(0.9286, v)).xy; + light.cos_cutoff = reminder.x; + light.exponent = reminder.y; + return light; +} + +// @param p Fragment position in view space. +// @param n Fragment normal in view space. +vec3 getClusteredLightsContribution(vec3 p, vec3 n, vec3 texel) +{ + int zSlice = int(max(log2(-p.z) * fg_ClusteredSliceScale + + fg_ClusteredSliceBias, 0.0)); + int ySlice = int(gl_FragCoord.y) / fg_ClusteredTileSize * zSlice; + int xSlice = int(gl_FragCoord.x) / fg_ClusteredTileSize; + + vec2 clusterCoords = vec2( + (float(xSlice) + 0.5) / fg_ClusteredHorizontalTiles, + (float(ySlice) * float(zSlice) + 0.5) / fg_ClusteredVerticalTiles); + + int pointCount = int(texture3D(fg_Clusters, vec3(clusterCoords, 0.0)).r); + int spotCount = int(texture3D(fg_Clusters, vec3(clusterCoords, 0.0)).g); + + int lightGroupCount = int(ceil(float(pointCount + spotCount) / 4.0)); + + vec3 color = vec3(0.0); + + for (int i = 0; i < lightGroupCount; ++i) { + float r = (float(i + 1) + 0.5) / float(MAX_LIGHT_GROUPS_PER_CLUSTER + 1); + vec4 packedIndices = texture3D(fg_Clusters, vec3(clusterCoords, r)); + + for (int j = 0; j < 4; ++j) { + int index; + if (j == 0) index = int(packedIndices.x); + else if (j == 1) index = int(packedIndices.y); + else if (j == 2) index = int(packedIndices.z); + else if (j == 3) index = int(packedIndices.w); + else break; + + int currentLight = i * 4 + j; + if (currentLight < pointCount) { + // This is a point light + PointLight light = unpackPointLight(index); + + float range = light.attenuation.w; + vec3 toLight = light.position.xyz - p; + // Ignore fragments outside the light volume + if (dot(toLight, toLight) > (range * range)) + continue; + + float d = length(toLight); + float att = 1.0 / (light.attenuation.x // constant + + light.attenuation.y * d // linear + + light.attenuation.z * d * d); // quadratic + vec3 lightDir = normalize(toLight); + float NdotL = max(dot(n, lightDir), 0.0); + + vec3 Iamb = light.ambient.rgb; + vec3 Idiff = gl_FrontMaterial.diffuse.rgb * light.diffuse.rgb * NdotL; + vec3 Ispec = vec3(0.0); + + if (NdotL > 0.0) { + vec3 halfVector = normalize(lightDir + normalize(-p)); + float NdotHV = max(dot(n, halfVector), 0.0); + Ispec = gl_FrontMaterial.specular.rgb + * light.specular.rgb + * pow(NdotHV, gl_FrontMaterial.shininess); + } + + color += ((Iamb + Idiff) * texel + Ispec) * att; + } else if (currentLight < (pointCount + spotCount)) { + // This is a spot light + SpotLight light = unpackSpotLight(index); + + vec3 toLight = light.position.xyz - p; + + float d = length(toLight); + float att = 1.0 / (light.attenuation.x // constant + + light.attenuation.y * d // linear + + light.attenuation.z * d * d); // quadratic + + vec3 lightDir = normalize(toLight); + + float spotDot = dot(-lightDir, light.direction.xyz); + if (spotDot < light.cos_cutoff) + continue; + + att *= pow(spotDot, light.exponent); + + float NdotL = max(dot(n, lightDir), 0.0); + + vec3 Iamb = light.ambient.rgb; + vec3 Idiff = gl_FrontMaterial.diffuse.rgb * light.diffuse.rgb * NdotL; + vec3 Ispec = vec3(0.0); + + if (NdotL > 0.0) { + vec3 halfVector = normalize(lightDir + normalize(-p)); + float NdotHV = max(dot(n, halfVector), 0.0); + Ispec = gl_FrontMaterial.specular.rgb + * light.specular.rgb + * pow(NdotHV, gl_FrontMaterial.shininess); + } + + color += ((Iamb + Idiff) * texel + Ispec) * att; + } else { + break; + } + } + } + + return clamp(color, 0.0, 1.0); + + // for (int i = 0; i < pointCount; ++i) { + // vec3 lightCoords = clusterCoords; + + // int pointCount = int(texture2D(fg_Clusters, clusterCoords).r); + // PointLight light = pointLights[lightListIndex]; + + // float range = light.attenuation.w; + // vec3 toLight = light.position.xyz - p; + // // Ignore fragments outside the light volume + // if (dot(toLight, toLight) > (range * range)) + // continue; + + // //////////////////////////////////////////////////////////////////////// + // // Actual lighting + + // float d = length(toLight); + // float att = 1.0 / (light.attenuation.x // constant + // + light.attenuation.y * d // linear + // + light.attenuation.z * d * d); // quadratic + // vec3 lightDir = normalize(toLight); + // float NdotL = max(dot(n, lightDir), 0.0); + + // vec3 Iamb = light.ambient.rgb; + // vec3 Idiff = light.diffuse.rgb * NdotL; + // vec3 Ispec = vec3(0.0); + + // if (NdotL > 0.0) { + // vec3 halfVector = normalize(lightDir + normalize(-p)); + // float NdotHV = max(dot(n, halfVector), 0.0); + // Ispec = light.specular.rgb * att * pow(NdotHV, shininess); + // } + + // color += addColors(color, (Iamb + Idiff + Ispec) * att); + // } + + // for (uint i = uint(0); i < spotCount; ++i) { + // uint lightListIndex = texelFetch(fg_ClusteredLightIndices, + // int(startIndex + i)).r; + // SpotLight light = spotLights[lightListIndex]; + + // vec3 toLight = light.position.xyz - p; + + // //////////////////////////////////////////////////////////////////////// + // // Actual lighting + + // float d = length(toLight); + // float att = 1.0 / (light.attenuation.x // constant + // + light.attenuation.y * d // linear + // + light.attenuation.z * d * d); // quadratic + + // vec3 lightDir = normalize(toLight); + + // float spotDot = dot(-lightDir, light.direction.xyz); + // if (spotDot < light.cos_cutoff) + // continue; + + // att *= pow(spotDot, light.exponent); + + // float NdotL = max(dot(n, lightDir), 0.0); + + // vec3 Iamb = light.ambient.rgb; + // vec3 Idiff = light.diffuse.rgb * NdotL; + // vec3 Ispec = vec3(0.0); + + // if (NdotL > 0.0) { + // vec3 halfVector = normalize(lightDir + normalize(-p)); + // float NdotHV = max(dot(n, halfVector), 0.0); + // Ispec = light.specular.rgb * att * pow(NdotHV, shininess); + // } + + // color += (Iamb + Idiff + Ispec) * att; + // } + +} diff --git a/Shaders/crop.frag b/Shaders/crop.frag index fb7a69e3b..ed0349258 100644 --- a/Shaders/crop.frag +++ b/Shaders/crop.frag @@ -24,6 +24,8 @@ uniform int fogType; vec3 fog_Func(vec3 color, int type); ////////////////////// +float getShadowing(); + void main (void) { @@ -64,7 +66,7 @@ void main (void) //"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)); + 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; diff --git a/Shaders/crop.vert b/Shaders/crop.vert index 9e70bfa6d..669e66225 100644 --- a/Shaders/crop.vert +++ b/Shaders/crop.vert @@ -6,6 +6,8 @@ varying vec3 VNormal; varying vec3 Normal; varying vec4 constantColor; +void setupShadows(vec4 eyeSpacePos); + void main(void) { gl_TexCoord[0] = gl_MultiTexCoord0; @@ -21,4 +23,6 @@ void main(void) + gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient); gl_Position = ftransform(); -} \ No newline at end of file + + setupShadows(ecPosition); +} diff --git a/Shaders/default.frag b/Shaders/default.frag index 1c3fbaf84..79989d1b7 100644 --- a/Shaders/default.frag +++ b/Shaders/default.frag @@ -14,6 +14,8 @@ uniform int fogType; vec3 fog_Func(vec3 color, int type); ////////////////////// +float getShadowing(); + float luminance(vec3 color) { return dot(vec3(0.212671, 0.715160, 0.072169), color); @@ -37,12 +39,14 @@ void main() NdotL = dot(n, lightDir); if (NdotL > 0.0) { - color += diffuse_term * NdotL; + float shadowmap = getShadowing(); + color += diffuse_term * NdotL * shadowmap; 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)); + * pow(NdotHV, gl_FrontMaterial.shininess) + * shadowmap); } color.a = diffuse_term.a; // This shouldn't be necessary, but our lighting becomes very @@ -54,4 +58,4 @@ void main() fragColor.rgb = fog_Func(fragColor.rgb, fogType); gl_FragColor = fragColor; -} \ No newline at end of file +} diff --git a/Shaders/default.vert b/Shaders/default.vert index 1bc240585..c58c56349 100644 --- a/Shaders/default.vert +++ b/Shaders/default.vert @@ -21,6 +21,8 @@ varying vec3 normal; uniform int colorMode; +void setupShadows(vec4 eyeSpacePos); + ////fog "include"//////// //uniform int fogType; // @@ -58,4 +60,5 @@ void main() gl_BackColor.rgb = constant_term.rgb; gl_BackColor.a = 0.0; //fogCoord = abs(ecPosition.z / ecPosition.w); //fog_Func(fogType); + setupShadows(gl_ModelViewMatrix * gl_Vertex); } diff --git a/Shaders/deferred-gbuffer.frag b/Shaders/deferred-gbuffer.frag deleted file mode 100644 index 4c847305e..000000000 --- a/Shaders/deferred-gbuffer.frag +++ /dev/null @@ -1,25 +0,0 @@ -#version 120 -#extension GL_EXT_gpu_shader4 : enable -// -*- mode: C; -*- -// Licence: GPL v2 -// Author: Frederic Bouvier. -// - -varying vec3 ecNormal; -varying float alpha; -uniform int materialID; -uniform sampler2D texture; - -void encode_gbuffer(vec3 normal, vec3 color, int mId, float specular, float shininess, float emission, float depth); - -void main() { - vec4 texel = texture2D(texture, gl_TexCoord[0].st); - if (texel.a * alpha < 0.1) - discard; - float specular = dot( gl_FrontMaterial.specular.rgb, vec3( 0.3, 0.59, 0.11 ) ); - float shininess = gl_FrontMaterial.shininess; - float emission = dot( gl_FrontLightModelProduct.sceneColor.rgb, vec3( 0.3, 0.59, 0.11 ) ); - - vec3 normal2 = normalize( (2.0 * gl_Color.a - 1.0) * ecNormal ); - encode_gbuffer(normal2, gl_Color.rgb * texel.rgb, materialID, specular, shininess, emission, gl_FragCoord.z); -} diff --git a/Shaders/deferred-gbuffer.vert b/Shaders/deferred-gbuffer.vert deleted file mode 100644 index 9654f1159..000000000 --- a/Shaders/deferred-gbuffer.vert +++ /dev/null @@ -1,16 +0,0 @@ -// -*- mode: C; -*- -// Licence: GPL v2 -// Author: Frederic Bouvier. -// -#version 120 - -varying vec3 ecNormal; -varying float alpha; -void main() { - ecNormal = gl_NormalMatrix * gl_Normal; - gl_Position = ftransform(); - gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; - gl_FrontColor.rgb = gl_Color.rgb; gl_FrontColor.a = 1.0; - gl_BackColor.rgb = gl_Color.rgb; gl_BackColor.a = 0.0; - alpha = gl_Color.a; -} diff --git a/Shaders/deferred-tree.frag b/Shaders/deferred-tree.frag deleted file mode 100644 index 9fcccb62d..000000000 --- a/Shaders/deferred-tree.frag +++ /dev/null @@ -1,21 +0,0 @@ -#version 120 -#extension GL_EXT_gpu_shader4 : enable -// -// attachment 0: normal.x | normal.x | normal.y | normal.y -// attachment 1: diffuse.r | diffuse.g | diffuse.b | material Id -// attachment 2: specular.l | shininess | emission.l | unused -// -uniform int materialID; -uniform sampler2D texture; -void encode_gbuffer(vec3 normal, vec3 color, int mId, float specular, float shininess, float emission, float depth); -void main() { - vec4 texel = texture2D(texture, gl_TexCoord[0].st); - if (texel.a < 0.1) - discard; - float specular = 0.0; - float shininess = 0.1; - float emission = 0.0; - - // Normal is straight towards the viewer. (FB: Are they really billboards ? ) - encode_gbuffer(vec3(0.5, 0.5, 0.0), gl_Color.rgb * texel.rgb, materialID, specular, shininess, emission, gl_FragCoord.z); -} diff --git a/Shaders/deferred-tree.vert b/Shaders/deferred-tree.vert deleted file mode 100644 index edc4d6b17..000000000 --- a/Shaders/deferred-tree.vert +++ /dev/null @@ -1,35 +0,0 @@ -// Tree instance scheme: -// vertex - local position of quad vertex. -// normal - x y scaling, z number of varieties -// fog coord - rotation -// color - xyz of tree quad origin, replicated 4 times. -#version 120 - -uniform float season; - -void main() { - - // Texture coordinates - float numVarieties = gl_Normal.z; - float texFract = floor(fract(gl_MultiTexCoord0.x) * numVarieties) / numVarieties; - texFract += floor(gl_MultiTexCoord0.x) / numVarieties; - gl_TexCoord[0] = vec4(texFract, gl_MultiTexCoord0.y, 0.0, 0.0); - gl_TexCoord[0].y = gl_TexCoord[0].y + 0.5 * season; - - // Position and scaling - vec3 position = gl_Vertex.xyz * gl_Normal.xxy; - float sr = sin(gl_FogCoord + gl_Color.x); - float cr = cos(gl_FogCoord + gl_Color.x); - - // Rotation of the generic quad to specific one for the tree. - position.xy = vec2(dot(position.xy, vec2(cr, sr)), dot(position.xy, vec2(-sr, cr))); - - // Move to correct location (stored in gl_Color) - position = position + gl_Color.xyz; - gl_Position = gl_ModelViewProjectionMatrix * vec4(position,1.0); - - // Color - white. - gl_FrontColor = vec4(1.0, 1.0, 1.0,1.0); - gl_BackColor = vec4(1.0, 1.0, 1.0,1.0); -} - diff --git a/Shaders/display.frag b/Shaders/display.frag deleted file mode 100644 index df48e55cd..000000000 --- a/Shaders/display.frag +++ /dev/null @@ -1,45 +0,0 @@ -#version 120 - -uniform sampler2D lighting_tex; -uniform sampler2D bloom_tex; - -uniform sampler2D bufferNW_tex; -uniform sampler2D bufferNE_tex; -uniform sampler2D bufferSW_tex; -uniform sampler2D bufferSE_tex; - -uniform bool showBuffers; - -uniform bool bloomEnabled; -uniform float bloomStrength; -uniform bool bloomBuffers; - -uniform bool bufferNW_enabled; -uniform bool bufferNE_enabled; -uniform bool bufferSW_enabled; -uniform bool bufferSE_enabled; - -void main() { - vec2 coords = gl_TexCoord[0].xy; - vec4 color; - if (showBuffers) { - if (coords.x < 0.2 && coords.y < 0.2 && bufferSW_enabled) { - color = texture2D( bufferSW_tex, coords * 5.0 ); - } else if (coords.x >= 0.8 && coords.y >= 0.8 && bufferNE_enabled) { - color = texture2D( bufferNE_tex, (coords - vec2( 0.8, 0.8 )) * 5.0 ); - } else if (coords.x >= 0.8 && coords.y < 0.2 && bufferSE_enabled) { - color = texture2D( bufferSE_tex, (coords - vec2( 0.8, 0.0 )) * 5.0 ); - } else if (coords.x < 0.2 && coords.y >= 0.8 && bufferNW_enabled) { - color = texture2D( bufferNW_tex, (coords - vec2( 0.0, 0.8 )) * 5.0 ); - } else { - color = texture2D( lighting_tex, coords ); - if (bloomEnabled && bloomBuffers) - color = color + bloomStrength * texture2D( bloom_tex, coords ); - } - } else { - color = texture2D( lighting_tex, coords ); - if (bloomEnabled && bloomBuffers) - color = color + bloomStrength * texture2D( bloom_tex, coords ); - } - gl_FragColor = color; -} diff --git a/Shaders/drunway-ALS.frag b/Shaders/drunway-ALS.frag index cc816c840..cccb77060 100644 --- a/Shaders/drunway-ALS.frag +++ b/Shaders/drunway-ALS.frag @@ -83,6 +83,7 @@ vec3 rayleigh_out_shift(in vec3 color, in float outscatter); vec3 get_hazeColor(in float light_arg); vec3 filter_combined (in vec3 color) ; +float getShadowing(); void main() @@ -284,14 +285,16 @@ if ((dist < 5000.0)&& (quality_level > 3) && (wetness>0.0)) //NdotL = NdotL + 3.0 * N.r + 0.1 * (noise_01m-0.5) ; } if (NdotL > 0.0) { + float shadowmap = getShadowing(); if (cloud_shadow_flag == 1) {NdotL = NdotL * shadow_func(relPos.x, relPos.y, 1.0, dist);} - color += diffuse_term * NdotL; + color += diffuse_term * NdotL * shadowmap; NdotHV = max(dot(n, halfVector), 0.0); //if (gl_FrontMaterial.shininess > 0.0) specular.rgb = ((gl_FrontMaterial.specular.rgb + (water_factor * vec3 (1.0, 1.0, 1.0))) * light_specular.rgb - * pow(NdotHV, gl_FrontMaterial.shininess + (20.0 * water_factor))); + * pow(NdotHV, gl_FrontMaterial.shininess + (20.0 * water_factor)) + * shadowmap); } color.a = 1.0;//diffuse_term.a; // This shouldn't be necessary, but our lighting becomes very diff --git a/Shaders/flutter-ALS.vert b/Shaders/flutter-ALS.vert index 500fcdcca..9c0f9c4ee 100644 --- a/Shaders/flutter-ALS.vert +++ b/Shaders/flutter-ALS.vert @@ -48,6 +48,8 @@ const float terminator_width = 200000.0; float earthShade; +void setupShadows(vec4 eyeSpacePos); + 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; @@ -308,5 +310,5 @@ else // the faster, full-day version without lightfields // fogCoord = abs(ecPosition.z / ecPosition.w); //fog_Func(fogType); - + setupShadows(ecPosition); } diff --git a/Shaders/flutter.vert b/Shaders/flutter.vert index 0d07a042f..3de78d2a3 100644 --- a/Shaders/flutter.vert +++ b/Shaders/flutter.vert @@ -35,6 +35,8 @@ uniform sampler3D Noise; //void fog_Func(int type); ///////////////////////// +void setupShadows(vec4 eyeSpacePos); + /////// functions ///////// float normalize_range(float _val) @@ -139,5 +141,5 @@ void main() // fogCoord = abs(ecPosition.z / ecPosition.w); //fog_Func(fogType); - + setupShadows(ecPosition); } diff --git a/Shaders/fog.frag b/Shaders/fog.frag deleted file mode 100644 index c1c0b84ff..000000000 --- a/Shaders/fog.frag +++ /dev/null @@ -1,28 +0,0 @@ -#version 120 - -uniform sampler2D depth_tex; -uniform sampler2D normal_tex; -uniform sampler2D color_tex; -uniform sampler2D spec_emis_tex; -uniform vec4 fg_FogColor; -uniform float fg_FogDensity; -uniform vec3 fg_Planes; -varying vec3 ray; - -vec3 position( vec3 viewDir, vec2 coords, sampler2D depth_tex ); - -void main() { - vec2 coords = gl_TexCoord[0].xy; - float initialized = texture2D( spec_emis_tex, coords ).a; - if ( initialized < 0.1 ) - discard; - vec3 normal; - vec3 pos = position( normalize(ray), coords, depth_tex ); - - float fogFactor = 0.0; - const float LOG2 = 1.442695; - fogFactor = exp2(-fg_FogDensity * fg_FogDensity * pos.z * pos.z * LOG2); - fogFactor = clamp(fogFactor, 0.0, 1.0); - - gl_FragColor = vec4(fg_FogColor.rgb, 1.0 - fogFactor); -} diff --git a/Shaders/fog.vert b/Shaders/fog.vert deleted file mode 100644 index f283ea7af..000000000 --- a/Shaders/fog.vert +++ /dev/null @@ -1,8 +0,0 @@ -#version 120 -uniform mat4 fg_ProjectionMatrixInverse; -varying vec3 ray; -void main() { - gl_Position = gl_Vertex; - gl_TexCoord[0] = gl_MultiTexCoord0; - ray = (fg_ProjectionMatrixInverse * gl_Vertex).xyz; -} diff --git a/Shaders/forest.frag b/Shaders/forest.frag index 4d8a7d349..084fded6e 100644 --- a/Shaders/forest.frag +++ b/Shaders/forest.frag @@ -28,6 +28,8 @@ uniform int fogType; vec3 fog_Func(vec3 color, int type); ////////////////////// +float getShadowing(); + float ray_intersect(sampler2D reliefMap, vec2 dp, vec2 ds) { @@ -183,7 +185,7 @@ void main (void) 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); + vec4 ambient_light = gl_LightSource[0].diffuse * vec4(diffuse, 0.0) * getShadowing(); c1 *= ambient_light; vec4 finalColor = c1; diff --git a/Shaders/forest.vert b/Shaders/forest.vert index 226ebb141..3b566c1b7 100644 --- a/Shaders/forest.vert +++ b/Shaders/forest.vert @@ -16,6 +16,8 @@ attribute vec3 binormal; // void fog_Func(int type); // ///////////////////////// +void setupShadows(vec4 eyeSpacePos); + void main(void) { rawpos = gl_Vertex; @@ -31,4 +33,5 @@ void main(void) gl_Position = ftransform(); gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; // fog_Func(fogType); + setupShadows(ecPosition); } diff --git a/Shaders/fullscreen.vert b/Shaders/fullscreen.vert deleted file mode 100644 index 014076a02..000000000 --- a/Shaders/fullscreen.vert +++ /dev/null @@ -1,5 +0,0 @@ -#version 120 -void main() { - gl_Position = gl_Vertex; - gl_TexCoord[0] = gl_MultiTexCoord0; -} diff --git a/Shaders/gbuffer-encode.frag b/Shaders/gbuffer-encode.frag deleted file mode 100644 index ac6bf1ad8..000000000 --- a/Shaders/gbuffer-encode.frag +++ /dev/null @@ -1,25 +0,0 @@ -// -*- mode: C; -*- -#version 120 -// Licence: GPL v2 -// Author: Frederic Bouvier. - -uniform bool fg_DepthInColor; - -vec2 normal_encode(vec3 n); -vec3 float_to_color(in float f); - -// attachment 0: normal.x | normal.y | 0.0 | 1.0 -// attachment 1: diffuse.r | diffuse.g | diffuse.b | material Id -// attachment 2: specular.l | shininess | emission.l | unused -// attachment 3: ---------- depth ------------ | unused (optional) -// -void encode_gbuffer(vec3 normal, vec3 color, int mId, float specular, float shininess, float emission, float depth) -{ - gl_FragData[0] = vec4( normal_encode(normal), 0.0, 1.0 ); - gl_FragData[1] = vec4( color, float( mId ) / 255.0 ); - gl_FragData[2] = vec4( specular, shininess / 128.0, emission, 1.0 ); - vec3 dcol = vec3(1.0, 1.0, 1.0); - if (fg_DepthInColor) - dcol = float_to_color(depth); - gl_FragData[3] = vec4(dcol, 1.0); -} diff --git a/Shaders/gbuffer-functions.frag b/Shaders/gbuffer-functions.frag deleted file mode 100644 index 5a92f68d1..000000000 --- a/Shaders/gbuffer-functions.frag +++ /dev/null @@ -1,70 +0,0 @@ -// -*- mode: C; -*- -#version 120 -// Licence: GPL v2 -// Author: Frederic Bouvier. - -uniform vec3 fg_Planes; -uniform bool fg_DepthInColor; - -// normal compression functions from -// http://aras-p.info/texts/CompactNormalStorage.html#method04spheremap -vec2 normal_encode(vec3 n) -{ - float p = sqrt(n.z * 8.0 + 8.0); - return n.xy / p + 0.5; -} - -vec3 normal_decode(vec2 enc) -{ - vec2 fenc = enc * 4.0 - 2.0; - float f = dot(fenc,fenc); - float g = sqrt(1.0 - f / 4.0); - vec3 n; - n.xy = fenc * g; - n.z = 1.0 - f / 2.0; - return n; -} - -// depth to color encoding and decoding functions from -// Deferred Shading Tutorial by Fabio Policarpo and Francisco Fonseca -// (corrected by Frederic Bouvier) -vec3 float_to_color(in float f) -{ - vec3 color; - f *= 255.0; - color.x = floor(f); - f = (f-color.x)*255.0; - color.y = floor(f); - color.z = f-color.y; - color.xy /= 255.0; - return color; -} - -float color_to_float(vec3 color) -{ - const vec3 byte_to_float = vec3(1.0, 1.0/255.0, 1.0/(255.0*255.0)); - return dot(color,byte_to_float); -} - -vec3 position( vec3 viewDir, float depth ) -{ - vec3 pos; - pos.z = - fg_Planes.y / (fg_Planes.x + depth * fg_Planes.z); - pos.xy = viewDir.xy / viewDir.z * pos.z; - return pos; -} - -vec3 position( vec3 viewDir, vec3 depthColor ) -{ - return position( viewDir, color_to_float(depthColor) ); -} - -vec3 position( vec3 viewDir, vec2 coords, sampler2D depth_tex ) -{ - float depth; - if (fg_DepthInColor) - depth = color_to_float( texture2D( depth_tex, coords ).rgb ); - else - depth = texture2D( depth_tex, coords ).r; - return position( viewDir, depth ); -} diff --git a/Shaders/generic-ALS-base.vert b/Shaders/generic-ALS-base.vert index ecabf9e44..103c4a7ac 100644 --- a/Shaders/generic-ALS-base.vert +++ b/Shaders/generic-ALS-base.vert @@ -36,6 +36,7 @@ uniform float overcast; uniform float ground_scattering; uniform float moonlight; +void setupShadows(vec4 eyeSpacePos); // This is the value used in the skydome scattering shader - use the same here for consistency? const float EarthRadius = 5800000.0; @@ -239,6 +240,7 @@ else // the faster, full-day version without lightfields gl_FrontColor.rgb = constant_term.rgb; gl_FrontColor.a = 1.0; gl_BackColor.rgb = constant_term.rgb; gl_BackColor.a = 0.0; + setupShadows(gl_ModelViewMatrix * gl_Vertex); } diff --git a/Shaders/grass-ALS.frag b/Shaders/grass-ALS.frag index 34238f2b9..f797a37f9 100644 --- a/Shaders/grass-ALS.frag +++ b/Shaders/grass-ALS.frag @@ -2,7 +2,7 @@ #version 120 #define BLADE_FRACTION 0.1 -#define MAX_LAYERS 30 +#define MAX_LAYERS 20 #define MAX_DISTANCE 1000.0 uniform float visibility; @@ -37,6 +37,8 @@ float rand2D(in vec2 co); float Noise2D(in vec2 co, in float wavelength); vec3 filter_combined (in vec3 color) ; +float getShadowing(); + float map(float s, float a1, float a2, float b1, float b2) { @@ -153,7 +155,7 @@ void main() texel.r = min(1.0, (1.0 + 2.5 * 0.1 * season) * texel.r); texel.g = texel.g; texel.b = max(0.0, (1.0 - 4.0 * 0.1 * season) * texel.b); - float intensity = length(texel.rgb) * (1.0 - 0.5 * smoothstep(1.1,2.0,season)); + float intensity = length(texel.rgb) * (1.0 - 0.5 * smoothstep(1.1,2.0,season)) * mix(0.3, 1.0, getShadowing()); texel.rgb = intensity * normalize(mix(texel.rgb, vec3(0.23,0.17,0.08), smoothstep(1.1,2.0, season))); float base_alpha = clamp(0.4 * max_height/0.3, 0.4, 1.0); diff --git a/Shaders/grass-ALS.geom b/Shaders/grass-ALS.geom index f53049850..f96732528 100644 --- a/Shaders/grass-ALS.geom +++ b/Shaders/grass-ALS.geom @@ -2,9 +2,9 @@ #version 120 #extension GL_EXT_geometry_shader4 : enable -#define MAX_LAYERS 30 -#define MIN_LAYERS 8 -#define MAX_MINUS_MIN_LAYERS 22 +#define MAX_LAYERS 20 +#define MIN_LAYERS 2 +#define MAX_MINUS_MIN_LAYERS 18 uniform float max_height; @@ -14,7 +14,18 @@ varying out vec2 g_rawpos; varying out float g_distance_to_eye; varying out float g_layer; - +uniform mat4 fg_LightMatrix_csm0; +uniform mat4 fg_LightMatrix_csm1; +uniform mat4 fg_LightMatrix_csm2; +uniform mat4 fg_LightMatrix_csm3; +varying out vec4 lightSpacePos[4]; +void setupShadows(vec4 eyeSpacePos) +{ + lightSpacePos[0] = fg_LightMatrix_csm0 * eyeSpacePos; + lightSpacePos[1] = fg_LightMatrix_csm1 * eyeSpacePos; + lightSpacePos[2] = fg_LightMatrix_csm2 * eyeSpacePos; + lightSpacePos[3] = fg_LightMatrix_csm3 * eyeSpacePos; +} float min3(in float a, in float b, in float c) { @@ -45,6 +56,8 @@ void main() g_distance_to_eye = distances[i]; g_layer = currDeltaLayer; + setupShadows(gl_ModelViewMatrix * pos); + gl_Position = gl_ModelViewProjectionMatrix * pos; gl_TexCoord[0] = gl_TexCoordIn[i][0]; EmitVertex(); diff --git a/Shaders/light-point.frag b/Shaders/light-point.frag deleted file mode 100644 index c4b2c5dd7..000000000 --- a/Shaders/light-point.frag +++ /dev/null @@ -1,71 +0,0 @@ -#version 120 - -uniform vec2 fg_BufferSize; -uniform vec3 fg_Planes; - -uniform sampler2D depth_tex; -uniform sampler2D normal_tex; -uniform sampler2D color_tex; -uniform sampler2D spec_emis_tex; -uniform vec4 LightPosition; -uniform vec4 Ambient; -uniform vec4 Diffuse; -uniform vec4 Specular; -uniform vec3 Attenuation; -uniform float Near; -uniform float Far; - -varying vec4 ecPosition; - -vec3 position( vec3 viewDir, vec2 coords, sampler2D depth_tex ); -vec3 normal_decode(vec2 enc); - -void main() { - vec3 ray = ecPosition.xyz / ecPosition.w; - vec3 ecPos3 = ray; - vec3 viewDir = normalize(ray); - vec2 coords = gl_FragCoord.xy / fg_BufferSize; - - vec3 normal = normal_decode(texture2D( normal_tex, coords ).rg); - vec4 spec_emis = texture2D( spec_emis_tex, coords ); - - vec3 pos = position(viewDir, coords, depth_tex); - - if ( pos.z < ecPos3.z ) // Negative direction in z - discard; // Don't light surface outside the light volume - - vec3 VP = LightPosition.xyz - pos; - if ( dot( VP, VP ) > ( Far * Far ) ) - discard; // Don't light surface outside the light volume - - float d = length( VP ); - VP /= d; - - vec3 halfVector = normalize(VP - viewDir); - - float att = 1.0 / (Attenuation.x + Attenuation.y * d + Attenuation.z *d*d); - - float cosAngIncidence = clamp(dot(normal, VP), 0.0, 1.0); - - float nDotVP = max(0.0, dot(normal, VP)); - float nDotHV = max(0.0, dot(normal, halfVector)); - - vec4 color_material = texture2D( color_tex, coords ); - vec3 color = color_material.rgb; - vec3 Iamb = Ambient.rgb * color * att; - vec3 Idiff = Diffuse.rgb * color * att * nDotVP; - - float matID = color_material.a * 255.0; - float spec_intensity = spec_emis.x; - float spec_att = att; - if (matID == 254.0) { // 254: water, 255: Ubershader - spec_intensity = 1.0; // spec_color shouldn't depend on cloud cover when rendering spot light - spec_att = min(10.0 * att, 1.0); // specular attenuation reduced on water - } - - vec3 Ispec = vec3(0.0); - if (cosAngIncidence > 0.0) - Ispec = pow( nDotHV, spec_emis.y * 128.0 ) * spec_intensity * spec_att * Specular.rgb; - - gl_FragColor = vec4(Iamb + Idiff + Ispec, 1.0); -} diff --git a/Shaders/light-spot.frag b/Shaders/light-spot.frag deleted file mode 100644 index b92bc53a1..000000000 --- a/Shaders/light-spot.frag +++ /dev/null @@ -1,86 +0,0 @@ -#version 120 - -uniform vec2 fg_BufferSize; -uniform vec3 fg_Planes; - -uniform sampler2D depth_tex; -uniform sampler2D normal_tex; -uniform sampler2D color_tex; -uniform sampler2D spec_emis_tex; -uniform vec4 LightPosition; -uniform vec4 LightDirection; -uniform vec4 Ambient; -uniform vec4 Diffuse; -uniform vec4 Specular; -uniform vec3 Attenuation; -uniform float Exponent; -uniform float Cutoff; -uniform float CosCutoff; -uniform float Near; -uniform float Far; - -varying vec4 ecPosition; - -vec3 position( vec3 viewDir, vec2 coords, sampler2D depth_tex ); -vec3 normal_decode(vec2 enc); - -void main() { - vec3 ray = ecPosition.xyz / ecPosition.w; - vec3 ecPos3 = ray; - vec3 viewDir = normalize(ray); - vec2 coords = gl_FragCoord.xy / fg_BufferSize; - - vec3 normal = normal_decode(texture2D( normal_tex, coords ).rg); - vec4 spec_emis = texture2D( spec_emis_tex, coords ); - - vec3 pos = position(viewDir, coords, depth_tex); - - if ( pos.z < ecPos3.z ) // Negative direction in z - discard; // Don't light surface outside the light volume - - vec3 VP = LightPosition.xyz - pos; - if ( dot( VP, VP ) > ( Far * Far ) ) - discard; // Don't light surface outside the light volume - - float d = length( VP ); - VP /= d; - - vec3 halfVector = normalize(VP - viewDir); - - float att = 1.0 / (Attenuation.x + Attenuation.y * d + Attenuation.z *d*d); - float spotDot = dot(-VP, normalize(LightDirection.xyz)); - - float spotAttenuation = 0.0; - if (spotDot < CosCutoff) - spotAttenuation = 0.0; - else - spotAttenuation = pow(spotDot, Exponent); - att *= spotAttenuation; - - float cosAngIncidence = clamp(dot(normal, VP), 0.0, 1.0); - - float nDotVP = max(0.0, dot(normal, VP)); - float nDotHV = max(0.0, dot(normal, halfVector)); - - vec4 color_material = texture2D( color_tex, coords ); - vec3 color = color_material.rgb; - vec3 Iamb = Ambient.rgb * color * att; - vec3 Idiff = Diffuse.rgb * color * att * nDotVP; - - float matID = color_material.a * 255.0; - float spec_intensity = spec_emis.x; - float spec_att = att; - if (matID == 254.0) { // 254: water, 255: Ubershader - spec_intensity = 1.0; // spec_color shouldn't depend on cloud cover when rendering spot light - spec_att = min(10.0 * att, 1.0); // specular attenuation reduced on water - } - - vec3 Ispec = vec3(0.0); - if (cosAngIncidence > 0.0) - Ispec = pow( nDotHV, spec_emis.y * 128.0 ) * spec_intensity * spec_att * Specular.rgb; - - if (matID >= 254.0) - Idiff += Ispec * spec_emis.x; - - gl_FragColor = vec4(Iamb + Idiff + Ispec, 1.0); -} diff --git a/Shaders/light-spot.vert b/Shaders/light-spot.vert deleted file mode 100644 index 244db6b81..000000000 --- a/Shaders/light-spot.vert +++ /dev/null @@ -1,7 +0,0 @@ -#version 120 -varying vec4 ecPosition; - -void main() { - ecPosition = gl_ModelViewMatrix * gl_Vertex; - gl_Position = ftransform(); -} diff --git a/Shaders/model-ALS-base.frag b/Shaders/model-ALS-base.frag index 833bf3349..ecd756ff1 100644 --- a/Shaders/model-ALS-base.frag +++ b/Shaders/model-ALS-base.frag @@ -56,6 +56,8 @@ vec3 searchlight(); vec3 landing_light(in float offset, in float offsetv); vec3 filter_combined (in vec3 color) ; +float getShadowing(); + float luminance(vec3 color) { return dot(vec3(0.212671, 0.715160, 0.072169), color); @@ -107,12 +109,14 @@ void main() NdotL = dot(n, lightDir); if (NdotL > 0.0) { - color += diffuse_term * NdotL; + float shadowmap = getShadowing(); + color += diffuse_term * NdotL * shadowmap; NdotHV = max(dot(n, halfVector), 0.0); if (gl_FrontMaterial.shininess > 0.0) specular.rgb = (gl_FrontMaterial.specular.rgb * light_specular.rgb - * pow(NdotHV, gl_FrontMaterial.shininess)); + * pow(NdotHV, gl_FrontMaterial.shininess) + * shadowmap); } color.a = diffuse_term.a; // This shouldn't be necessary, but our lighting becomes very diff --git a/Shaders/model-ALS-ultra.frag b/Shaders/model-ALS-ultra.frag index 0c61f7392..56bc9e3a5 100644 --- a/Shaders/model-ALS-ultra.frag +++ b/Shaders/model-ALS-ultra.frag @@ -119,6 +119,8 @@ vec3 filter_combined (in vec3 color) ; vec3 moonlight_perception (in vec3 light) ; vec3 addLights(in vec3 color1, in vec3 color2); +float getShadowing(); + float light_func (in float x, in float a, in float b, in float c, in float d, in float e) { @@ -339,7 +341,8 @@ void main (void) else {pf1 = pow(nDotHV1, 0.5*gl_FrontMaterial.shininess);} - + float shadowmap = getShadowing(); + light_diffuse *= shadowmap; if (cloud_shadow_flag == 1) { @@ -387,6 +390,7 @@ void main (void) Specular+= gl_FrontMaterial.specular * pow(max(0.0,-dot(N,normalize(vertVec))),gl_FrontMaterial.shininess) * vec4(secondary_light,1.0); Specular *= refl_d; + Specular *= shadowmap; vec4 color = gl_Color + Diffuse * gl_FrontMaterial.diffuse; color = clamp( color, 0.0, 1.0 ); diff --git a/Shaders/model-ALS-ultra.vert b/Shaders/model-ALS-ultra.vert index c60ba8da4..844aadf99 100644 --- a/Shaders/model-ALS-ultra.vert +++ b/Shaders/model-ALS-ultra.vert @@ -28,6 +28,8 @@ uniform int shader_qual; // void fog_Func(int type); //////////////////////////// +void setupShadows(vec4 eyeSpacePos); + void rotationMatrixPR(in float sinRx, in float cosRx, in float sinRy, in float cosRy, out mat4 rotmat) { rotmat = mat4( cosRy , sinRx * sinRy , cosRx * sinRy, 0.0, @@ -112,4 +114,6 @@ void main(void) gl_Position = ftransform(); gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; + + setupShadows(ecPosition); } diff --git a/Shaders/model-ALS-wingflex.vert b/Shaders/model-ALS-wingflex.vert index b23502f12..b9e58372c 100644 --- a/Shaders/model-ALS-wingflex.vert +++ b/Shaders/model-ALS-wingflex.vert @@ -39,13 +39,14 @@ uniform float rotation_rad; uniform int refl_dynamic; uniform int nmap_enabled; uniform int shader_qual; -uniform int rembrandt_enabled; //////Fog Include/////////// // uniform int fogType; // void fog_Func(int type); //////////////////////////// +void setupShadows(vec4 eyeSpacePos); + void rotationMatrixPR(in float sinRx, in float cosRx, in float sinRy, in float cosRy, out mat4 rotmat) { rotmat = mat4( cosRy , sinRx * sinRy , cosRx * sinRy, 0.0, @@ -239,13 +240,12 @@ void main(void) reflVec = reflVec_stat; } - if(rembrandt_enabled < 1){ gl_FrontColor = gl_FrontMaterial.emission + gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient); - } else { - gl_FrontColor = gl_Color; - } + gl_Position = gl_ModelViewProjectionMatrix * vertex; //gl_Position = ftransform(); gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; + + setupShadows(gl_ModelViewMatrix * vertex); } diff --git a/Shaders/road-ALS-ultra.frag b/Shaders/road-ALS-ultra.frag index 615102498..89a21da9e 100644 --- a/Shaders/road-ALS-ultra.frag +++ b/Shaders/road-ALS-ultra.frag @@ -113,6 +113,8 @@ vec3 landing_light(in float offset, in float offsetv); vec3 filter_combined (in vec3 color) ; vec3 addLights(in vec3 color1, in vec3 color2); +float getShadowing(); + float light_func (in float x, in float a, in float b, in float c, in float d, in float e) { @@ -494,14 +496,14 @@ void main (void) secondary_light += landing_light(landing_light2_offset, landing_light3_offset); } - - vec4 Diffuse = light_diffuse * nDotVP; + float shadowmap = getShadowing(); + vec4 Diffuse = light_diffuse * nDotVP * shadowmap; Diffuse.rgb += secondary_light * light_distance_fading(dist); if (use_IR_vision) { Diffuse.rgb = max(Diffuse.rgb, vec3 (0.5, 0.5, 0.5)); } - vec4 Specular = gl_FrontMaterial.specular * light_diffuse * pf + gl_FrontMaterial.specular * light_ambient * pf1; + vec4 Specular = gl_FrontMaterial.specular * light_diffuse * pf + gl_FrontMaterial.specular * light_ambient * pf1 * shadowmap; Specular+= gl_FrontMaterial.specular * pow(max(0.0,-dot(N,nVertVec)),gl_FrontMaterial.shininess) * vec4(secondary_light,1.0); diff --git a/Shaders/rock-ALS.frag b/Shaders/rock-ALS.frag index 170e1bbb5..b764f7fb5 100644 --- a/Shaders/rock-ALS.frag +++ b/Shaders/rock-ALS.frag @@ -84,6 +84,8 @@ vec3 searchlight(); vec3 landing_light(in float offset, in float offsetv); vec3 filter_combined (in vec3 color) ; +float getShadowing(); + 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; @@ -446,8 +448,9 @@ if ((dist < 5000.0) && (combined_wetness>0.0)) float fresnel; if (NdotL > 0.0) { + float shadowmap = getShadowing(); if (cloud_shadow_flag == 1) {NdotL = NdotL * shadow_func(relPos.x, relPos.y, 0.3 * noise_250m + 0.5 * noise_500m+0.2 * noise_1500m, dist);} - color += diffuse_term * NdotL; + color += diffuse_term * NdotL * shadowmap; NdotHV = max(dot(n, halfVector), 0.0); fresnel = 1.0 + 5.0 * (1.0-smoothstep(0.0,0.2, dot(normalize(ecViewdir),n))); @@ -456,7 +459,8 @@ if ((dist < 5000.0) && (combined_wetness>0.0)) //if (gl_FrontMaterial.shininess > 0.0) specular.rgb = ((gl_FrontMaterial.specular.rgb * 0.1 + snow_factor * vec3(1.0,1.0,1.0) + (water_factor * vec3 (1.0, 1.0, 1.0))) * light_specular.rgb - * pow(NdotHV, max(gl_FrontMaterial.shininess,4.0) + (20.0 * water_factor))); + * pow(NdotHV, max(gl_FrontMaterial.shininess,4.0) + (20.0 * water_factor)) + * shadowmap); } color.a = 1.0;//diffuse_term.a; // This shouldn't be necessary, but our lighting becomes very diff --git a/Shaders/runway-ALS.frag b/Shaders/runway-ALS.frag index 4fb90f0ff..fdacfc916 100644 --- a/Shaders/runway-ALS.frag +++ b/Shaders/runway-ALS.frag @@ -73,6 +73,8 @@ vec3 rayleigh_out_shift(in vec3 color, in float outscatter); vec3 get_hazeColor(in float light_arg); vec3 filter_combined (in vec3 color) ; +float getShadowing(); + void main() { @@ -286,14 +288,16 @@ if ((dist < 5000.0)&& (quality_level > 3) && (wetness>0.0)) } if (NdotL > 0.0) { + float shadowmap = getShadowing(); if (cloud_shadow_flag == 1) {NdotL = NdotL * shadow_func(relPos.x, relPos.y, 1.0, dist);} - color += diffuse_term * NdotL; + color += diffuse_term * NdotL * shadowmap; NdotHV = max(dot(n, halfVector), 0.0); fresnel = 1.0 + 5.0 * (1.0-smoothstep(0.0,0.2, dot(E,n))); specular.rgb = ((vec3 (0.2,0.2,0.2) * fresnel + (water_factor * vec3 (1.0, 1.0, 1.0))) * light_specular.rgb - * pow(NdotHV, max(4.0, (20.0 * water_factor)))); + * pow(NdotHV, max(4.0, (20.0 * water_factor))) + * shadowmap); } // raindrops diff --git a/Shaders/runway-gbuffer.frag b/Shaders/runway-gbuffer.frag deleted file mode 100644 index 2906ad3a0..000000000 --- a/Shaders/runway-gbuffer.frag +++ /dev/null @@ -1,112 +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 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; - -void encode_gbuffer(vec3 normal, vec3 color, int mId, float specular, float shininess, float emission, float depth); - -void main (void) -{ - - 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 ambient = vec3(0.85,0.85,0.9);//placeholder for sun ambient - vec3 N; - float emission = dot( gl_FrontLightModelProduct.sceneColor.rgb + gl_FrontMaterial.emission.rgb, - vec3( 0.3, 0.59, 0.11 ) ); - - 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 nFactor = 1.0 - N.z; - 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) * nmap.a * nFactor; - - - float specular = dot(vec3(1.0) * lightness , vec3( 0.3, 0.59, 0.11 )) * nFactor; - - vec4 color = vec4(1.0); - - 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) * nFactor + 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); - vec3 ambient_Correction = vec3(ambient.rg, ambient.b * 0.6) * 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); - - vec4 reflfrescolor = mix(reflcolor, fresnel, fresneliness * v); - vec4 noisecolor = mix(reflfrescolor, noisevec, noisiness); - vec4 raincolor = vec4(noisecolor.rgb * reflFactor, 1.0) * nFactor; - vec4 mixedcolor = mix(texel, raincolor * (1.0 - refl_correction * (1.0 - lightness)), reflFactor); - - // the final reflection - vec4 fragColor = vec4(color.rgb * mixedcolor.rgb + ambient_Correction * nFactor, color.a); - float doWater = step(0.1, reflFactor); - int matIndex = int(doWater) * 253 + 1; - shininess += doWater * reflFactor * 240.0; - - encode_gbuffer(N, fragColor.rgb, matIndex, specular, shininess, emission, gl_FragCoord.z); -} diff --git a/Shaders/runway-gbuffer.vert b/Shaders/runway-gbuffer.vert deleted file mode 100644 index 4c9e7b346..000000000 --- a/Shaders/runway-gbuffer.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 = 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/runway.frag b/Shaders/runway.frag index ca7b5ab00..7ed26f317 100644 --- a/Shaders/runway.frag +++ b/Shaders/runway.frag @@ -38,6 +38,8 @@ uniform int fogType; vec3 fog_Func(vec3 color, int type); ////////////////////// +float getShadowing(); + void main (void) { //vec3 halfV; @@ -71,9 +73,10 @@ void main (void) else pf = pow(nDotHV, /*gl_FrontMaterial.*/shininess); - vec4 Diffuse = gl_LightSource[0].diffuse * nDotVP; + 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; + 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; @@ -129,4 +132,4 @@ void main (void) fragColor.rgb = fog_Func(fragColor.rgb, fogType); gl_FragColor = fragColor; -} \ No newline at end of file +} diff --git a/Shaders/shadow-ALS.frag b/Shaders/shadow-ALS.frag deleted file mode 100644 index ff9c2765b..000000000 --- a/Shaders/shadow-ALS.frag +++ /dev/null @@ -1,20 +0,0 @@ -#version 120 - -uniform sampler2D texture; -uniform float scattering; -varying float alpha_correction; - -void main() -{ - vec4 texel = texture2D(texture, gl_TexCoord[0].st); - texel.a = smoothstep(0.0,0.1, texel.a); - - float illumination = length(gl_Color.rgb); - texel = vec4 (0.1,0.1,0.1,texel.a); - texel.a *= illumination; - texel.a *=0.6 * smoothstep(0.5,0.8,scattering); - texel.a = min(0.8, texel.a); - - vec4 fragColor = texel; - gl_FragColor = fragColor * alpha_correction;; -} diff --git a/Shaders/shadow-ALS.vert b/Shaders/shadow-ALS.vert deleted file mode 100644 index 0786e659e..000000000 --- a/Shaders/shadow-ALS.vert +++ /dev/null @@ -1,77 +0,0 @@ -// -*-C++-*- - - -#version 120 - -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 float alt_agl; -uniform float gear_clearance; - -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) -{ - -if (x < -15.0) {return 0.0;} - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - -varying float alpha_correction; - -void main() -{ - alpha_correction = 1.0; - - gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; - - vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0); - vec3 relPos = gl_Vertex.xyz - ep.xyz; - - - // compute the strength of light - float vertex_alt = max(gl_Vertex.z,100.0); - float scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_alt); - vec3 lightFull = (gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz; - vec3 lightHorizon = normalize(vec3(lightFull.x,lightFull.y, 0.0)); - float yprime = -dot(relPos, lightHorizon); - float yprime_alt = yprime - sqrt(2.0 * EarthRadius * vertex_alt); - float earthShade = 0.6 * (1.0 - smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt)) + 0.4; - float lightArg = (terminator-yprime_alt)/100000.0; - vec4 light_diffuse; - 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.a = 1.0; - light_diffuse = light_diffuse * scattering; - 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_diffuse.rgb = light_diffuse.rgb * (1.0 + 1.2 * shade_depth); - - - // project the shadow onto the ground - vec4 pos = gl_Vertex; - pos.z-=0.95 * alt_agl-0.1; - pos.xy -= lightFull.xy * 0.95* alt_agl/lightFull.z; - - // enlargen the shadow for low light - if (dot(pos.xy, lightHorizon.xy)<0.0) - { - pos.xy -= lightFull.xy * gear_clearance/lightFull.z; - } - - - gl_Position = gl_ModelViewProjectionMatrix * pos; - - gl_FrontColor = light_diffuse; - gl_BackColor = gl_FrontColor; -} diff --git a/Shaders/shadow-vol-ALS.vert b/Shaders/shadow-vol-ALS.vert deleted file mode 100644 index 5ecf7d256..000000000 --- a/Shaders/shadow-vol-ALS.vert +++ /dev/null @@ -1,161 +0,0 @@ -// -*-C++-*- - - -#version 120 - -uniform float hazeLayerAltitude; -uniform float terminator; -uniform float terrain_alt; -uniform float overcast; -uniform float ground_scattering; -uniform float eye_alt; -uniform float moonlight; -uniform float alt_agl; -uniform float pitch; -uniform float roll; -uniform float gear_clearance; - - - -const float EarthRadius = 5800000.0; -const float terminator_width = 200000.0; - -void rotationMatrixPR(in float sinRx, in float cosRx, in float sinRy, in float cosRy, out mat4 rotmat) -{ - rotmat = mat4( cosRy , sinRx * sinRy , cosRx * sinRy, 0.0, - 0.0 , cosRx , -sinRx , 0.0, - -sinRy, sinRx * cosRy, cosRx * cosRy , 0.0, - 0.0 , 0.0 , 0.0 , 1.0 ); -} - -/* - -//Experimental - not used for now. Seems to work functionally the same as rotationMatrixPR -void rotationMatrixRP(in float sinRx, in float cosRx, in float sinRy, in float cosRy, out mat4 rotmat) -{ - rotmat = mat4( cosRy , sinRx * sinRy , -cosRx * sinRy, 0.0, - 0.0 , cosRx , sinRx , 0.0, - sinRy, -sinRx * cosRy, cosRx * cosRy , 0.0, - 0.0 , 0.0 , 0.0 , 1.0 ); -} -*/ - -float light_func (in float x, in float a, in float b, in float c, in float d, in float e) -{ - -if (x < -15.0) {return 0.0;} - -return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d)); -} - -varying float alpha_correction; - -void main() -{ - float start_fade = 0; - float end_fade = 100; - float diff = end_fade - start_fade; - alpha_correction = 1.0 - smoothstep(start_fade, end_fade, alt_agl); - - gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; - - vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0); - vec3 relPos = gl_Vertex.xyz - ep.xyz; - - - // compute the strength of light - float vertex_alt = max(gl_Vertex.z,100.0); - float scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_alt); - vec3 lightFull = (gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz; - vec3 lightHorizon = normalize(vec3(lightFull.x,lightFull.y, 0.0)); - float yprime = -dot(relPos, lightHorizon); - float yprime_alt = yprime - sqrt(2.0 * EarthRadius * vertex_alt); - float earthShade = 0.6 * (1.0 - smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt)) + 0.4; - float lightArg = (terminator-yprime_alt)/100000.0; - vec4 light_diffuse; - 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.a = 1.0; - light_diffuse = light_diffuse * scattering; - 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_diffuse.rgb = light_diffuse.rgb * (1.0 + 1.2 * shade_depth); - - //experiment - light_diffuse.b = 1.0; - light_diffuse.g = 1.0; - light_diffuse.r = 1.0; - light_diffuse.a = 1.0; - - //prepare rotation matrix - mat4 RotMatPR; - mat4 RotMatPR_tr; - - float _roll = roll; - - - //if (_roll>90.0 || _roll < -90.0) //making roll=-roll when >90 is no longer necessary thanks to fix with transpose of rotation matrix. - //{_roll = -_roll;} - float cosRx = cos(radians(-_roll)); - float sinRx = sin(radians(-_roll)); - float cosRy = cos(radians(pitch)); - float sinRy = sin(radians(pitch)); - - rotationMatrixPR(sinRx, cosRx, sinRy, cosRy, RotMatPR); - //rotationMatrixRP(sinRx, cosRx, sinRy, cosRy, RotMatPR); - - RotMatPR_tr=transpose(RotMatPR); //RotMatPR works fine if pitch =0 or roll=0 but if say pitch=35 and roll=60 the rotation is all wrong. transpose(RotMatPR) however works perfectly. - - - // project the shadow onto the ground - //vec4 vertex = RotMatPR * gl_Vertex; - vec4 vertex = RotMatPR_tr * gl_Vertex; - vec4 pos = vertex; - - vec2 deltaxy = lightFull.xy * 0.95* (alt_agl + vertex.z + gear_clearance)/lightFull.z; //This is the 'actual' location, taking into a account the full 3-D structure of the aircraft - - vec2 deltazeroxy = lightFull.xy * 0.95* (alt_agl + gear_clearance)/lightFull.z; //Instead of using the exact z value of this particularly point to determine the distance of the shadow & reposition & shrink it appropriately, we'll just use the origin (0,0,0) of the model instead. This avoids a problem below, where varying vertex.z in deltaxy and then using deltaxy to calculate dist caused the shadow to sort of slant upwards, thanks to the varying z values used - - float dist = sqrt(deltazeroxy.x * deltazeroxy.x + deltazeroxy.y * deltazeroxy.y + alt_agl * alt_agl); //could use function 'distance' instead, might be better? - - - if (dist < 75) - { - - pos.z = -0.9 * alt_agl + 0.05 * vertex.z; - //pos.z = 0.05 * (vertex.z + gear_clearance); - - pos.xy -= deltaxy; - - } - else - { - //The code below to shrink the shadow while keeping it 75 m. away has some issues that need to be fixed. Making the shadow shrink at x^2 rate partly to cover up this problem until it can be solved . . . - //The problem is that the aircraft isn't flat/parallel to the ground any more, but it appears to be at an angle to the ground. - //The various shrinkages perhaps mess with the angles somehow, meaning that when the animations apply the roll & pitch corrections they just don't quite work as they should - pos.z = (-0.9*75)*alt_agl/dist + 0.05 * vertex.z ; //if the shadow is more than about 75 meters from the aircraft it disappears so we are going to just keep it right at 75 m. & make it smaller to simulate greater distance. - //(-0.9*75) is the same factor for altitude we were using above when dist=75. *alt_agl/dist keeps it at the right height proportionally to simulate the location at a further distance, while actually just keeping it at 75 m. distance. - - //pos.z = 0.05 * vertex.z ; //if the shadow is more than about 75 meters from the aircraft it disappears so we are going to just keep it right at 75 m. & make it smaller to simulate greater distance. - - - - //shrink the size FIRST, THEN move where it needs to be. If you shrink later you're also shrinking the deltaxy distance moved, which doesn't work well - pos.xy = 75 / dist * pos.xy; //shrinking the size of the shadow to simulate further distance. Should be linear shrinkage but doing it ^2 for now to help ucover up the issues in code above. - - pos.xy -= 75 * deltaxy/dist; // Similarly to above, * deltaxy/dist; keeps it at the right XY position proportionally to simulate the location at a further distance, while actually just keeping it at 75 m. distance. - - } - - // pos.z = pos.z - offset; - - //if (dist>=75) pos = pos * 30/dist; //not sure why this doesn't work/ perhaps an overflow of some kind? - - gl_Position = gl_ModelViewProjectionMatrix * pos; - - gl_FrontColor = light_diffuse; - //light_diffuse.a=0; - gl_BackColor = gl_FrontColor; - //gl_BackColor = light_diffuse; -} diff --git a/Compositor/Shaders/ALS/shadows-include.frag b/Shaders/shadows-include.frag similarity index 87% rename from Compositor/Shaders/ALS/shadows-include.frag rename to Shaders/shadows-include.frag index 8361c6f61..9eb03856f 100644 --- a/Compositor/Shaders/ALS/shadows-include.frag +++ b/Shaders/shadows-include.frag @@ -7,7 +7,9 @@ uniform int sun_atlas_size; varying vec4 lightSpacePos[4]; -const float depth_bias = 0.0005; +const bool DEBUG_CASCADES = false; + +const float depth_bias = 2.0; // Ideally these should be passed as an uniform, but we don't support uniform // arrays yet @@ -17,6 +19,17 @@ const vec2 uv_shifts[4] = vec2[4]( const vec2 uv_factor = vec2(0.5, 0.5); +float debugCascade(int cascade) +{ + const mat2 bayer_matrix = mat2(0, 3, 2, 1); + const float scale = 1.0; + vec2 coords = mod(gl_FragCoord.xy * scale, 2.0); + int threshold = int(bayer_matrix[int(coords.y)][int(coords.x)]); + if (threshold <= cascade) + return 0.0; + return 1.0; +} + float checkWithinBounds(vec2 coords, vec2 bottomLeft, vec2 topRight) { vec2 r = step(bottomLeft, coords) - step(topRight, coords); @@ -28,7 +41,7 @@ float sampleOffset(vec4 pos, vec2 offset, vec2 invTexelSize) return shadow2DProj( shadow_tex, vec4( pos.xy + offset * invTexelSize * pos.w, - pos.z - depth_bias, + pos.z - depth_bias * invTexelSize.x, pos.w)).r; } @@ -105,6 +118,9 @@ float getShadowing() for (int i = 0; i < 4; ++i) { if (checkWithinBounds(lightSpacePos[i].xy, vec2(0.0), vec2(1.0)) > 0.0 && (lightSpacePos[i].z / lightSpacePos[i].w) <= 1.0) { + if (DEBUG_CASCADES) + return debugCascade(i); + if (checkWithinBounds(lightSpacePos[i].xy, bandBottomLeft, bandTopRight) < 1.0) { vec2 s = smoothstep(vec2(0.0), bandBottomLeft, lightSpacePos[i].xy) - diff --git a/Compositor/Shaders/ALS/shadows-include.vert b/Shaders/shadows-include.vert similarity index 59% rename from Compositor/Shaders/ALS/shadows-include.vert rename to Shaders/shadows-include.vert index bc6758ee9..afbffbbde 100644 --- a/Compositor/Shaders/ALS/shadows-include.vert +++ b/Shaders/shadows-include.vert @@ -9,20 +9,22 @@ uniform mat4 fg_LightMatrix_csm3; varying vec4 lightSpacePos[4]; +const float normal_offset_scale = 0.1; + void setupShadows(vec4 eyeSpacePos) { if (!shadows_enabled) return; - float normalOffset = 0.005; + vec3 normal = gl_NormalMatrix * gl_Normal; - float costheta = clamp(dot(gl_Normal, gl_LightSource[0].position.xyz), 0.0, 1.0); - float slopeScale = 1.0 - costheta; - normalOffset *= slopeScale; + vec3 toLight = normalize(gl_LightSource[0].position.xyz); + float costheta = dot(normal, toLight); + float slopeScale = clamp(1.0 - costheta, 0.0, 1.0); + float normalOffset = normal_offset_scale * slopeScale; - vec4 offsetPos = gl_ModelViewMatrix * - (gl_Vertex + vec4(gl_Normal, 0.0) * normalOffset); + vec4 offsetPos = eyeSpacePos + vec4(normal * normalOffset, 0.0); vec4 offsets[4]; offsets[0] = fg_LightMatrix_csm0 * offsetPos; @@ -36,8 +38,8 @@ void setupShadows(vec4 eyeSpacePos) lightSpacePos[3] = fg_LightMatrix_csm3 * eyeSpacePos; // Offset only in UV space - // lightSpacePos[0].xy = offsets[0].xy; - // lightSpacePos[1].xy = offsets[1].xy; - // lightSpacePos[2].xy = offsets[2].xy; - // lightSpacePos[3].xy = offsets[3].xy; + lightSpacePos[0].xy = offsets[0].xy; + lightSpacePos[1].xy = offsets[1].xy; + lightSpacePos[2].xy = offsets[2].xy; + lightSpacePos[3].xy = offsets[3].xy; } diff --git a/Shaders/ssao.frag b/Shaders/ssao.frag deleted file mode 100644 index de29876e0..000000000 --- a/Shaders/ssao.frag +++ /dev/null @@ -1,64 +0,0 @@ -#version 120 -#extension GL_EXT_gpu_shader4 : enable -uniform sampler2D normal_tex; -uniform sampler2D depth_tex; -uniform sampler2D spec_emis_tex; -uniform sampler3D noise_tex; -uniform vec2 fg_BufferSize; -uniform vec3 fg_Planes; -uniform vec4 fg_du; -uniform vec4 fg_dv; -uniform float g_scale; -uniform float g_bias; -uniform float g_intensity; -uniform float g_sample_rad; -uniform float random_size; -uniform float osg_SimulationTime; - -varying vec4 ray; - -const vec2 v[4] = vec2[](vec2(1.0,0.0),vec2(-1.0,0.0),vec2(0.0,1.0),vec2(0.0,-1.0)); - -vec3 position( vec3 viewDir, vec2 coords, sampler2D depth_tex ); -vec3 normal_decode(vec2 enc); - -vec2 getRandom( in vec2 uv ) { - float level = osg_SimulationTime - float(int(osg_SimulationTime)); - return normalize( texture3D( noise_tex, vec3(uv*50.0, level) ).xy * 0.14 - 0.07 ); -} -vec3 getPosition(in vec2 uv, in vec2 uv0, in vec4 ray0) { - vec2 duv = uv - uv0; - vec4 ray = ray0 + fg_du * duv.x + fg_dv * duv.y; - vec3 viewDir = normalize( ray.xyz ); - return position(viewDir, uv, depth_tex); -} -float doAmbientOcclusion(in vec2 tcoord, in vec2 uv, in vec3 p, in vec3 cnorm, in vec4 ray) { - vec3 diff = getPosition(tcoord+uv,tcoord,ray)-p; - float d = length(diff); - vec3 v = diff / d; - d *= g_scale; - return max(0.0, dot( cnorm,v ) - g_bias) * (1.0/(1.0+d)) * g_intensity; -} -void main() { - vec2 coords = gl_TexCoord[0].xy; - float initialized = texture2D( spec_emis_tex, coords ).a; - if ( initialized < 0.1 ) - discard; - vec3 normal = normal_decode(texture2D( normal_tex, coords ).rg); - vec3 viewDir = normalize(ray.xyz); - vec3 pos = position(viewDir, coords, depth_tex); - vec2 rand = getRandom(coords); - float ao = 0.0; - float rad = g_sample_rad; - int iterations = 4; - for (int j = 0; j < 1; ++j ) { - vec2 coord1 = reflect( v[j], rand ) * rad; - vec2 coord2 = vec2( coord1.x*0.707 - coord1.y*0.707, coord1.x*0.707 + coord1.y*0.707 ); - ao += doAmbientOcclusion(coords,coord1*0.25,pos,normal,ray); - ao += doAmbientOcclusion(coords,coord2*0.5,pos,normal,ray); - ao += doAmbientOcclusion(coords,coord1*0.75,pos,normal,ray); - ao += doAmbientOcclusion(coords,coord2,pos,normal,ray); - } - ao /= 16.0; - gl_FragColor = vec4( vec3(1.0 - ao), 1.0 ); -} diff --git a/Shaders/ssao.vert b/Shaders/ssao.vert deleted file mode 100644 index c1ef46dc6..000000000 --- a/Shaders/ssao.vert +++ /dev/null @@ -1,8 +0,0 @@ -#version 120 -uniform mat4 fg_ProjectionMatrixInverse; -varying vec4 ray; -void main() { - gl_Position = gl_Vertex; - gl_TexCoord[0] = gl_MultiTexCoord0; - ray = fg_ProjectionMatrixInverse * gl_Vertex; -} diff --git a/Shaders/sunlight-nofiltering.frag b/Shaders/sunlight-nofiltering.frag deleted file mode 100644 index 5c530c0e0..000000000 --- a/Shaders/sunlight-nofiltering.frag +++ /dev/null @@ -1,91 +0,0 @@ -#version 120 - -uniform mat4 fg_ViewMatrix; -uniform sampler2D depth_tex; -uniform sampler2D normal_tex; -uniform sampler2D color_tex; -uniform sampler2D spec_emis_tex; -uniform sampler2DShadow shadow_tex; -uniform vec4 fg_SunDiffuseColor; -uniform vec4 fg_SunSpecularColor; -uniform vec4 fg_SunAmbientColor; -uniform vec3 fg_SunDirection; -uniform vec3 fg_Planes; -uniform int fg_ShadowNumber; -uniform vec4 fg_ShadowDistances; - -uniform mat4 fg_ShadowMatrix_0; -uniform mat4 fg_ShadowMatrix_1; -uniform mat4 fg_ShadowMatrix_2; -uniform mat4 fg_ShadowMatrix_3; - -varying vec3 ray; - -vec3 position( vec3 viewDir, vec2 coords, sampler2D depth_tex ); -vec3 normal_decode(vec2 enc); - -vec4 DynamicShadow( in vec4 ecPosition, out vec4 tint ) -{ - vec4 coords; - vec2 shift = vec2( 0.0 ); - int index = 4; - float factor = 0.5; - if (ecPosition.z > -fg_ShadowDistances.x) { - index = 1; - if (fg_ShadowNumber == 1) - factor = 1.0; - tint = vec4(0.0,1.0,0.0,1.0); - coords = fg_ShadowMatrix_0 * ecPosition; - } else if (ecPosition.z > -fg_ShadowDistances.y && fg_ShadowNumber > 1) { - index = 2; - shift = vec2( 0.0, 0.5 ); - tint = vec4(0.0,0.0,1.0,1.0); - coords = fg_ShadowMatrix_1 * ecPosition; - } else if (ecPosition.z > -fg_ShadowDistances.z && fg_ShadowNumber > 2) { - index = 3; - shift = vec2( 0.5, 0.0 ); - tint = vec4(1.0,1.0,0.0,1.0); - coords = fg_ShadowMatrix_2 * ecPosition; - } else if (ecPosition.z > -fg_ShadowDistances.w && fg_ShadowNumber > 3) { - shift = vec2( 0.5, 0.5 ); - tint = vec4(1.0,0.0,0.0,1.0); - coords = fg_ShadowMatrix_3 * ecPosition; - } else { - return vec4(1.1,1.1,0.0,1.0); // outside, clamp to border - } - coords.st *= factor; - coords.st += shift; - return coords; -} -void main() { - vec2 coords = gl_TexCoord[0].xy; - vec4 spec_emis = texture2D( spec_emis_tex, coords ); - if ( spec_emis.a < 0.1 ) - discard; - vec3 normal = normal_decode(texture2D( normal_tex, coords ).rg); - vec3 viewDir = normalize(ray); - vec3 pos = position( viewDir, coords, depth_tex ); - - vec4 tint; - float shadow = shadow2DProj( shadow_tex, DynamicShadow( vec4( pos, 1.0 ), tint ) ).r; - vec3 lightDir = (fg_ViewMatrix * vec4( fg_SunDirection, 0.0 )).xyz; - lightDir = normalize( lightDir ); - vec3 color = texture2D( color_tex, coords ).rgb; - vec3 Idiff = clamp( dot( lightDir, normal ), 0.0, 1.0 ) * color * fg_SunDiffuseColor.rgb; - vec3 halfDir = normalize( lightDir - viewDir ); - vec3 Ispec = vec3(0.0); - vec3 Iemis = spec_emis.z * color; - - float cosAngIncidence = clamp(dot(normal, lightDir), 0.0, 1.0); - float blinnTerm = clamp( dot( halfDir, normal ), 0.0, 1.0 ); - - if (cosAngIncidence > 0.0) - Ispec = pow( blinnTerm, spec_emis.y * 128.0 ) * spec_emis.x * fg_SunSpecularColor.rgb; - - float matID = texture2D( color_tex, coords ).a * 255.0; - if (matID >= 254.0) - Idiff += Ispec * spec_emis.x; - - gl_FragColor = vec4(mix(vec3(0.0), Idiff + Ispec, shadow) + Iemis, 1.0); -// gl_FragColor = mix(tint, vec4(mix(vec3(0.0), Idiff + Ispec, shadow) + Iemis, 1.0), 0.92); -} diff --git a/Shaders/sunlight-noshadow.frag b/Shaders/sunlight-noshadow.frag deleted file mode 100644 index d43be1ba8..000000000 --- a/Shaders/sunlight-noshadow.frag +++ /dev/null @@ -1,43 +0,0 @@ -#version 120 - -uniform mat4 fg_ViewMatrix; -uniform sampler2D depth_tex; -uniform sampler2D normal_tex; -uniform sampler2D color_tex; -uniform sampler2D spec_emis_tex; -uniform vec4 fg_SunDiffuseColor; -uniform vec4 fg_SunSpecularColor; -uniform vec3 fg_SunDirection; -uniform vec3 fg_Planes; -varying vec3 ray; - -vec3 normal_decode(vec2 enc); - -void main() { - vec2 coords = gl_TexCoord[0].xy; - vec4 spec_emis = texture2D( spec_emis_tex, coords ); - if ( spec_emis.a < 0.1 ) - discard; - vec3 normal = normal_decode(texture2D( normal_tex, coords ).rg); - vec3 viewDir = normalize(ray); - - vec3 lightDir = (fg_ViewMatrix * vec4( fg_SunDirection, 0.0 )).xyz; - lightDir = normalize( lightDir ); - vec3 color = texture2D( color_tex, coords ).rgb; - vec3 Idiff = clamp( dot( lightDir, normal ), 0.0, 1.0 ) * color * fg_SunDiffuseColor.rgb; - vec3 halfDir = normalize( lightDir - viewDir ); - vec3 Ispec = vec3(0.0); - vec3 Iemis = spec_emis.z * color; - - float cosAngIncidence = clamp(dot(normal, lightDir), 0.0, 1.0); - float blinnTerm = clamp( dot( halfDir, normal ), 0.0, 1.0 ); - - if (cosAngIncidence > 0.0) - Ispec = pow( blinnTerm, spec_emis.y * 128.0 ) * spec_emis.x * fg_SunSpecularColor.rgb; - - float matID = texture2D( color_tex, coords ).a * 255.0; - if (matID >= 254.0) - Idiff += Ispec * spec_emis.x; - - gl_FragColor = vec4(Idiff + Ispec + Iemis, 1.0); -} diff --git a/Shaders/sunlight.frag b/Shaders/sunlight.frag deleted file mode 100644 index 918dbf003..000000000 --- a/Shaders/sunlight.frag +++ /dev/null @@ -1,107 +0,0 @@ -#version 120 -uniform mat4 fg_ViewMatrix; -uniform sampler2D depth_tex; -uniform sampler2D normal_tex; -uniform sampler2D color_tex; -uniform sampler2D spec_emis_tex; -uniform sampler2DShadow shadow_tex; -uniform vec4 fg_SunDiffuseColor; -uniform vec4 fg_SunSpecularColor; -uniform vec3 fg_SunDirection; -uniform vec3 fg_Planes; -uniform int fg_ShadowNumber; -uniform vec4 fg_ShadowDistances; - -uniform mat4 fg_ShadowMatrix_0; -uniform mat4 fg_ShadowMatrix_1; -uniform mat4 fg_ShadowMatrix_2; -uniform mat4 fg_ShadowMatrix_3; - -uniform int filtering; -varying vec3 ray; - -vec3 position( vec3 viewDir, vec2 coords, sampler2D depth_tex ); -vec3 normal_decode(vec2 enc); - -vec4 DynamicShadow( in vec4 ecPosition, out vec4 tint ) -{ - vec4 coords; - vec2 shift = vec2( 0.0 ); - int index = 4; - float factor = 0.5; - if (ecPosition.z > -fg_ShadowDistances.x) { - index = 1; - if (fg_ShadowNumber == 1) - factor = 1.0; - tint = vec4(0.0,1.0,0.0,1.0); - coords = fg_ShadowMatrix_0 * ecPosition; - } else if (ecPosition.z > -fg_ShadowDistances.y && fg_ShadowNumber > 1) { - index = 2; - shift = vec2( 0.0, 0.5 ); - tint = vec4(0.0,0.0,1.0,1.0); - coords = fg_ShadowMatrix_1 * ecPosition; - } else if (ecPosition.z > -fg_ShadowDistances.z && fg_ShadowNumber > 2) { - index = 3; - shift = vec2( 0.5, 0.0 ); - tint = vec4(1.0,1.0,0.0,1.0); - coords = fg_ShadowMatrix_2 * ecPosition; - } else if (ecPosition.z > -fg_ShadowDistances.w && fg_ShadowNumber > 3) { - shift = vec2( 0.5, 0.5 ); - tint = vec4(1.0,0.0,0.0,1.0); - coords = fg_ShadowMatrix_3 * ecPosition; - } else { - return vec4(1.1,1.1,0.0,1.0); // outside, clamp to border - } - coords.st *= factor; - coords.st += shift; - return coords; -} -void main() { - vec2 coords = gl_TexCoord[0].xy; - vec4 spec_emis = texture2D( spec_emis_tex, coords ); - if ( spec_emis.a < 0.1 ) - discard; - vec3 normal = normal_decode(texture2D( normal_tex, coords ).rg); - vec3 viewDir = normalize(ray); - vec3 pos = position( viewDir, coords, depth_tex ); - - vec4 tint; - float shadow = 0.0; - if (filtering == 1) { - shadow = shadow2DProj( shadow_tex, DynamicShadow( vec4( pos, 1.0 ), tint ) ).r; - } else if (filtering == 2) { - shadow += 0.333 * shadow2DProj( shadow_tex, DynamicShadow( vec4(pos, 1.0), tint ) ).r; - shadow += 0.166 * shadow2DProj( shadow_tex, DynamicShadow( vec4(pos + vec3(-0.003 * pos.z, -0.002 * pos.z, 0), 1.0), tint ) ).r; - shadow += 0.166 * shadow2DProj( shadow_tex, DynamicShadow( vec4(pos + vec3( 0.003 * pos.z, 0.002 * pos.z, 0), 1.0), tint ) ).r; - shadow += 0.166 * shadow2DProj( shadow_tex, DynamicShadow( vec4(pos + vec3(-0.003 * pos.z, 0.002 * pos.z, 0), 1.0), tint ) ).r; - shadow += 0.166 * shadow2DProj( shadow_tex, DynamicShadow( vec4(pos + vec3( 0.003 * pos.z, -0.002 * pos.z, 0), 1.0), tint ) ).r; - } else { - float kernel[9] = float[9]( 36/256.0, 24/256.0, 6/256.0, - 24/256.0, 16/256.0, 4/256.0, - 6/256.0, 4/256.0, 1/256.0 ); - for( int x = -2; x <= 2; ++x ) - for( int y = -2; y <= 2; ++y ) - shadow += kernel[int(abs(float(x))*3 + abs(float(y)))] * shadow2DProj( shadow_tex, DynamicShadow( vec4(pos + vec3(-0.0025 * x * pos.z, -0.0025 * y * pos.z, 0), 1.0), tint ) ).r; - } - vec3 lightDir = (fg_ViewMatrix * vec4( fg_SunDirection, 0.0 )).xyz; - lightDir = normalize( lightDir ); - vec4 color_material = texture2D( color_tex, coords ); - vec3 color = color_material.rgb; - vec3 Idiff = clamp( dot( lightDir, normal ), 0.0, 1.0 ) * color * fg_SunDiffuseColor.rgb; - vec3 halfDir = normalize( lightDir - viewDir ); - vec3 Ispec = vec3(0.0); - vec3 Iemis = spec_emis.z * color; - - float cosAngIncidence = clamp(dot(normal, lightDir), 0.0, 1.0); - float blinnTerm = clamp( dot( halfDir, normal ), 0.0, 1.0 ); - - if (cosAngIncidence > 0.0) - Ispec = pow( blinnTerm, spec_emis.y * 128.0 ) * spec_emis.x * fg_SunSpecularColor.rgb; - - float matID = color_material.a * 255.0; - if (matID >= 254.0) // 254: Water, 255: Ubershader - Idiff += Ispec * spec_emis.x; - - gl_FragColor = vec4(mix(vec3(0.0), Idiff + Ispec, shadow) + Iemis, 1.0); -// gl_FragColor = mix(tint, vec4(mix(vec3(0.0), Idiff + Ispec, shadow) + Iemis, 1.0), 0.92); -} diff --git a/Shaders/sunlight.vert b/Shaders/sunlight.vert deleted file mode 100644 index 6d7c623bf..000000000 --- a/Shaders/sunlight.vert +++ /dev/null @@ -1,10 +0,0 @@ -#version 120 -//uniform mat4 fg_ViewMatrixInverse; -uniform mat4 fg_ProjectionMatrixInverse; -varying vec3 ray; -void main() { - gl_Position = gl_Vertex; - gl_TexCoord[0] = gl_MultiTexCoord0; -// ray = (fg_ViewMatrixInverse * vec4((fg_ProjectionMatrixInverse * gl_Vertex).xyz, 0.0)).xyz; - ray = (fg_ProjectionMatrixInverse * gl_Vertex).xyz; -} diff --git a/Shaders/terrain-ALS-base.frag b/Shaders/terrain-ALS-base.frag index 04eb1e660..5e7bc20e7 100644 --- a/Shaders/terrain-ALS-base.frag +++ b/Shaders/terrain-ALS-base.frag @@ -33,7 +33,9 @@ float eShade; float fog_func (in float targ, in float alt); vec3 get_hazeColor(in float light_arg); -vec3 filter_combined (in vec3 color) ; +vec3 filter_combined (in vec3 color); + +float getShadowing(); float luminance(vec3 color) { @@ -69,12 +71,14 @@ void main() NdotL = dot(n, lightDir); if (NdotL > 0.0) { - color += diffuse_term * NdotL; + float shadowmap = getShadowing(); + color += diffuse_term * NdotL * shadowmap; NdotHV = max(dot(n, halfVector), 0.0); if (gl_FrontMaterial.shininess > 0.0) specular.rgb = (gl_FrontMaterial.specular.rgb * light_specular.rgb - * pow(NdotHV, gl_FrontMaterial.shininess)); + * pow(NdotHV, gl_FrontMaterial.shininess) + * shadowmap); } color.a = diffuse_term.a; // This shouldn't be necessary, but our lighting becomes very diff --git a/Shaders/terrain-ALS-detailed.frag b/Shaders/terrain-ALS-detailed.frag index e79306ad0..21fbc77d9 100644 --- a/Shaders/terrain-ALS-detailed.frag +++ b/Shaders/terrain-ALS-detailed.frag @@ -56,7 +56,7 @@ float fog_func (in float targ, in float alt); vec3 get_hazeColor(in float light_arg); vec3 filter_combined (in vec3 color) ; - +float getShadowing(); void main() @@ -305,12 +305,14 @@ if ((dist < 5000.0)&& (quality_level > 3) && (wetness>0.0)) NdotL = NdotL + 1.0 * (noisegrad_10m + 0.5* noisegrad_5m) * mix_factor/0.8 * (1.0 - smoothstep(1000.0, 2000.0, dist)); } if (NdotL > 0.0) { - color += diffuse_term * NdotL; + float shadowmap = getShadowing(); + color += diffuse_term * NdotL * shadowmap; NdotHV = max(dot(n, halfVector), 0.0); if (gl_FrontMaterial.shininess > 0.0) specular.rgb = ((gl_FrontMaterial.specular.rgb * 0.1 + (water_factor * vec3 (1.0, 1.0, 1.0))) * light_specular.rgb - * pow(NdotHV, gl_FrontMaterial.shininess + (20.0 * water_factor))); + * pow(NdotHV, gl_FrontMaterial.shininess + (20.0 * water_factor)) + * shadowmap); } color.a = 1.0;//diffuse_term.a; // This shouldn't be necessary, but our lighting becomes very diff --git a/Shaders/terrain-ALS-detailed.vert b/Shaders/terrain-ALS-detailed.vert index 660919b35..5bdaa4470 100644 --- a/Shaders/terrain-ALS-detailed.vert +++ b/Shaders/terrain-ALS-detailed.vert @@ -55,6 +55,7 @@ const float EarthRadius = 5800000.0; const float terminator_width = 200000.0; vec3 moonlight_perception (in vec3 light); +void setupShadows(vec4 eyeSpacePos); float light_func (in float x, in float a, in float b, in float c, in float d, in float e) { @@ -84,7 +85,8 @@ void main() float scattering; rawPos = gl_Vertex.xy; - worldPos = (osg_ViewMatrixInverse *gl_ModelViewMatrix * gl_Vertex).xyz; + vec4 eyePos = gl_ModelViewMatrix * gl_Vertex; + worldPos = (osg_ViewMatrixInverse * eyePos).xyz; steepness = dot(normalize(gl_Normal), vec3 (0.0, 0.0, 1.0)); @@ -298,7 +300,8 @@ if (use_IR_vision) gl_FrontColor.a = mie_angle; gl_BackColor.a = mie_angle; } - + +setupShadows(eyePos); } diff --git a/Shaders/terrain-ALS-ultra.frag b/Shaders/terrain-ALS-ultra.frag index 65a52e2bc..a72393771 100644 --- a/Shaders/terrain-ALS-ultra.frag +++ b/Shaders/terrain-ALS-ultra.frag @@ -88,6 +88,7 @@ vec3 searchlight(); vec3 landing_light(in float offset, in float offsetv); vec3 filter_combined (in vec3 color) ; +float getShadowing(); // a fade function for procedural scales which are smaller than a pixel @@ -442,13 +443,15 @@ if ((dist < 5000.0) && (combined_wetness>0.0)) NdotL = NdotL + (1.0-snow_mix_factor) * 0.3* dot_texel.a * (0.5* dotnoisegrad_10m * detail_fade(1.0 * dot_size, view_angle, dist) +0.5 * dotnoisegrad_10m * noise_01m * detail_fade(0.1, view_angle, dist)) ; if (NdotL > 0.0) { + float shadowmap = getShadowing(); if (cloud_shadow_flag == 1) {NdotL = NdotL * shadow_func(relPos.x, relPos.y, 0.3 * noise_250m + 0.5 * noise_500m+0.2 * noise_1500m, dist);} - color += diffuse_term * NdotL; + color += diffuse_term * NdotL * shadowmap; NdotHV = max(dot(n, halfVector), 0.0); if (gl_FrontMaterial.shininess > 0.0) specular.rgb = ((gl_FrontMaterial.specular.rgb * 0.1 + (water_factor * vec3 (1.0, 1.0, 1.0))) * light_specular.rgb - * pow(NdotHV, gl_FrontMaterial.shininess + (20.0 * water_factor))); + * pow(NdotHV, gl_FrontMaterial.shininess + (20.0 * water_factor)) + * shadowmap); } color.a = 1.0;//diffuse_term.a; // This shouldn't be necessary, but our lighting becomes very diff --git a/Shaders/terrain-ALS-ultra.vert b/Shaders/terrain-ALS-ultra.vert index c3dcf9f28..ebe1b95a9 100644 --- a/Shaders/terrain-ALS-ultra.vert +++ b/Shaders/terrain-ALS-ultra.vert @@ -53,6 +53,8 @@ float yprime_alt; vec3 moonlight_perception (in vec3 light); +void setupShadows(vec4 eyeSpacePos); + // 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; @@ -290,7 +292,7 @@ if (use_IR_vision) gl_FrontColor.a = mie_angle; gl_BackColor.a = mie_angle; - + setupShadows(gl_ModelViewMatrix * gl_Vertex); } diff --git a/Shaders/terrain-overlay-ALS.frag b/Shaders/terrain-overlay-ALS.frag index 9a87f2002..54396928a 100644 --- a/Shaders/terrain-overlay-ALS.frag +++ b/Shaders/terrain-overlay-ALS.frag @@ -46,6 +46,8 @@ vec3 filter_combined (in vec3 color) ; float shadow_func_nearest (in float x, in float y, in float noise, in float dist); +float getShadowing(); + void main() { @@ -157,7 +159,7 @@ void main() // lighting is very simple, the ground underneath should do most of it vec3 N = normalize (gl_NormalMatrix * g_normal); - float NdotL = 0.5 + 1.0 * clamp(dot (N, gl_LightSource[0].position.xyz), 0.0, 1.0) * cloud_shade; + float NdotL = 0.5 + 1.0 * clamp(dot (N, gl_LightSource[0].position.xyz), 0.0, 1.0) * cloud_shade * getShadowing(); texel *= length(gl_LightSource[0].diffuse.rgb)/1.73 * scattering * NdotL; texel = clamp(texel, 0.0, 1.0); diff --git a/Shaders/terrain-overlay-ALS.geom b/Shaders/terrain-overlay-ALS.geom index 2e412b74e..2a9af20fd 100644 --- a/Shaders/terrain-overlay-ALS.geom +++ b/Shaders/terrain-overlay-ALS.geom @@ -16,7 +16,18 @@ varying out vec3 g_normal; varying out float g_altitude; varying out float g_layer; - +uniform mat4 fg_LightMatrix_csm0; +uniform mat4 fg_LightMatrix_csm1; +uniform mat4 fg_LightMatrix_csm2; +uniform mat4 fg_LightMatrix_csm3; +varying out vec4 lightSpacePos[4]; +void setupShadows(vec4 eyeSpacePos) +{ + lightSpacePos[0] = fg_LightMatrix_csm0 * eyeSpacePos; + lightSpacePos[1] = fg_LightMatrix_csm1 * eyeSpacePos; + lightSpacePos[2] = fg_LightMatrix_csm2 * eyeSpacePos; + lightSpacePos[3] = fg_LightMatrix_csm3 * eyeSpacePos; +} float min3(in float a, in float b, in float c) { @@ -49,6 +60,8 @@ void main() g_normal = v_normal[i]; g_altitude = gl_PositionIn[i].z; + setupShadows(gl_ModelViewMatrix * pos); + gl_Position = gl_ModelViewProjectionMatrix * pos; gl_TexCoord[0] = gl_TexCoordIn[i][0]; EmitVertex(); diff --git a/Shaders/transition-gbuffer.frag b/Shaders/transition-gbuffer.frag deleted file mode 100644 index 5efe56f07..000000000 --- a/Shaders/transition-gbuffer.frag +++ /dev/null @@ -1,163 +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; - -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; - -// gbuffer function -void encode_gbuffer(vec3 normal, vec3 color, int mId, float specular, float shininess, float emission, float depth); -/////////////////// - -void main() - { - float NdotL; - float NdotHV; - float fogFactor; - float cover; - float slope; - float L1; - float L2; - float wetness; - float pf; - - vec3 n; - vec3 lightDir; - vec3 halfVector; - - vec4 texel; - vec4 fragColor; - vec4 color; - - 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); - L1 = 0.90 - 0.02 * MixFactor; //first transition slope - 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. - n = (2.0 * gl_Color.a - 1.0) * Vnormal; - n = normalize(n); - - color = vec4(1.0); - - //Select texture based on slope - 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 - 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) - ); - } - - fragColor = color * texel; - - 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; - - float specular = dot( gl_FrontMaterial.specular.rgb, vec3( 0.3, 0.59, 0.11 ) ); - float emission = dot( gl_FrontLightModelProduct.sceneColor.rgb + gl_FrontMaterial.emission.rgb, - vec3( 0.3, 0.59, 0.11 ) - ); - - encode_gbuffer( n, fragColor.rgb, 1, specular, gl_FrontMaterial.shininess, emission, gl_FragCoord.z ); - } diff --git a/Shaders/transition-gbuffer.vert b/Shaders/transition-gbuffer.vert deleted file mode 100644 index dec1e334b..000000000 --- a/Shaders/transition-gbuffer.vert +++ /dev/null @@ -1,21 +0,0 @@ -// -*- mode: C; -*- -// Licence: GPL v2 -// Authors: Frederic Bouvier, Emilian Huminiuc -// -#version 120 - -varying float RawPosZ; -varying vec3 WorldPos; -varying vec3 normal; -varying vec3 Vnormal; - -uniform mat4 osg_ViewMatrixInverse; - -void main() { - RawPosZ = gl_Vertex.z; - WorldPos = (osg_ViewMatrixInverse *gl_ModelViewMatrix * gl_Vertex).xyz; - gl_Position = ftransform(); - gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; - normal = normalize(gl_Normal); - Vnormal = gl_NormalMatrix * gl_Normal; -} diff --git a/Shaders/transition.frag b/Shaders/transition.frag index 521755f1f..29f09c201 100644 --- a/Shaders/transition.frag +++ b/Shaders/transition.frag @@ -34,6 +34,8 @@ uniform int fogType; vec3 fog_Func(vec3 color, int type); ////////////////////// +float getShadowing(); + void main() { float pf = 0.0; @@ -64,7 +66,7 @@ void main() 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; + vec4 Diffuse = gl_LightSource[0].diffuse * nDotVP * getShadowing(); if (nDotVP > 0.0) pf = pow(nDotHV, gl_FrontMaterial.shininess); diff --git a/Shaders/transition.vert b/Shaders/transition.vert index fdfade826..06a9f8fb1 100644 --- a/Shaders/transition.vert +++ b/Shaders/transition.vert @@ -14,12 +14,16 @@ varying vec3 Vnormal; uniform mat4 osg_ViewMatrixInverse; +void setupShadows(vec4 eyeSpacePos); + void main() { RawPosZ = gl_Vertex.z; - WorldPos = (osg_ViewMatrixInverse *gl_ModelViewMatrix * gl_Vertex).xyz; + vec4 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/ubershader-gbuffer.frag b/Shaders/ubershader-gbuffer.frag deleted file mode 100644 index 6df4e754a..000000000 --- a/Shaders/ubershader-gbuffer.frag +++ /dev/null @@ -1,246 +0,0 @@ -// -*- mode: C; -*- -// UBERSHADER - Rembrandt version - 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; - -uniform samplerCube Environment; -uniform sampler2D BaseTex; -uniform sampler2D NormalTex; -uniform sampler2D LightMapTex; -uniform sampler2D ReflMapTex; -uniform sampler2D ReflGradientsTex; -uniform sampler3D ReflNoiseTex; - -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 lightmap_r_factor; -uniform float lightmap_g_factor; -uniform float lightmap_b_factor; -uniform float lightmap_a_factor; -uniform float nmap_tile; -uniform float refl_correction; -uniform float refl_fresnel; -uniform float refl_rainbow; -uniform float refl_noise; -uniform float amb_correction; -uniform float dirt_r_factor; -uniform float dirt_g_factor; -uniform float dirt_b_factor; - -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; - -void encode_gbuffer(vec3 normal, vec3 color, int mId, float specular, float shininess, float emission, float depth); - -uniform mat4 osg_ViewMatrixInverse; -uniform float latDeg; -uniform float lonDeg; - -//////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 ambient = vec3(0.85,0.85,0.9);//placeholder for sun ambient - //vec3 ambient = fg_SunAmbientColor.rgb; - vec3 N; - vec3 dotN; - float emission = dot( gl_FrontLightModelProduct.sceneColor.rgb, - vec3( 0.3, 0.59, 0.11 ) ); - float pf; - - ///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 && refl_enabled > 0){ - reflMatrix = osg_ViewMatrixInverse; - - vec3 wVertVec = (reflMatrix * vec4(eyeVec,0.0)).xyz; - vec3 wNormal = (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; - - - vec4 color = gl_Color + gl_FrontLightModelProduct.sceneColor; - float specular = dot((gl_FrontMaterial.specular * nmap.a).rgb, vec3( 0.3, 0.59, 0.11 )); - - //////////////////////////////////////////////////////////////////////////////// - //BEGIN reflect - //////////////////////////////////////////////////////////////////////////////// - if (refl_enabled > 0){ - float reflFactor; - 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.rgb * reflFactor; - mixedcolor = mix(texel.rgb, raincolor, reflFactor); - } else { - mixedcolor = texel.rgb; - } - //////////////////////////////////////////////////////////////////////////// - //END reflect - //////////////////////////////////////////////////////////////////////////// - - //////////////////////////////////////////////////////////////////////////// - //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 (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)); - } - } - //////////////////////////////////////////////////////////////////////////// - //END Dirt - //////////////////////////////////////////////////////////////////////////// - - - // set ambient adjustment to remove bluiness with user input - float ambient_offset = clamp(amb_correction, -1.0, 1.0); - vec3 ambient_Correction = vec3(ambient.rg, ambient.b * 0.6) * ambient_offset; - ambient_Correction = clamp(ambient_Correction, -1.0, 1.0); - - //specifically disallow alpha - color.a = 1.0; //texel.a * alpha; - color.rgb *= mixedcolor.rgb; - color.rgb += ambient_Correction.rgb; - vec4 fragColor = color; - - //////////////////////////////////////////////////////////////////////////////// - // BEGIN lightmap - //////////////////////////////////////////////////////////////////////////////// - if ( lightmap_enabled >= 1 ) { - vec3 lightmapcolor; - 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 ; - emission = max(max(lightmapFactor.r * lightmapTexel.r, lightmapFactor.g * lightmapTexel.g), - max( lightmapFactor.b * lightmapTexel.b, lightmapFactor.a * lightmapTexel.a)); - } else { - lightmapcolor = lightmapTexel.rgb * lightmap_r_color * lightmapFactor.r; - emission = lightmapTexel.r * lightmapFactor.r; - } - //fragColor.rgb = max(fragColor.rgb, lightmapcolor * gl_FrontMaterial.diffuse.rgb * mixedcolor); - emission = length(lightmapcolor); - fragColor.rgb = max(fragColor.rgb * (1.0 - emission), - lightmapcolor * gl_FrontMaterial.diffuse.rgb * mixedcolor); - } - //////////////////////////////////////////////////////////////////////////////// - // END lightmap - //////////////////////////////////////////////////////////////////////////////// - - encode_gbuffer(N, fragColor.rgb, 255, specular, gl_FrontMaterial.shininess, emission, gl_FragCoord.z); -} \ No newline at end of file diff --git a/Shaders/ubershader.frag b/Shaders/ubershader.frag index 1a8507ee4..d8a2f7b77 100644 --- a/Shaders/ubershader.frag +++ b/Shaders/ubershader.frag @@ -65,6 +65,8 @@ uniform int fogType; vec3 fog_Func(vec3 color, int type); //////////////////////////////////// +float getShadowing(); + //////rotation matrices///////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// @@ -179,8 +181,9 @@ void main (void) else pf = pow(nDotHV, gl_FrontMaterial.shininess); - vec4 Diffuse = gl_LightSource[0].diffuse * nDotVP; - vec4 Specular = gl_FrontMaterial.specular * gl_LightSource[0].diffuse * pf; + 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 ); diff --git a/Shaders/ubershader.vert b/Shaders/ubershader.vert index 5379107a0..b447e0260 100644 --- a/Shaders/ubershader.vert +++ b/Shaders/ubershader.vert @@ -16,7 +16,8 @@ attribute vec3 tangent; attribute vec3 binormal; uniform int nmap_enabled; -uniform int rembrandt_enabled; + +void setupShadows(vec4 eyeSpacePos); void main(void) { @@ -54,14 +55,12 @@ void main(void) if (gl_FrontMaterial.diffuse.a < 1.0) diffuseColor.a = gl_FrontMaterial.diffuse.a; - if(rembrandt_enabled < 1){ gl_FrontColor = gl_FrontMaterial.emission + gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient); - } else { - gl_FrontColor = gl_Color; - } - + 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 index f74cc9e9e..ccb8bce49 100644 --- a/Shaders/urban-ALS.frag +++ b/Shaders/urban-ALS.frag @@ -99,6 +99,8 @@ 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; @@ -279,7 +281,7 @@ void main (void) if (cloud_shadow_flag == 1) {diffuse = diffuse * shadow_func(relPos.x, relPos.y, 1.0, dist);} - + diffuse *= getShadowing(); float shadow_factor = 1.0; diff --git a/Shaders/urban-ALS.vert b/Shaders/urban-ALS.vert index 0eb8546f1..eb8af1433 100644 --- a/Shaders/urban-ALS.vert +++ b/Shaders/urban-ALS.vert @@ -51,6 +51,8 @@ uniform mat4 osg_ViewMatrixInverse; attribute vec3 tangent;//, binormal; +void setupShadows(vec4 eyeSpacePos); + float earthShade; @@ -282,6 +284,6 @@ if (use_IR_vision) constantColor = gl_FrontMaterial.emission + gl_Color * (gl_LightModel.ambient + light_ambient); - +setupShadows(ecPosition); } diff --git a/Shaders/urban-gbuffer.frag b/Shaders/urban-gbuffer.frag deleted file mode 100644 index 61c0a9083..000000000 --- a/Shaders/urban-gbuffer.frag +++ /dev/null @@ -1,227 +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; -varying vec4 specular; - -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 bool random_buildings; - -const float scale = 1.0; -int linear_search_steps = 10; -int GlobalIterationCount = 0; -int gIterationCap = 64; - -void encode_gbuffer(vec3 normal, vec3 color, int mId, float specular, float shininess, float emission, float depth); - -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 ) - 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 ) - depthfactor = 0.0; - - vec3 normal = normalize(VNormal); - vec3 tangent = normalize(VTangent); - vec3 binormal = normalize(VBinormal); - 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; - float emis = N.z; - N = N * 2.0 - 1.0; - - - 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); - - vec4 ambient_light = constantColor + vec4(gl_Color.rgb, 1.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 ); - - 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; - } - encode_gbuffer(N, finalColor.rgb, 1, dot(specular.xyz,vec3(0.3, 0.59, 0.11 )), specular.w, 0.0, gl_FragDepth); -} diff --git a/Shaders/urban-gbuffer.vert b/Shaders/urban-gbuffer.vert deleted file mode 100644 index 96a304ca5..000000000 --- a/Shaders/urban-gbuffer.vert +++ /dev/null @@ -1,31 +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; -varying vec4 specular; - -attribute vec3 tangent, binormal; - -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; - specular = vec4( gl_FrontMaterial.specular.rgb, gl_FrontMaterial.shininess ); -} diff --git a/Shaders/urban.frag b/Shaders/urban.frag index 057a8b92a..c4666d53a 100644 --- a/Shaders/urban.frag +++ b/Shaders/urban.frag @@ -45,6 +45,8 @@ 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; @@ -197,6 +199,7 @@ void main (void) 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 diff --git a/Shaders/urban.vert b/Shaders/urban.vert index c065bc59e..52cb1068d 100644 --- a/Shaders/urban.vert +++ b/Shaders/urban.vert @@ -19,6 +19,8 @@ attribute vec3 tangent, binormal; // void fog_Func(int type); ///////////////////////// +void setupShadows(vec4 eyeSpacePos); + void main(void) { rawpos = gl_Vertex; @@ -33,4 +35,5 @@ void main(void) gl_Position = ftransform(); gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; // fog_Func(fogType); + setupShadows(ecPosition); } diff --git a/Shaders/water-gbuffer.frag b/Shaders/water-gbuffer.frag deleted file mode 100644 index 4b607ddd0..000000000 --- a/Shaders/water-gbuffer.frag +++ /dev/null @@ -1,212 +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 water_normalmap; -uniform sampler2D water_reflection; -uniform sampler2D water_dudvmap; -uniform sampler2D water_reflection_grey; -uniform sampler2D sea_foam; -uniform sampler2D perlin_normalmap; - -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 vec4 waterTex1; //moving texcoords -varying vec4 waterTex2; //moving texcoords -varying vec3 viewerdir; -varying vec3 normal; -varying vec3 rawNormal; -varying vec3 VTangent; -varying vec3 VBinormal; - - -/////// functions ///////// -void encode_gbuffer(vec3 normal, vec3 color, int mId, float specular, float shininess, float emission, float depth); - -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); - - vec3 Normal = normalize(normal); - vec3 vNormal = normalize(rawNormal); - - 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 tmp = vec4(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 N2 = normalize(mix(N0, N1, mixFactor) * waveRoughness); - Normal = normalize(N2.x * VTangent + N2.y * VBinormal + N2.z * Normal); - //vNormal = normalize(mix(vNormal + N0, vNormal + N1, mixFactor) * waveRoughness); - vNormal = normalize(N2.x * vec3(1.,0.,0.) + N2.y * vec3(0.,1.,0.) + N2.z * vNormal); - - if (normalmap_dds > 0){ - Normal = -Normal; //dds fix - vNormal = -vNormal; - } - // 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 ; - //float 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 = refl; - - float foamSlope = 0.10 + 0.1 * windScale; - vec4 foam_texel = texture2D(sea_foam, vec2(waterTex2 * tscale) * 25.0); - float waveSlope = vNormal.g; - - if (windEffect >= 8.0) - if (waveSlope >= foamSlope){ - finalColor = mix(finalColor, max(finalColor, finalColor + foam_texel), smoothstep(0.01, 0.50, vNormal.g)); - } - - float emission = dot( gl_FrontLightModelProduct.sceneColor.rgb + gl_FrontMaterial.emission.rgb, - vec3( 0.3, 0.59, 0.11 ) - ); - float specular = smoothstep(0.0, 3.5, cover); - encode_gbuffer(Normal, finalColor.rgb, 254, specular, 128.0, emission, gl_FragCoord.z); - } diff --git a/Shaders/water-gbuffer.vert b/Shaders/water-gbuffer.vert deleted file mode 100644 index bfe91e6ee..000000000 --- a/Shaders/water-gbuffer.vert +++ /dev/null @@ -1,123 +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 rawNormal; - -varying vec3 VTangent; -varying vec3 VBinormal; - -varying vec3 WorldPos; -varying vec2 TopoUV; - - -uniform float WindE, WindN; -uniform int rembrandt_enabled; - -uniform float osg_SimulationTime; -uniform mat4 osg_ViewMatrixInverse; - -attribute vec3 tangent; -attribute vec3 binormal; - -// 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; - rawNormal= gl_Normal; - normal = gl_NormalMatrix * gl_Normal; - VTangent = normalize(gl_NormalMatrix * tangent); - VBinormal = normalize(gl_NormalMatrix * binormal); - - viewerdir = vec3(gl_ModelViewMatrixInverse[3]) - vec3(gl_Vertex); - - 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; - - 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-gbuffer.frag b/Shaders/water_sine-gbuffer.frag deleted file mode 100644 index 957539b88..000000000 --- a/Shaders/water_sine-gbuffer.frag +++ /dev/null @@ -1,394 +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 - -uniform sampler2D water_normalmap ; -uniform sampler2D water_reflection ; -uniform sampler2D water_dudvmap ; -uniform sampler2D water_reflection_grey ; -uniform sampler2D sea_foam ; -uniform sampler2D perlin_normalmap ; - -uniform sampler2D topo_map; - -uniform sampler3D Noise ; - - -uniform float saturation ; -uniform float Overcast ; -uniform float WindE ; -uniform float WindN ; -uniform float CloudCover0 ; -uniform float CloudCover1 ; -uniform float CloudCover2 ; -uniform float CloudCover3 ; -uniform float CloudCover4 ; -uniform float osg_SimulationTime ; -uniform float WaveFreq ; -uniform float WaveAmp ; -uniform float WaveSharp ; -uniform float WaveAngle ; -uniform float WaveFactor ; -uniform float WaveDAngle ; -uniform float normalmap_dds ; -uniform int Status ; - - -varying vec4 waterTex1 ; //moving texcoords -varying vec4 waterTex2 ; //moving texcoords - -varying vec3 WorldPos ; -varying vec2 TopoUV ; - -varying vec3 viewerdir ; -varying vec3 lightdir ; -varying vec3 normal ; -varying vec3 rawNormal ; -varying vec3 VTangent ; -varying vec3 VBinormal ; - -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 encode_gbuffer(vec3 normal, vec3 color, int mId, float specular, float shininess, float emission, float depth); - - -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) ; - vec3 vNormal = normalize(rawNormal) ; - - - // approximate cloud cover - float cover = 0.0 ; - //bool Status = true; - - // 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 * (1.0 + 0.5 * smoothstep(0.8, 0.9, topoTexel.a)); - float phaseFloorFactor = 1.0 - 0.2 * smoothstep(0.8, 0.9, topoTexel.a); - wave0.freq = WaveFreq ; - 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; - - // mix water and noise, modulated by factor - vec4 vNorm = normalize(mix(nmap, nmap1, mixFactor) * waveRoughness) ; - vNorm.r += ddxSum ; - vNorm.y += ddySum ; - - if (normalmap_dds > 0)//dds fix - vNorm = -vNorm ; - - //load reflection - //vec4 tmp = vec4(lightdir, 0.0); - //vec4 tmp = vec4(0.0); - vec2 refTexUV = 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); - } - - 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; - vec3 N2 = normalize(mix(N0.rgb, N1.rgb, mixFactor) * waveRoughness); - Normal = normalize(N2.x * VTangent + N2.y * VBinormal + N2.z * Normal); - //vNormal = normalize(mix(vNormal + N0, vNormal + N1, mixFactor) * waveRoughness); - vNormal = normalize(N2.x * vec3(1.0, 0.0, 0.0) + N2.y * vec3(0.0, 1., 0.0) + N2.z * vNormal); - if (normalmap_dds > 0){ //dds fix - Normal = -Normal; - vNormal = -vNormal; - } - - - // specular -// vec3 specular_color = vec3(1.0) * pow(max(0.0, dot(Normal, H)), water_shininess) * 6.0; -// vec4 specular = vec4(specular_color, 0.5); -// specular_color *= saturation * 0.3 ; -// float 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 finalColor = refl; - - -//add foam - vec4 foam_texel = texture2D(sea_foam, (waterTex2 * tscale).st * 50.0); - float foamSlope = 0.1 + 0.1 * windScale; - - float waveSlope1 = vNormal.g * windFloorFactor * 0.96 ; //0.6; Normals values seem to be .25 of those in the classic pipeline - float waveSlope2 = vNorm.r * windFloorFactor * 0.4; //0.25; - 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)); - - float emission = dot( gl_FrontLightModelProduct.sceneColor.rgb + gl_FrontMaterial.emission.rgb, - vec3( 0.3, 0.59, 0.11 ) - ); - float specular = smoothstep(0.0, 3.5, cover); - - encode_gbuffer(Normal, finalColor.rgb, 254, specular, water_shininess, emission, gl_FragCoord.z); - } diff --git a/Compositor/Shaders/ALS/ws30.frag b/Shaders/ws30.frag similarity index 98% rename from Compositor/Shaders/ALS/ws30.frag rename to Shaders/ws30.frag index c6eaac854..f8fa8fb68 100644 --- a/Compositor/Shaders/ALS/ws30.frag +++ b/Shaders/ws30.frag @@ -10,8 +10,6 @@ varying vec3 normal; varying vec3 relPos; -uniform float fg_Fcoef; - uniform sampler2D landclass; uniform sampler2D grass; uniform sampler2D city; @@ -22,8 +20,6 @@ uniform sampler2D water; varying float yprime_alt; varying float mie_angle; -varying float flogz; - uniform float visibility; uniform float avisibility; @@ -274,7 +270,4 @@ fragColor.rgb = mix(hazeColor, fragColor.rgb,transmission); fragColor.rgb = filter_combined(fragColor.rgb); gl_FragColor = fragColor; -// logarithmic depth -gl_FragDepth = log2(flogz) * fg_Fcoef * 0.5; } - diff --git a/defaults.xml b/defaults.xml index 245769350..acdfcdeff 100644 --- a/defaults.xml +++ b/defaults.xml @@ -54,84 +54,10 @@ Started September 2000 by David Megginson, david@megginson.com false Materials/regions/materials.xml - - - false - 1024 - - - - false - default-pipeline - false - false - 0.6 - true - true - 0.6 - true - false - - false - 0.8 - 1.3 - false - - .393 - .769 - .189 - - - .349 - .686 - .168 - - - .272 - .534 - .131 - - false - - 0.0 - 0.0 - 1.0 - - false - 1.0 - false - - 1.0 - false - false - - false - - - - true - spec-emis - - - true - normal - - - true - diffuse - - - - true - true - true - true - true - false - false - - - + + false + 2048 + false 5 8 @@ -148,7 +74,7 @@ Started September 2000 by David Megginson, david@megginson.com 1.0 1.0 0.0 - 0.0 + 0.0 0.0 1.0 1.0 @@ -244,22 +170,6 @@ Started September 2000 by David Megginson, david@megginson.com true true - false - false - false - false - false - - true - false - 2048 - 4 - 2.0 - 8.0 - 32.0 - 128.0 - 1 - false true false