summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-11-01 18:26:24 +0100
committerGraham Linden <graham@lindenlab.com>2018-11-01 18:26:24 +0100
commitfb335cc243581925bb772a1f10112ec493db8552 (patch)
treedab643628fe9ef60162a7ce2db4b9c6963c51650 /indra/newview
parentd292ec7ee065c50e415c0ef06664ab6d428a022b (diff)
SL-10000 fix storing of ambient value when converting legacy settings
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/materialF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/transportF.glsl16
-rw-r--r--indra/newview/llsettingsvo.cpp4
4 files changed, 14 insertions, 14 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index 7f2c5add16..1cfc19267c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -88,7 +88,7 @@ vec3 linear_to_srgb(vec3 cl);
vec2 encode_normal (vec3 n);
vec3 decode_normal (vec2 enc);
-vec3 scaleFragSoftClip(vec3 l);
+vec3 scaleSoftClipFrag(vec3 l);
vec3 atmosFragAmbient(vec3 light, vec3 sunlit);
vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten);
vec3 atmosFragAffectDirectionalLight(float light, vec3 sunlit);
@@ -312,7 +312,7 @@ void main()
//color.rgb = mix(diff.rgb, color.rgb, final_alpha);
color.rgb = atmosFragLighting(color.rgb, additive, atten);
- color.rgb = scaleFragSoftClip(color.rgb);
+ color.rgb = scaleSoftClipFrag(color.rgb);
vec4 light = vec4(0,0,0,0);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
index 6e06453a5b..9f52e72313 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
@@ -42,7 +42,7 @@ vec3 linear_to_srgb(vec3 cl);
vec3 atmosFragAmbient(vec3 l, vec3 ambient);
vec3 atmosFragLighting(vec3 l, vec3 additive, vec3 atten);
-vec3 scaleFragSoftClip(vec3 l);
+vec3 scaleSoftClipFrag(vec3 l);
vec3 atmosFragAffectDirectionalLight(float intensity, vec3 sunlit);
void calcFragAtmospherics(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten);
@@ -455,7 +455,7 @@ void main()
//col = mix(scaleSoftClip(col), fullbrightScaleSoftClip(col), diffuse.a);
col = atmosFragLighting(col, additive, atten);
- col = scaleFragSoftClip(col);
+ col = scaleSoftClipFrag(col);
//convert to linear space before adding local lights
col = srgb_to_linear(col);
diff --git a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
index 976e5066dc..7f874e0ccf 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
@@ -32,7 +32,7 @@ vec3 getAtmosAttenuation();
uniform int no_atmo;
-vec3 atmosFragTransport(vec3 light, vec3 atten, vec3 additive) {
+vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten) {
if (no_atmo == 0)
{
light *= atten.r;
@@ -41,32 +41,32 @@ vec3 atmosFragTransport(vec3 light, vec3 atten, vec3 additive) {
return light;
}
-vec3 fullbrightFragAtmosTransport(vec3 light, vec3 atten, vec3 additive) {
+vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten) {
if (no_atmo == 1)
{
return light;
}
float brightness = dot(light.rgb, vec3(0.33333));
- return mix(atmosFragTransport(light.rgb, atten, additive), light.rgb + additive.rgb, brightness * brightness);
+ return mix(atmosTransportFrag(light.rgb, additive, atten), light.rgb + additive.rgb, brightness * brightness);
}
-vec3 fullbrightFragShinyAtmosTransport(vec3 light, vec3 atten, vec3 additive) {
+vec3 fullbrightShinyAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten) {
if (no_atmo == 1)
{
return light;
}
float brightness = dot(light.rgb, vec3(0.33333));
- return mix(atmosFragTransport(light.rgb, atten, additive), (light.rgb + additive.rgb) * (2.0 - brightness), brightness * brightness);
+ return mix(atmosTransportFrag(light.rgb, additive, atten), (light.rgb + additive.rgb) * (2.0 - brightness), brightness * brightness);
}
vec3 atmosTransport(vec3 light) {
- return (no_atmo == 1) ? light : atmosFragTransport(light, getAtmosAttenuation(), getAdditiveColor());
+ return (no_atmo == 1) ? light : atmosTransportFrag(light, getAtmosAttenuation(), getAdditiveColor());
}
vec3 fullbrightAtmosTransport(vec3 light) {
- return (no_atmo == 1) ? light : fullbrightFragAtmosTransport(light, getAtmosAttenuation(), getAdditiveColor());
+ return (no_atmo == 1) ? light : fullbrightAtmosTransportFrag(light, getAtmosAttenuation(), getAdditiveColor());
}
vec3 fullbrightShinyAtmosTransport(vec3 light) {
- return (no_atmo == 1) ? light : fullbrightFragShinyAtmosTransport(light, getAtmosAttenuation(), getAdditiveColor());
+ return (no_atmo == 1) ? light : fullbrightShinyAtmosTransportFrag(light, getAtmosAttenuation(), getAdditiveColor());
}
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 2696ad4df5..3925f37703 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -695,7 +695,7 @@ LLSettingsSky::parammapping_t LLSettingsVOSky::getParameterMap() const
param_map[SETTING_DISTANCE_MULTIPLIER] = DefaultParam(LLShaderMgr::DISTANCE_MULTIPLIER, LLSD(0.8f));
// Following values are always present, so we can just zero these ones, but used values from defaults()
- LLSD& sky_defaults = LLSettingsSky::defaults();
+ LLSD sky_defaults = LLSettingsSky::defaults();
param_map[SETTING_CLOUD_COLOR] = DefaultParam(LLShaderMgr::CLOUD_COLOR, sky_defaults[SETTING_CLOUD_COLOR]);
param_map[SETTING_CLOUD_POS_DENSITY2] = DefaultParam(LLShaderMgr::CLOUD_POS_DENSITY2, sky_defaults[SETTING_CLOUD_POS_DENSITY2]);
param_map[SETTING_CLOUD_SCALE] = DefaultParam(LLShaderMgr::CLOUD_SCALE, sky_defaults[SETTING_CLOUD_SCALE]);
@@ -916,7 +916,7 @@ LLSettingsWater::parammapping_t LLSettingsVOWater::getParameterMap() const
if (param_map.empty())
{
- LLSD &water_defaults = LLSettingsWater::defaults();
+ LLSD water_defaults = LLSettingsWater::defaults();
param_map[SETTING_FOG_COLOR] = DefaultParam(LLShaderMgr::WATER_FOGCOLOR, water_defaults[SETTING_FOG_COLOR]);
param_map[SETTING_FOG_DENSITY] = DefaultParam(LLShaderMgr::WATER_FOGDENSITY, water_defaults[SETTING_FOG_DENSITY]);
}