summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-01-29 10:04:15 -0800
committerGraham Linden <graham@lindenlab.com>2019-01-29 10:04:15 -0800
commit04cb0884581da31128cf8c7473e8c6b1ba1ddbf9 (patch)
tree8844080088ba140f768604789a5c5dd9c2c0bcf7
parent5748a1f6390439b428cbab1a99ce0cbbf48fa145 (diff)
SL-10381
Make deferred render use the same terrain texture boost hack as low.
-rw-r--r--indra/newview/lldrawpoolterrain.cpp23
-rw-r--r--indra/newview/lldrawpoolterrain.h2
2 files changed, 17 insertions, 8 deletions
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index 593636b14a..e716214d72 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -145,6 +145,18 @@ S32 LLDrawPoolTerrain::getDetailMode()
return sDetailMode;
}
+void LLDrawPoolTerrain::boostTerrainDetailTextures()
+{
+ // Hack! Get the region that this draw pool is rendering from!
+ LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion();
+ LLVLComposition *compp = regionp->getComposition();
+ for (S32 i = 0; i < 4; i++)
+ {
+ compp->mDetailTextures[i]->setBoostLevel(LLGLTexture::BOOST_TERRAIN);
+ compp->mDetailTextures[i]->addTextureStats(1024.f*1024.f); // assume large pixel area
+ }
+}
+
void LLDrawPoolTerrain::render(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
@@ -154,14 +166,7 @@ void LLDrawPoolTerrain::render(S32 pass)
return;
}
- // Hack! Get the region that this draw pool is rendering from!
- LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion();
- LLVLComposition *compp = regionp->getComposition();
- for (S32 i = 0; i < 4; i++)
- {
- compp->mDetailTextures[i]->setBoostLevel(LLGLTexture::BOOST_TERRAIN);
- compp->mDetailTextures[i]->addTextureStats(1024.f*1024.f); // assume large pixel area
- }
+ boostTerrainDetailTextures();
LLOverrideFaceColor override(this, 1.f, 1.f, 1.f, 1.f);
@@ -236,6 +241,8 @@ void LLDrawPoolTerrain::renderDeferred(S32 pass)
return;
}
+ boostTerrainDetailTextures();
+
renderFullShader();
// Special-case for land ownership feedback
diff --git a/indra/newview/lldrawpoolterrain.h b/indra/newview/lldrawpoolterrain.h
index 55f75e2644..b4ef7881a8 100644
--- a/indra/newview/lldrawpoolterrain.h
+++ b/indra/newview/lldrawpoolterrain.h
@@ -78,6 +78,8 @@ public:
static F32 sDetailScale; // meters per texture
protected:
+ void boostTerrainDetailTextures();
+
void renderSimple();
void renderOwnership();