SL-12978 Add note about similar code in C++ and GLSL

master
Ptolemy 2020-07-01 13:29:35 -07:00
parent 152db2280b
commit 9f0225abaa
2 changed files with 9 additions and 4 deletions

View File

@ -1295,6 +1295,9 @@ void LLSettingsSky::clampColor(LLColor3& color, F32 gamma, F32 scale) const
color = linear;
}
// Similar/Shared Algorithms:
// indra\llinventory\llsettingssky.cpp -- LLSettingsSky::calculateLightSettings()
// indra\newview\app_settings\shaders\class1\windlight\atmosphericsFuncs.glsl -- calcAtmosphericVars()
void LLSettingsSky::calculateLightSettings() const
{
// Initialize temp variables

View File

@ -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;