summaryrefslogtreecommitdiff
path: root/indra/newview/llvlcomposition.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvlcomposition.cpp')
-rw-r--r--indra/newview/llvlcomposition.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp
index 8d55c80be8..8cd22e3bdb 100644
--- a/indra/newview/llvlcomposition.cpp
+++ b/indra/newview/llvlcomposition.cpp
@@ -119,13 +119,20 @@ void LLTerrainMaterials::setDetailAssetID(S32 asset, const LLUUID& id)
mMaterialTexturesSet[asset] = false;
}
-BOOL LLTerrainMaterials::useTextures()
+BOOL LLTerrainMaterials::getMaterialType()
+{
+ return mMaterialType;
+}
+
+void LLTerrainMaterials::updateMaterialType()
{
LL_PROFILE_ZONE_SCOPED;
- return texturesReady() || !materialsReady();
+ const BOOL use_textures = texturesReady() || !materialsReady();
+ mMaterialType = use_textures ? Type::TEXTURE : Type::PBR;
}
+
BOOL LLTerrainMaterials::texturesReady(BOOL boost)
{
for (S32 i = 0; i < ASSET_COUNT; i++)
@@ -401,7 +408,7 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
U8* st_data[ASSET_COUNT];
S32 st_data_size[ASSET_COUNT]; // for debugging
- const bool use_textures = useTextures();
+ const bool use_textures = getMaterialType() != LLTerrainMaterial::Type::PBR;
for (S32 i = 0; i < ASSET_COUNT; i++)
{