Skip to content
Snippets Groups Projects
Commit 3e5c9926 authored by Michael Pohoreski's avatar Michael Pohoreski Committed by Dave Houlton
Browse files

Merged in SL-12574 (pull request #9)

DRTVWR-440: SL-12574: Tweak environment cube map to better match Windlight

Approved-by: Dave Houlton
parents 90e3974b 4be51fa5
No related branches found
No related tags found
No related merge requests found
...@@ -147,9 +147,9 @@ vec3 post_diffuse = color.rgb; ...@@ -147,9 +147,9 @@ vec3 post_diffuse = color.rgb;
if (nh > 0.0) if (nh > 0.0)
{ {
float scontrib = fres*texture2D(lightFunc, vec2(nh, spec.a)).r*gt/(nh*da); 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)); sp = clamp(sp, vec3(0), vec3(1));
bloom += dot(sp, sp) / 6.0; bloom += dot(sp, sp) / 4.0;
#if !defined(SUNLIGHT_KILL) #if !defined(SUNLIGHT_KILL)
color += sp * spec.rgb; color += sp * spec.rgb;
#endif #endif
......
...@@ -155,9 +155,9 @@ vec3 post_diffuse = color.rgb; ...@@ -155,9 +155,9 @@ vec3 post_diffuse = color.rgb;
if (nh > 0.0) if (nh > 0.0)
{ {
float scontrib = fres*texture2D(lightFunc, vec2(nh, spec.a)).r*gt/(nh*da); 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)); sp = clamp(sp, vec3(0), vec3(1));
bloom += dot(sp, sp) / 6.0; bloom += dot(sp, sp) / 4.0;
#if !defined(SUNLIGHT_KILL) #if !defined(SUNLIGHT_KILL)
color += sp * spec.rgb; color += sp * spec.rgb;
#endif #endif
......
...@@ -1419,17 +1419,16 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, ...@@ -1419,17 +1419,16 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (shiny_in_alpha) if (shiny_in_alpha)
{ {
static const GLfloat SHININESS_TO_ALPHA[4] =
static const GLfloat alpha[4] =
{ {
0.00f, 0.0000f,
0.25f, 0.3333f,
0.5f, 0.6666f,
0.75f 1.0000f
}; };
llassert(tep->getShiny() <= 3); llassert(tep->getShiny() <= 3);
color.mV[3] = U8 (alpha[tep->getShiny()] * 255); color.mV[3] = U8 (SHININESS_TO_ALPHA[tep->getShiny()] * 255);
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment