diff options
| author | Cosmic Linden <cosmic@lindenlab.com> | 2023-10-13 10:35:02 -0700 |
|---|---|---|
| committer | Cosmic Linden <cosmic@lindenlab.com> | 2023-10-13 10:36:51 -0700 |
| commit | 57433341abffba9382e6899b164af40200f5d6d3 (patch) | |
| tree | 74dcdf8e56e8335c0ca75cd3508aaa72fe8fd3c5 /indra/newview/llvlcomposition.cpp | |
| parent | a65c9dad5521d8e8d375003220e362533a142250 (diff) | |
Revert "Revert "DRTVWR-592: (WIP) Fix tiling only in the PBR case. Begin hooking up code for PBR-specific terrain geometry updates. Unfortunately, this version has a bug which can cause rebuilds to be skipped. Needs more work/testing""
This reverts commit 2318d657660320b921e1566b54d3833c0401a34c.
Diffstat (limited to 'indra/newview/llvlcomposition.cpp')
| -rw-r--r-- | indra/newview/llvlcomposition.cpp | 13 |
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++) { |
