diff --git a/Effects/agriculture.eff b/Effects/agriculture.eff index 2cb59f457..7d8d6e1fd 100644 --- a/Effects/agriculture.eff +++ b/Effects/agriculture.eff @@ -420,6 +420,11 @@ float landing_light2_offset + + landing_light3_offset + float + landing_light3_offset + cloudpos1_x float diff --git a/Effects/airfield.eff b/Effects/airfield.eff index dcd97a403..b2b71cd22 100644 --- a/Effects/airfield.eff +++ b/Effects/airfield.eff @@ -250,6 +250,11 @@ float landing_light2_offset + + landing_light3_offset + float + landing_light3_offset + cloudpos1_x float diff --git a/Effects/dirt-runway.eff b/Effects/dirt-runway.eff index 0e529ceb5..f53144879 100644 --- a/Effects/dirt-runway.eff +++ b/Effects/dirt-runway.eff @@ -325,7 +325,12 @@ float landing_light2_offset - + + landing_light3_offset + float + landing_light3_offset + + cloudpos1_x float cloudpos1_x diff --git a/Effects/model-combined.eff b/Effects/model-combined.eff index 3ea69af56..e24078462 100644 --- a/Effects/model-combined.eff +++ b/Effects/model-combined.eff @@ -914,6 +914,11 @@ please see Docs/README.model-combined.eff for documentation float landing_light2_offset + + landing_light3_offset + float + landing_light3_offset + cloudpos1_x float diff --git a/Effects/model-default.eff b/Effects/model-default.eff index ac822605a..d9e6e8066 100644 --- a/Effects/model-default.eff +++ b/Effects/model-default.eff @@ -20,24 +20,25 @@ /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 + /rendering/scene/overcast + /sim/rendering/eye-altitude-m + /environment/cloud-self-shading + /environment/moonlight /sim/rendering/shaders/skydome - /environment/air-pollution-norm + /environment/air-pollution-norm /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/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/shaders/transition @@ -198,6 +199,11 @@ float landing_light2_offset + + landing_light3_offset + float + landing_light3_offset + texture sampler-2d diff --git a/Effects/rock.eff b/Effects/rock.eff index f7b77b5b3..94984178a 100644 --- a/Effects/rock.eff +++ b/Effects/rock.eff @@ -289,6 +289,11 @@ float landing_light2_offset + + landing_light3_offset + float + landing_light3_offset + cloudpos1_x float diff --git a/Effects/runway.eff b/Effects/runway.eff index 5eaa9700b..38744d621 100644 --- a/Effects/runway.eff +++ b/Effects/runway.eff @@ -292,6 +292,11 @@ float landing_light2_offset + + landing_light3_offset + float + landing_light3_offset + cloudpos1_x float @@ -507,20 +512,20 @@ int tquality_level - - use_searchlight - int - use_searchlight + + use_searchlight + int + use_searchlight - use_landing_light - int - use_landing_light + use_landing_light + int + use_landing_light - use_alt_landing_light - int - use_alt_landing_light + use_alt_landing_light + int + use_alt_landing_light display_xsize diff --git a/Effects/skydome.eff b/Effects/skydome.eff index 1a77c5f97..cd2b5336d 100644 --- a/Effects/skydome.eff +++ b/Effects/skydome.eff @@ -25,6 +25,7 @@ /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 /environment/air-pollution-norm @@ -151,6 +152,11 @@ float landing_light2_offset + + landing_light3_offset + float + landing_light3_offset + use_searchlight int diff --git a/Effects/terrain-default.eff b/Effects/terrain-default.eff index d7bbe8de7..6caec7b79 100644 --- a/Effects/terrain-default.eff +++ b/Effects/terrain-default.eff @@ -127,6 +127,7 @@ /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 /local-weather/cloud-shadows/cloudpos-x[0] @@ -473,6 +474,11 @@ float landing_light2_offset + + landing_light3_offset + float + landing_light3_offset + cloudpos1_x float diff --git a/Effects/tree.eff b/Effects/tree.eff index 22ac121e8..631e72681 100644 --- a/Effects/tree.eff +++ b/Effects/tree.eff @@ -56,6 +56,7 @@ /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 /local-weather/cloud-shadows/cloudpos-x[0] /local-weather/cloud-shadows/cloudpos-y[0] /local-weather/cloud-shadows/cloudpos-x[1] @@ -259,6 +260,11 @@ float landing_light2_offset + + landing_light3_offset + float + landing_light3_offset + cloudpos1_x float @@ -700,6 +706,11 @@ float landing_light2_offset + + landing_light3_offset + float + landing_light3_offset + cloudpos1_x float @@ -1141,6 +1152,11 @@ float landing_light2_offset + + landing_light3_offset + float + landing_light3_offset + cloudpos1_x float diff --git a/Effects/urban.eff b/Effects/urban.eff index cc7d791ea..611291f13 100644 --- a/Effects/urban.eff +++ b/Effects/urban.eff @@ -386,6 +386,11 @@ float landing_light2_offset + + landing_light3_offset + float + landing_light3_offset + cloudpos1_x float @@ -851,6 +856,11 @@ float landing_light2_offset + + landing_light3_offset + float + landing_light3_offset + cloudpos1_x float diff --git a/Effects/water-inland.eff b/Effects/water-inland.eff index ad5cba57a..5cac1df17 100644 --- a/Effects/water-inland.eff +++ b/Effects/water-inland.eff @@ -604,6 +604,11 @@ float landing_light2_offset + + landing_light3_offset + float + landing_light3_offset + cloudpos1_x float diff --git a/Effects/water.eff b/Effects/water.eff index f8ec8360c..7652dc5ea 100644 --- a/Effects/water.eff +++ b/Effects/water.eff @@ -596,7 +596,12 @@ landing_light2_offset float landing_light2_offset - + + + landing_light3_offset + float + landing_light3_offset + cloudpos1_x float diff --git a/Shaders/agriculture-ALS.frag b/Shaders/agriculture-ALS.frag index 02cc100c7..14cfe8259 100644 --- a/Shaders/agriculture-ALS.frag +++ b/Shaders/agriculture-ALS.frag @@ -49,6 +49,7 @@ 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; @@ -87,7 +88,7 @@ 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); +vec3 landing_light(in float offset, in float offsetv); @@ -437,11 +438,11 @@ if ((dist < 5000.0)&& (quality_level > 3) && (combined_wetness>0.0)) } if (use_landing_light == 1) { - secondary_light += landing_light(landing_light1_offset); + secondary_light += landing_light(landing_light1_offset, landing_light3_offset); } if (use_alt_landing_light == 1) { - secondary_light += landing_light(landing_light2_offset); + secondary_light += landing_light(landing_light2_offset, landing_light3_offset); } color.rgb +=secondary_light * light_distance_fading(dist); diff --git a/Shaders/airfield-ALS.frag b/Shaders/airfield-ALS.frag index e051b152b..444cdccea 100644 --- a/Shaders/airfield-ALS.frag +++ b/Shaders/airfield-ALS.frag @@ -38,6 +38,7 @@ 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; @@ -68,7 +69,7 @@ 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); +vec3 landing_light(in float offset, in float offsetv); @@ -294,11 +295,11 @@ if (quality_level > 3) } if (use_landing_light == 1) { - secondary_light += landing_light(landing_light1_offset); + secondary_light += landing_light(landing_light1_offset, landing_light3_offset); } if (use_alt_landing_light == 1) { - secondary_light += landing_light(landing_light2_offset); + secondary_light += landing_light(landing_light2_offset, landing_light3_offset); } color.rgb +=secondary_light * light_distance_fading(dist); diff --git a/Shaders/drunway-ALS.frag b/Shaders/drunway-ALS.frag index 689df7dd3..4720713b4 100644 --- a/Shaders/drunway-ALS.frag +++ b/Shaders/drunway-ALS.frag @@ -47,6 +47,7 @@ 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; @@ -76,7 +77,7 @@ 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); +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); @@ -305,15 +306,14 @@ if ((dist < 5000.0)&& (quality_level > 3) && (wetness>0.0)) } if (use_landing_light == 1) { - secondary_light += landing_light(landing_light1_offset); + secondary_light += landing_light(landing_light1_offset, landing_light3_offset); } if (use_alt_landing_light == 1) { - secondary_light += landing_light(landing_light2_offset); + secondary_light += landing_light(landing_light2_offset, landing_light3_offset); } color.rgb +=secondary_light * light_distance_fading(dist); - fragColor = color * texel + specular; @@ -322,7 +322,6 @@ float lightArg = (terminator-yprime_alt)/100000.0; vec3 hazeColor = get_hazeColor(lightArg); - // Rayleigh color shifts if ((quality_level > 5) && (tquality_level > 5)) @@ -338,14 +337,13 @@ vec3 hazeColor = get_hazeColor(lightArg); fragColor.rgb = mix(fragColor.rgb, rayleighColor,rayleighStrength); } + // here comes the terrain haze model - float delta_z = hazeLayerAltitude - eye_alt; -float mvisibility = min(visibility,avisibility); +float mvisibility = min(visibility, avisibility); if (dist > 0.04 * mvisibility) - { alt = eye_alt; @@ -438,17 +436,11 @@ else 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); @@ -490,6 +482,7 @@ if (intensity > 0.0) // this needs to be a condition, because otherwise hazeColo 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); @@ -498,13 +491,11 @@ 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 = mix(hazeColor +secondary_light * fog_backscatter(mvisibility) , fragColor.rgb,transmission); } gl_FragColor = fragColor; - } diff --git a/Shaders/model-ALS-base.frag b/Shaders/model-ALS-base.frag index 37ddd3cb3..49380d97f 100644 --- a/Shaders/model-ALS-base.frag +++ b/Shaders/model-ALS-base.frag @@ -26,6 +26,7 @@ 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; @@ -51,7 +52,7 @@ 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); +vec3 landing_light(in float offset, in float offsetv); float luminance(vec3 color) @@ -129,11 +130,11 @@ void main() } if (use_landing_light == 1) { - secondary_light += landing_light(landing_light1_offset); + secondary_light += landing_light(landing_light1_offset, landing_light3_offset); } if (use_alt_landing_light == 1) { - secondary_light += landing_light(landing_light2_offset); + 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);} diff --git a/Shaders/model-ALS-ultra.frag b/Shaders/model-ALS-ultra.frag index ed1eb0df1..3156d1ed1 100644 --- a/Shaders/model-ALS-ultra.frag +++ b/Shaders/model-ALS-ultra.frag @@ -75,6 +75,7 @@ uniform float osg_SimulationTime; uniform float landing_light1_offset; uniform float landing_light2_offset; +uniform float landing_light3_offset; // constants needed by the light and fog computations ################################################### @@ -101,7 +102,7 @@ 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); +vec3 landing_light(in float offset, in float offsetv); @@ -287,11 +288,11 @@ void main (void) } if (use_landing_light == 1) { - secondary_light += landing_light(landing_light1_offset); + secondary_light += landing_light(landing_light1_offset, landing_light3_offset); } if (use_alt_landing_light == 1) { - secondary_light += landing_light(landing_light2_offset); + secondary_light += landing_light(landing_light2_offset, landing_light3_offset); } diff --git a/Shaders/rock-ALS.frag b/Shaders/rock-ALS.frag index 83fd9cb41..a23dd1f59 100644 --- a/Shaders/rock-ALS.frag +++ b/Shaders/rock-ALS.frag @@ -44,6 +44,7 @@ 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; @@ -79,7 +80,7 @@ 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); +vec3 landing_light(in float offset, in float offsetv); float light_func (in float x, in float a, in float b, in float c, in float d, in float e) { @@ -466,11 +467,11 @@ if ((dist < 5000.0) && (combined_wetness>0.0)) } if (use_landing_light == 1) { - secondary_light += landing_light(landing_light1_offset); + secondary_light += landing_light(landing_light1_offset, landing_light3_offset); } if (use_alt_landing_light == 1) { - secondary_light += landing_light(landing_light2_offset); + secondary_light += landing_light(landing_light2_offset, landing_light3_offset); } color.rgb +=secondary_light * light_distance_fading(dist); diff --git a/Shaders/runway-ALS.frag b/Shaders/runway-ALS.frag index 8b5d3d648..f90e00562 100644 --- a/Shaders/runway-ALS.frag +++ b/Shaders/runway-ALS.frag @@ -35,6 +35,7 @@ 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; @@ -64,7 +65,7 @@ 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); +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); @@ -272,11 +273,11 @@ if ((dist < 5000.0)&& (quality_level > 3) && (wetness>0.0)) } if (use_landing_light == 1) { - secondary_light += landing_light(landing_light1_offset); + secondary_light += landing_light(landing_light1_offset, landing_light3_offset); } if (use_alt_landing_light == 1) { - secondary_light += landing_light(landing_light2_offset); + secondary_light += landing_light(landing_light2_offset, landing_light3_offset); } color.rgb +=secondary_light * light_distance_fading(dist); @@ -285,7 +286,7 @@ if ((dist < 5000.0)&& (quality_level > 3) && (wetness>0.0)) float lightArg = (terminator-yprime_alt)/100000.0; - vec3 hazeColor = get_hazeColor(lightArg); +vec3 hazeColor = get_hazeColor(lightArg); // Rayleigh color shifts @@ -304,10 +305,8 @@ float lightArg = (terminator-yprime_alt)/100000.0; } - // here comes the terrain haze model - float delta_z = hazeLayerAltitude - eye_alt; float mvisibility = min(visibility, avisibility); @@ -412,8 +411,6 @@ transmission = fog_func(transmission_arg, alt); if (eqColorFactor < 0.2) eqColorFactor = 0.2; - - // Mie-like factor if (lightArg < 10.0) @@ -463,13 +460,8 @@ hazeColor.rgb = max(hazeColor.rgb, minLight.rgb); fragColor.rgb = mix(hazeColor +secondary_light * fog_backscatter(mvisibility), fragColor.rgb,transmission); - - - - } - gl_FragColor = fragColor; } diff --git a/Shaders/secondary_lights.frag b/Shaders/secondary_lights.frag index 27b25def9..7c7fcf20c 100644 --- a/Shaders/secondary_lights.frag +++ b/Shaders/secondary_lights.frag @@ -54,8 +54,7 @@ if (angularDist < lightRadius) else return vec3 (0.0,0.0,0.0); } - -vec3 landing_light(in float offset) +vec3 landing_light(in float offset, in float offsetv) { float fov_h = field_of_view; @@ -69,7 +68,7 @@ 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); +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); diff --git a/Shaders/skydome-ALS.frag b/Shaders/skydome-ALS.frag index 3b6f7a8dc..d3f63beca 100644 --- a/Shaders/skydome-ALS.frag +++ b/Shaders/skydome-ALS.frag @@ -27,6 +27,7 @@ uniform float cloud_self_shading; uniform float horizon_roughness; uniform float landing_light1_offset; uniform float landing_light2_offset; +uniform float landing_light3_offset; uniform int use_searchlight; uniform int use_landing_light; @@ -38,7 +39,7 @@ float Noise2D(in vec2 coord, in float wavelength); float fog_backscatter(in float avisibility); vec3 searchlight(); -vec3 landing_light(in float offset); +vec3 landing_light(in float offset, in float offsetv); float light_func (in float x, in float a, in float b, in float c, in float d, in float e) { @@ -242,11 +243,11 @@ color = mix(color, terrainHazeColor ,smoothstep(hazeBlendAngle + ctterrain, 0.0+ } if (use_landing_light == 1) { - secondary_light += landing_light(landing_light1_offset); + secondary_light += landing_light(landing_light1_offset, landing_light3_offset); } if (use_alt_landing_light == 1) { - secondary_light += landing_light(landing_light2_offset); + secondary_light += landing_light(landing_light2_offset, landing_light3_offset); } diff --git a/Shaders/space-ALS-base.frag b/Shaders/space-ALS-base.frag index b54cf83e5..a4b6d6de2 100644 --- a/Shaders/space-ALS-base.frag +++ b/Shaders/space-ALS-base.frag @@ -26,6 +26,7 @@ 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; @@ -51,7 +52,7 @@ 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); +vec3 landing_light(in float offset, in float offsetv); float luminance(vec3 color) @@ -140,11 +141,11 @@ void main() } if (use_landing_light == 1) { - secondary_light += landing_light(landing_light1_offset); + secondary_light += landing_light(landing_light1_offset, landing_light3_offset); } if (use_alt_landing_light == 1) { - secondary_light += landing_light(landing_light2_offset); + 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);} diff --git a/Shaders/space-ALS-ultra.frag b/Shaders/space-ALS-ultra.frag index ff64ffaa8..e95777c66 100644 --- a/Shaders/space-ALS-ultra.frag +++ b/Shaders/space-ALS-ultra.frag @@ -77,6 +77,7 @@ uniform float osg_SimulationTime; uniform float landing_light1_offset; uniform float landing_light2_offset; +uniform float landing_light3_offset; // constants needed by the light and fog computations ################################################### @@ -103,7 +104,7 @@ 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); +vec3 landing_light(in float offset, in float offsetv); @@ -314,11 +315,11 @@ void main (void) } if (use_landing_light == 1) { - secondary_light += landing_light(landing_light1_offset); + secondary_light += landing_light(landing_light1_offset, landing_light3_offset); } if (use_alt_landing_light == 1) { - secondary_light += landing_light(landing_light2_offset); + secondary_light += landing_light(landing_light2_offset, landing_light3_offset); } diff --git a/Shaders/terrain-ALS-ultra.frag b/Shaders/terrain-ALS-ultra.frag index 86fd105f8..adb1ed7d6 100644 --- a/Shaders/terrain-ALS-ultra.frag +++ b/Shaders/terrain-ALS-ultra.frag @@ -51,6 +51,7 @@ 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; @@ -83,7 +84,7 @@ 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); +vec3 landing_light(in float offset, in float offsetv); @@ -463,11 +464,11 @@ if ((dist < 5000.0) && (combined_wetness>0.0)) } if (use_landing_light == 1) { - secondary_light += landing_light(landing_light1_offset); + secondary_light += landing_light(landing_light1_offset, landing_light3_offset); } if (use_alt_landing_light == 1) { - secondary_light += landing_light(landing_light2_offset); + secondary_light += landing_light(landing_light2_offset, landing_light3_offset); } color.rgb +=secondary_light * light_distance_fading(dist); diff --git a/Shaders/tree-ALS-shadow.frag b/Shaders/tree-ALS-shadow.frag index b98706949..5975379f0 100644 --- a/Shaders/tree-ALS-shadow.frag +++ b/Shaders/tree-ALS-shadow.frag @@ -28,6 +28,7 @@ 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; @@ -49,7 +50,7 @@ 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); +vec3 landing_light(in float offset, in float offsetv); vec3 get_hazeColor(in float light_arg); float luminance(vec3 color) @@ -197,11 +198,11 @@ void main() } if (use_landing_light == 1) { - secondary_light += landing_light(landing_light1_offset); + secondary_light += landing_light(landing_light1_offset, landing_light3_offset); } if (use_alt_landing_light == 1) { - secondary_light += landing_light(landing_light2_offset); + secondary_light += landing_light(landing_light2_offset, landing_light3_offset); } } diff --git a/Shaders/tree-ALS.frag b/Shaders/tree-ALS.frag index 9f48306dd..5f713c3a4 100644 --- a/Shaders/tree-ALS.frag +++ b/Shaders/tree-ALS.frag @@ -27,6 +27,7 @@ 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; @@ -48,7 +49,7 @@ 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); +vec3 landing_light(in float offset, in float offsetv); vec3 get_hazeColor(in float light_arg); @@ -168,11 +169,11 @@ void main() } if (use_landing_light == 1) { - secondary_light += landing_light(landing_light1_offset); + secondary_light += landing_light(landing_light1_offset, landing_light3_offset); } if (use_alt_landing_light == 1) { - secondary_light += landing_light(landing_light2_offset); + secondary_light += landing_light(landing_light2_offset, landing_light3_offset); } } diff --git a/Shaders/urban-ALS.frag b/Shaders/urban-ALS.frag index 97e140113..c796621a3 100644 --- a/Shaders/urban-ALS.frag +++ b/Shaders/urban-ALS.frag @@ -47,7 +47,7 @@ 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 vec3 night_color; @@ -83,8 +83,7 @@ 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); - +vec3 landing_light(in float offset, in float offsetv); void QDM(inout vec3 p, inout vec3 v) @@ -308,11 +307,11 @@ if (gquality_level > 2) } if (use_landing_light == 1) { - secondary_light += landing_light(landing_light1_offset); + secondary_light += landing_light(landing_light1_offset, landing_light3_offset); } if (use_alt_landing_light == 1) { - secondary_light += landing_light(landing_light2_offset); + 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); diff --git a/Shaders/water-ALS-high.frag b/Shaders/water-ALS-high.frag index 6ef90ac3d..47d57b907 100644 --- a/Shaders/water-ALS-high.frag +++ b/Shaders/water-ALS-high.frag @@ -61,6 +61,7 @@ uniform float sea_b; 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; @@ -90,7 +91,7 @@ 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); +vec3 landing_light(in float offset, in float offsetv); ////////////////////// @@ -470,11 +471,11 @@ void main(void) } if (use_landing_light == 1) { - secondary_light += landing_light(landing_light1_offset); + secondary_light += landing_light(landing_light1_offset, landing_light3_offset); } if (use_alt_landing_light == 1) { - secondary_light += landing_light(landing_light2_offset); + secondary_light += landing_light(landing_light2_offset, landing_light3_offset); } } diff --git a/preferences.xml b/preferences.xml index 1b9f1984b..b85298313 100644 --- a/preferences.xml +++ b/preferences.xml @@ -289,6 +289,7 @@ Started September 2000 by David Megginson, david@megginson.com false 0.0 0.0 + 0.0 0