From 9f0225abaa3011de0845a330fb6d7ef60ab20039 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Wed, 1 Jul 2020 13:29:35 -0700 Subject: SL-12978 Add note about similar code in C++ and GLSL --- .../shaders/class1/windlight/atmosphericsFuncs.glsl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl') diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl index ac0d5f08ee..4d12c5d19a 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl @@ -136,11 +136,13 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou tmpAmbient = vec4(mix(ssao_effect_mat * tmpAmbient.rgb, tmpAmbient.rgb, ambFactor), tmpAmbient.a); } + // Similar/Shared Algorithms: + // indra\llinventory\llsettingssky.cpp -- LLSettingsSky::calculateLightSettings() + // indra\newview\app_settings\shaders\class1\windlight\atmosphericsFuncs.glsl -- calcAtmosphericVars() //haze color - additive = - vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow) + tmpAmbient) - + (haze_horizon * haze_weight) * (sunlight*(1.-cloud_shadow) * temp2.x - + tmpAmbient)); + vec3 cs = sunlight.rgb * (1.-cloud_shadow); + additive = (blue_horizon.rgb * blue_weight.rgb) * (cs + tmpAmbient.rgb) + + (haze_horizon * haze_weight.rgb) * (cs * temp2.x + tmpAmbient.rgb); //brightness of surface both sunlight and ambient sunlit = sunlight.rgb * 0.5; -- cgit v1.2.3