summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llglslshader.cpp6
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/moonF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/moonF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/sunDiscF.glsl2
-rw-r--r--indra/newview/lldrawpool.h20
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp23
-rw-r--r--indra/newview/llenvironment.cpp3
8 files changed, 28 insertions, 32 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index ff79efcc5b..639033f143 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -799,12 +799,6 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms)
continue;
}
- if (-1 == specularMap && std::string(name) == "specularMap")
- {
- specularMap = i;
- continue;
- }
-
if (-1 == bumpMap && std::string(name) == "bumpMap")
{
bumpMap = i;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl b/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl
index 2bfc4f3d2f..e86bca3ddd 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl
@@ -49,7 +49,7 @@ void main()
{
vec4 moonA = texture2D(diffuseMap, vary_texcoord0.xy);
vec4 moonB = texture2D(altDiffuseMap, vary_texcoord0.xy);
- vec4 c = mix(moonB, moonA, blend_factor);
+ vec4 c = mix(moonA, moonB, blend_factor);
c.rgb = pow(c.rgb, vec3(0.7f));
c.rgb = fullbrightAtmosTransport(c.rgb);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl
index bbc5049f1c..3557c0766e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl
@@ -45,7 +45,7 @@ void main()
{
vec4 sunDiscA = texture2D(diffuseMap, vary_texcoord0.xy);
vec4 sunDiscB = texture2D(altDiffuseMap, vary_texcoord0.xy);
- vec4 c = mix(sunDiscB, sunDiscA, blend_factor);
+ vec4 c = mix(sunDiscA, sunDiscB, blend_factor);
c.rgb = clamp(c.rgb, vec3(0), vec3(1));
c.rgb = pow(c.rgb, vec3(0.7f));
c.rgb = fullbrightAtmosTransport(c.rgb);
diff --git a/indra/newview/app_settings/shaders/class1/windlight/moonF.glsl b/indra/newview/app_settings/shaders/class1/windlight/moonF.glsl
index 480a0e1dc4..933625986c 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/moonF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/moonF.glsl
@@ -49,7 +49,7 @@ void main()
{
vec4 moonA = texture2D(diffuseMap, vary_texcoord0.xy);
vec4 moonB = texture2D(altDiffuseMap, vary_texcoord0.xy);
- vec4 c = mix(moonB, moonA, blend_factor);
+ vec4 c = mix(moonA, moonB, blend_factor);
c.rgb = pow(c.rgb, vec3(0.45f));
c.rgb = fullbrightAtmosTransport(c.rgb);
diff --git a/indra/newview/app_settings/shaders/class1/windlight/sunDiscF.glsl b/indra/newview/app_settings/shaders/class1/windlight/sunDiscF.glsl
index 05251e7e96..3f2375ee4d 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/sunDiscF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/sunDiscF.glsl
@@ -45,7 +45,7 @@ void main()
{
vec4 sunA = texture2D(diffuseMap, vary_texcoord0.xy);
vec4 sunB = texture2D(altDiffuseMap, vary_texcoord0.xy);
- vec4 c = mix(sunB, sunA, blend_factor);
+ vec4 c = mix(sunA, sunB, blend_factor);
c.rgb = pow(c.rgb, vec3(0.7f));
c.rgb = fullbrightAtmosTransport(c.rgb);
c.rgb = fullbrightScaleSoftClip(c.rgb);
diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h
index 11d8dd2e1c..bc299cc89f 100644
--- a/indra/newview/lldrawpool.h
+++ b/indra/newview/lldrawpool.h
@@ -46,22 +46,22 @@ public:
enum
{
// Correspond to LLPipeline render type
- POOL_SKY = 1,
- POOL_WL_SKY,
- POOL_TERRAIN,
+ POOL_SIMPLE = 1,
POOL_GROUND,
- POOL_GRASS,
- POOL_VOIDWATER,
- POOL_WATER,
- POOL_SIMPLE,
POOL_FULLBRIGHT,
POOL_BUMP,
- POOL_MATERIALS,
+ POOL_MATERIALS,
+ POOL_TERRAIN,
+ POOL_SKY,
+ POOL_WL_SKY,
POOL_TREE,
POOL_ALPHA_MASK,
- POOL_FULLBRIGHT_ALPHA_MASK,
+ POOL_FULLBRIGHT_ALPHA_MASK,
+ POOL_GRASS,
POOL_INVISIBLE, // see below *
- POOL_AVATAR,
+ POOL_AVATAR,
+ POOL_VOIDWATER,
+ POOL_WATER,
POOL_GLOW,
POOL_ALPHA,
NUM_POOL_TYPES,
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 6b32c196dc..4bf47f4fd6 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -379,6 +379,9 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
LLViewerTexture* tex_a = face->getTexture(LLRender::DIFFUSE_MAP);
LLViewerTexture* tex_b = face->getTexture(LLRender::ALTERNATE_DIFFUSE_MAP);
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE);
+
// if we even have sun disc textures to work with...
if (tex_a || tex_b)
{
@@ -391,20 +394,18 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
if (tex_a && (!tex_b || (tex_a == tex_b)))
{
// Bind current and next sun textures
- gGL.getTexUnit(0)->bind(tex_a);
- gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE);
+ sun_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_a, LLTexUnit::TT_TEXTURE);
blend_factor = 0;
}
else if (tex_b && !tex_a)
{
- gGL.getTexUnit(0)->bind(tex_b);
- gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE);
+ sun_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_b, LLTexUnit::TT_TEXTURE);
blend_factor = 0;
}
else if (tex_b != tex_a)
{
- gGL.getTexUnit(0)->bind(tex_a);
- gGL.getTexUnit(1)->bind(tex_b);
+ sun_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_a, LLTexUnit::TT_TEXTURE);
+ sun_shader->bindTexture(LLShaderMgr::ALTERNATE_DIFFUSE_MAP, tex_b, LLTexUnit::TT_TEXTURE);
}
LLColor4 color(gSky.mVOSkyp->getSun().getInterpColor());
@@ -445,20 +446,18 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
if (tex_a && (!tex_b || (tex_a == tex_b)))
{
// Bind current and next sun textures
- gGL.getTexUnit(0)->bind(tex_a);
- gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE);
+ moon_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_a, LLTexUnit::TT_TEXTURE);
blend_factor = 0;
}
else if (tex_b && !tex_a)
{
- gGL.getTexUnit(0)->bind(tex_b);
- gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE);
+ moon_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_b, LLTexUnit::TT_TEXTURE);
blend_factor = 0;
}
else if (tex_b != tex_a)
{
- gGL.getTexUnit(0)->bind(tex_a);
- gGL.getTexUnit(1)->bind(tex_b);
+ moon_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_a, LLTexUnit::TT_TEXTURE);
+ moon_shader->bindTexture(LLShaderMgr::ALTERNATE_DIFFUSE_MAP, tex_b, LLTexUnit::TT_TEXTURE);
}
if (can_use_vertex_shaders)
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 8f703d0035..6e19df0a94 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -1622,7 +1622,10 @@ void LLEnvironment::DayInstance::setSky(const LLSettingsSky::ptr_t &psky)
mType = TYPE_FIXED;
mInitialized = false;
+ bool different_sky = mSky != psky;
+
mSky = psky;
+ mSky->mReplaced |= different_sky;
mSky->update();
mBlenderSky.reset();