diff --git a/data/shaders/opengl/rayleigh_sky.frag b/data/shaders/opengl/rayleigh_sky.frag index 533f24e790..ffc2011425 100644 --- a/data/shaders/opengl/rayleigh_sky.frag +++ b/data/shaders/opengl/rayleigh_sky.frag @@ -205,15 +205,11 @@ void main(void) vec3 specularHighlight = vec3(0.0); sphereEntryExitDist(skyNear, skyFar, geosphereCenter, varyingEyepos.xyz, geosphereRadius * geosphereAtmosTopRad); - float atmosDist = (skyFar - skyNear); - float ldprod=0.0; // a&b scaled so length of 1.0 means planet surface. vec3 a = (skyNear * eyenorm - geosphereCenter) * geosphereInvRadius; vec3 b = (skyFar * eyenorm - geosphereCenter) * geosphereInvRadius; - ldprod = AtmosLengthDensityProduct(a, b, atmosColor.a * geosphereAtmosFogDensity, atmosDist, geosphereAtmosInvScaleHeight); - float fogFactor = 1.0 / exp(ldprod); vec4 atmosDiffuse = vec4(0.0); #if (NUM_LIGHTS > 0) @@ -232,7 +228,7 @@ void main(void) #endif atmosDiffuse.a = 1.0; - frag_color = (1.0-fogFactor) * (atmosDiffuse * + frag_color = (atmosDiffuse * vec4(specularHighlight.rgb, 1.0) * 20 ); }