summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl4
-rw-r--r--indra/newview/llface.cpp13
3 files changed, 10 insertions, 11 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 09b1813ebe..b1dce665a1 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -147,9 +147,9 @@ vec3 post_diffuse = color.rgb;
if (nh > 0.0)
{
float scontrib = fres*texture2D(lightFunc, vec2(nh, spec.a)).r*gt/(nh*da);
- vec3 sp = sun_contrib*scontrib / 16.0;
+ vec3 sp = sun_contrib*scontrib / 6.0;
sp = clamp(sp, vec3(0), vec3(1));
- bloom += dot(sp, sp) / 6.0;
+ bloom += dot(sp, sp) / 4.0;
#if !defined(SUNLIGHT_KILL)
color += sp * spec.rgb;
#endif
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 0223cef531..f49fad5517 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -155,9 +155,9 @@ vec3 post_diffuse = color.rgb;
if (nh > 0.0)
{
float scontrib = fres*texture2D(lightFunc, vec2(nh, spec.a)).r*gt/(nh*da);
- vec3 sp = sun_contrib*scontrib / 16.0;
+ vec3 sp = sun_contrib*scontrib / 6.0;
sp = clamp(sp, vec3(0), vec3(1));
- bloom += dot(sp, sp) / 6.0;
+ bloom += dot(sp, sp) / 4.0;
#if !defined(SUNLIGHT_KILL)
color += sp * spec.rgb;
#endif
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 209dc010d4..174d8e34d1 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1419,17 +1419,16 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (shiny_in_alpha)
{
-
- static const GLfloat alpha[4] =
+ static const GLfloat SHININESS_TO_ALPHA[4] =
{
- 0.00f,
- 0.25f,
- 0.5f,
- 0.75f
+ 0.0000f,
+ 0.3333f,
+ 0.6666f,
+ 1.0000f
};
llassert(tep->getShiny() <= 3);
- color.mV[3] = U8 (alpha[tep->getShiny()] * 255);
+ color.mV[3] = U8 (SHININESS_TO_ALPHA[tep->getShiny()] * 255);
}
}
}