summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/lldrawpoolbump.cpp10
-rw-r--r--indra/newview/lldrawpoolwater.cpp2
-rw-r--r--indra/newview/llvosky.cpp7
-rw-r--r--indra/newview/pipeline.cpp54
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml2
5 files changed, 38 insertions, 37 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 343aeb3201..6af4e2274c 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -299,7 +299,7 @@ void LLDrawPoolBump::beginShiny()
void LLDrawPoolBump::bindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& diffuse_channel, S32& cube_channel)
{
LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
- if( cube_map )
+ if( cube_map && !LLPipeline::sReflectionProbesEnabled )
{
if (shader )
{
@@ -346,7 +346,7 @@ void LLDrawPoolBump::renderShiny()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
- if( gSky.mVOSkyp->getCubeMap() )
+ if( gSky.mVOSkyp->getCubeMap() && !LLPipeline::sReflectionProbesEnabled )
{
LLGLEnable blend_enable(GL_BLEND);
if (mShaderLevel > 1)
@@ -378,7 +378,7 @@ void LLDrawPoolBump::renderShiny()
void LLDrawPoolBump::unbindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& diffuse_channel, S32& cube_channel)
{
LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
- if( cube_map )
+ if( cube_map && !LLPipeline::sReflectionProbesEnabled)
{
if (shader_level > 1)
{
@@ -446,7 +446,7 @@ void LLDrawPoolBump::beginFullbrightShiny()
LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
- if (cube_map)
+ if (cube_map && !LLPipeline::sReflectionProbesEnabled)
{
// Make sure that texture coord generation happens for tex unit 1, as that's the one we use for
// the cube map in the one pass shiny shaders
@@ -534,7 +534,7 @@ void LLDrawPoolBump::endFullbrightShiny()
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY);
LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
- if( cube_map )
+ if( cube_map && !LLPipeline::sReflectionProbesEnabled )
{
cube_map->disable();
if (shader->mFeatures.hasReflectionProbes)
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 21b2e56c7c..bc42dab1f2 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -300,7 +300,7 @@ void LLDrawPoolWater::render(S32 pass)
stop_glerror();
- if (gSky.mVOSkyp->getCubeMap())
+ if (gSky.mVOSkyp->getCubeMap() && !LLPipeline::sReflectionProbesEnabled)
{
gSky.mVOSkyp->getCubeMap()->enable(0);
gSky.mVOSkyp->getCubeMap()->bind();
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index 5adc057484..d5979b2280 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -525,11 +525,6 @@ void LLVOSky::calc()
void LLVOSky::initCubeMap()
{
- if (LLPipeline::sReflectionProbesEnabled)
- {
- return;
- }
-
std::vector<LLPointer<LLImageRaw> > images;
for (S32 side = 0; side < NUM_CUBEMAP_FACES; side++)
{
@@ -697,7 +692,7 @@ bool LLVOSky::updateSky()
LLHeavenBody::setInterpVal( mInterpVal );
updateDirections(psky);
- if (!mCubeMap)
+ if (!mCubeMap || LLPipeline::sReflectionProbesEnabled)
{
mCubeMapUpdateStage = NUM_CUBEMAP_FACES;
mForceUpdate = FALSE;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index b41a02d491..d0ebc7645c 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -8489,24 +8489,27 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
stop_glerror();
- channel = shader.enableTexture(LLShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
- if (channel > -1)
- {
- LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
- if (cube_map)
- {
- cube_map->enable(channel);
- cube_map->bind();
- }
+ if (!LLPipeline::sReflectionProbesEnabled)
+ {
+ channel = shader.enableTexture(LLShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
+ if (channel > -1)
+ {
+ LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
+ if (cube_map)
+ {
+ cube_map->enable(channel);
+ cube_map->bind();
+ }
- F32* m = gGLModelView;
+ F32* m = gGLModelView;
- F32 mat[] = { m[0], m[1], m[2],
- m[4], m[5], m[6],
- m[8], m[9], m[10] };
+ F32 mat[] = { m[0], m[1], m[2],
+ m[4], m[5], m[6],
+ m[8], m[9], m[10] };
- shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_ENV_MAT, 1, TRUE, mat);
- }
+ shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_ENV_MAT, 1, TRUE, mat);
+ }
+ }
bindReflectionProbes(shader);
@@ -9346,15 +9349,18 @@ void LLPipeline::unbindDeferredShader(LLGLSLShader &shader)
shader.disableTexture(LLShaderMgr::DEFERRED_NOISE);
shader.disableTexture(LLShaderMgr::DEFERRED_LIGHTFUNC);
- S32 channel = shader.disableTexture(LLShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
- if (channel > -1)
- {
- LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
- if (cube_map)
- {
- cube_map->disable();
- }
- }
+ if (!LLPipeline::sReflectionProbesEnabled)
+ {
+ S32 channel = shader.disableTexture(LLShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
+ if (channel > -1)
+ {
+ LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
+ if (cube_map)
+ {
+ cube_map->disable();
+ }
+ }
+ }
unbindReflectionProbes(shader);
diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
index 8ce365878a..7f03fbe7c3 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
@@ -652,7 +652,7 @@
control_name="RenderReflectionsEnabled"
height="16"
initial_value="true"
- label="Reflections (requires restart)"
+ label="Reflections"
layout="topleft"
left="420"
name="ReflectionsEnabled"