diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl index 3557c0766e..c66f3f62b2 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl @@ -40,17 +40,21 @@ uniform sampler2D diffuseMap; uniform sampler2D altDiffuseMap; uniform float blend_factor; // interp factor between sunDisc A/B VARYING vec2 vary_texcoord0; +VARYING float sun_fade; void main() { - vec4 sunDiscA = texture2D(diffuseMap, vary_texcoord0.xy); - vec4 sunDiscB = texture2D(altDiffuseMap, vary_texcoord0.xy); + vec4 sunDiscA = texture2D(diffuseMap, vary_texcoord0.xy); + vec4 sunDiscB = texture2D(altDiffuseMap, vary_texcoord0.xy); vec4 c = mix(sunDiscA, sunDiscB, blend_factor); c.rgb = clamp(c.rgb, vec3(0), vec3(1)); - c.rgb = pow(c.rgb, vec3(0.7f)); - c.rgb = fullbrightAtmosTransport(c.rgb); + c.rgb = pow(c.rgb, vec3(0.7f)); + c.rgb = fullbrightAtmosTransport(c.rgb); c.rgb = fullbrightScaleSoftClip(c.rgb); - frag_data[0] = c; + + c.a *= sun_fade; + + frag_data[0] = c; frag_data[1] = vec4(0.0f); frag_data[2] = vec4(0.0, 1.0, 0.0, 1.0); } |