diff options
author | Graham Linden <graham@lindenlab.com> | 2019-04-26 08:01:36 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-04-26 08:01:36 -0700 |
commit | ca2f3dfd662bc70a187604b3cd638c97e0507843 (patch) | |
tree | 24b946d947a1d5ef71ae0b389318e521c97497c6 /indra/newview/app_settings | |
parent | 948deb56d9aa11d61bba76a1e79040e8db0baf49 (diff) |
Make terrain shader decide to include atmo effects or not based on whether we're underwater or not.
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl index 9829842a0f..b49d86b2a2 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl @@ -61,12 +61,14 @@ void main() float alpha2 = texture2D(alpha_ramp,vary_texcoord1.xy).a; float alphaFinal = texture2D(alpha_ramp, vary_texcoord1.zw).a; vec4 outColor = mix( mix(color3, color2, alpha2), mix(color1, color0, alpha1), alphaFinal ); - + + outColor.a = 0.0; // yes, downstream atmospherics #ifdef WATER_FOG outColor = applyWaterFogView(pos.xyz, outColor); + outColor.a = 1.0; // no downstream atmo #endif - - frag_data[0] = vec4(outColor.rgb, 0.0); + + frag_data[0] = outColor; frag_data[1] = vec4(0.0,0.0,0.0,0.0); vec3 nvn = normalize(vary_normal); frag_data[2] = vec4(encode_normal(nvn.xyz), 0.0, 0.0); |