summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-09-14 22:43:17 +0300
committerNat Goodspeed <nat@lindenlab.com>2021-11-19 14:43:20 -0500
commit1acd92c30c88a9718385f29a558b77bd20588764 (patch)
tree255f11409a443cb9de262ab6fad3e9a83a42860e /indra/newview
parent58cd9d547c57b4491c3a85b7aade0f56ae7397c8 (diff)
SL-15993 Disabling transparent water should not disable advanced lighting
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappviewer.cpp2
-rw-r--r--indra/newview/lldrawpoolwater.cpp13
-rw-r--r--indra/newview/llfloaterpreference.cpp6
-rw-r--r--indra/newview/llviewercontrol.cpp1
-rw-r--r--indra/newview/llviewershadermgr.cpp2
-rw-r--r--indra/newview/pipeline.cpp1
6 files changed, 15 insertions, 10 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 02b4dd57f1..93e5c2e341 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -579,7 +579,7 @@ static void settings_modify()
LLRenderTarget::sUseFBO = gSavedSettings.getBOOL("RenderDeferred");
LLPipeline::sRenderTransparentWater = gSavedSettings.getBOOL("RenderTransparentWater");
LLPipeline::sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
- LLPipeline::sRenderDeferred = LLPipeline::sRenderTransparentWater && LLPipeline::sRenderBump && gSavedSettings.getBOOL("RenderDeferred");
+ LLPipeline::sRenderDeferred = LLPipeline::sRenderBump && gSavedSettings.getBOOL("RenderDeferred");
LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor");
LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4]
gDebugGL = gSavedSettings.getBOOL("RenderDebugGL") || gDebugSession;
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 5f9e623b4c..2f3c52ecd2 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -137,6 +137,14 @@ void LLDrawPoolWater::endPostDeferredPass(S32 pass)
void LLDrawPoolWater::renderDeferred(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_WATER);
+
+ if (!LLPipeline::sRenderTransparentWater)
+ {
+ // Will render opaque water without use of ALM
+ render(pass);
+ return;
+ }
+
deferred_render = TRUE;
shade();
deferred_render = FALSE;
@@ -340,6 +348,11 @@ void LLDrawPoolWater::renderOpaqueLegacyWater()
LL_PROFILE_ZONE_SCOPED;
LLVOSky *voskyp = gSky.mVOSkyp;
+ if (voskyp == NULL)
+ {
+ return;
+ }
+
LLGLSLShader* shader = NULL;
if (LLGLSLShader::sNoFixedFunction)
{
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 6bf2136f60..92e64d0b95 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1198,11 +1198,9 @@ void LLFloaterPreference::refreshEnabledState()
//Deferred/SSAO/Shadows
BOOL bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump") && gSavedSettings.getBOOL("RenderObjectBump");
- BOOL transparent_water = LLFeatureManager::getInstance()->isFeatureAvailable("RenderTransparentWater") && gSavedSettings.getBOOL("RenderTransparentWater");
BOOL shaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders");
BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
bumpshiny &&
- transparent_water &&
shaders &&
gGLManager.mHasFramebufferObject &&
gSavedSettings.getBOOL("RenderAvatarVP") &&
@@ -1226,9 +1224,6 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
ctrl_reflections->setEnabled(reflections);
reflections_text->setEnabled(reflections);
- // Transparent Water
- LLCheckBoxCtrl* transparent_water_ctrl = getChild<LLCheckBoxCtrl>("TransparentWater");
-
// Bump & Shiny
LLCheckBoxCtrl* bumpshiny_ctrl = getChild<LLCheckBoxCtrl>("BumpShiny");
bool bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump");
@@ -1279,7 +1274,6 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
((bumpshiny_ctrl && bumpshiny_ctrl->get()) ? TRUE : FALSE) &&
- ((transparent_water_ctrl && transparent_water_ctrl->get()) ? TRUE : FALSE) &&
gGLManager.mHasFramebufferObject &&
gSavedSettings.getBOOL("RenderAvatarVP") &&
(ctrl_wind_light->get()) ? TRUE : FALSE;
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 0e64d7152a..e5ebbcb9ab 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -187,7 +187,6 @@ static bool handleRenderPerfTestChanged(const LLSD& newvalue)
bool handleRenderTransparentWaterChanged(const LLSD& newvalue)
{
- LLRenderTarget::sUseFBO = newvalue.asBoolean();
if (gPipeline.isInit())
{
gPipeline.updateRenderTransparentWater();
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 7dcf29eb75..1b6d8210c3 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -424,7 +424,7 @@ void LLViewerShaderMgr::setShaders()
initAttribsAndUniforms();
gPipeline.releaseGLBuffers();
- LLPipeline::sWaterReflections = gGLManager.mHasCubeMap;
+ LLPipeline::sWaterReflections = gGLManager.mHasCubeMap && LLPipeline::sRenderTransparentWater;
LLPipeline::sRenderGlow = gSavedSettings.getBOOL("RenderGlow");
LLPipeline::updateRenderDeferred();
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index e23aeb286c..586e5b7c2d 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1047,7 +1047,6 @@ void LLPipeline::updateRenderDeferred()
RenderDeferred &&
LLRenderTarget::sUseFBO &&
LLPipeline::sRenderBump &&
- LLPipeline::sRenderTransparentWater &&
RenderAvatarVP &&
WindLightUseAtmosShaders &&
(bool) LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred");