summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/transportF.glsl2
-rw-r--r--indra/newview/llvosky.cpp7
5 files changed, 9 insertions, 13 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
index cbc19bbba3..8791469675 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
@@ -45,7 +45,7 @@ vec3 linear_to_srgb(vec3 cl);
void main()
{
vec4 diff = texture2DRect(diffuseRect, vary_fragcoord);
- diff.rgb = linear_to_srgb(diff.rgb);
+ diff.rgb = pow(diff.rgb, vec3(display_gamma));
frag_color = diff;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 308a85d2d9..541122fb18 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -153,10 +153,9 @@ void main()
ambient *= ambient;
ambient = (1.0-ambient);
- col.rgb = ambient * ((col * 0.5) + amblit);
-
- col += sunlit * max(min(da, scol), 0.0);
-
+ col.rgb = amblit;
+ col.rgb *= ambient;
+ col += sunlit * min(da, scol);
col *= diffuse.rgb;
vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
index 9653e0809e..3f33eeb8d8 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
@@ -52,8 +52,8 @@ vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten)
return light;
}
light *= atten.r;
- light += additive * 2.0;
- return light;
+ light += additive;
+ return light * 2.0;
}
vec3 atmosLighting(vec3 light)
diff --git a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
index 359fea3073..1ef345d79b 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
@@ -53,7 +53,7 @@ vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
return mix(atmosTransportFrag(light.rgb, additive, atten), light.rgb + additive.rgb, brightness * brightness);
}
-vec3 fullbrightShinyAtmosTransportFrag(vec3 light, vec3 atten, vec3 additive) {
+vec3 fullbrightShinyAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten) {
if (no_atmo == 1)
{
return light;
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index b890e21e41..f5aa003417 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -1000,11 +1000,8 @@ void LLVOSky::setMoonTextures(const LLUUID& moon_texture, const LLUUID& moon_tex
{
LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
- LLUUID moon_tex = moon_texture.isNull() ? psky->GetDefaultMoonTextureId() : moon_texture;
- LLUUID moon_tex_next = moon_texture_next.isNull() ? psky->GetDefaultMoonTextureId() : moon_texture_next;
-
- mMoonTexturep[0] = moon_tex.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_tex, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
- mMoonTexturep[1] = moon_tex_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_tex_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
+ mMoonTexturep[0] = moon_texture.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_texture, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
+ mMoonTexturep[1] = moon_texture_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_texture_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
if (mFace[FACE_MOON])
{