diff options
author | Graham Linden <graham@lindenlab.com> | 2019-06-10 09:15:35 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-06-10 09:15:35 -0700 |
commit | b79d0d2fdd047636598cbc9b088c3d4a10a84460 (patch) | |
tree | 6849c5cc4582c4720d121673121a418524a0cf77 /indra/newview/app_settings/shaders/class1/windlight | |
parent | 49eae58bd0d1eceda18a3997454beb15a5e27cbd (diff) |
SL-10969, SL-11051
Make fullbright alpha mask with mask cutoff == 0 not generate shadows.
Adjust handling of ambient across forward and deferred again.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/windlight')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl index fa20d63a4a..deda4d8b7e 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl @@ -47,7 +47,7 @@ float getAmbientClamp() return 1.0f; } -void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten) { +void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten, bool use_ao) { vec3 P = inPositionEye; @@ -116,9 +116,11 @@ void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, o temp2.x += .25; temp2.x *= sun_moon_glow_factor; - + + vec4 amb_color = ambient_color; + //increase ambient when there are more clouds - vec4 tmpAmbient = ambient_color + (vec4(1.) - ambient_color) * cloud_shadow * 0.5; + vec4 tmpAmbient = amb_color + (vec4(1.) - amb_color) * cloud_shadow * 0.5; /* decrease value and saturation (that in HSV, not HSL) for occluded areas * // for HSV color/geometry used here, see http://gimp-savvy.com/BOOK/index.html?node52.html @@ -128,7 +130,10 @@ void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, o * vec3 ambHueSat = vec3(tmpAmbient) - vec3(ambValue); * tmpAmbient = vec4(RenderSSAOEffect.valueFactor * vec3(ambValue) + RenderSSAOEffect.saturationFactor *(1.0 - ambFactor) * ambHueSat, ambAlpha); */ - tmpAmbient = vec4(mix(ssao_effect_mat * tmpAmbient.rgb, tmpAmbient.rgb, ambFactor), tmpAmbient.a); + if (use_ao) + { + tmpAmbient = vec4(mix(ssao_effect_mat * tmpAmbient.rgb, tmpAmbient.rgb, ambFactor), tmpAmbient.a); + } //haze color additive = |