diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-01-24 13:37:58 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-01-24 13:37:58 +0800 |
commit | 867b8979de2514e059189239fdb674be232ac4c0 (patch) | |
tree | 3e9ee8c0fff364211f518fcbc70b97470b30d42b /indra/newview/llvovolume.cpp | |
parent | a9a601de76da660a454fab779395ab4959765b7a (diff) | |
parent | aa02a5b3f44243e55f85e121d7d53e96e94a7422 (diff) |
Merge remote-tracking branch 'secondlife/release/2024.12-ForeverFPS' into 2024.12-ForeverFPS
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index a3e9e862fe..6e946f238b 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5739,7 +5739,12 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) continue; } - LLFetchedGLTFMaterial *gltf_mat = (LLFetchedGLTFMaterial*) facep->getTextureEntry()->getGLTFRenderMaterial(); + LLFetchedGLTFMaterial* gltf_mat = nullptr; + const LLTextureEntry* te = facep->getTextureEntry(); + if (te) + { + gltf_mat = (LLFetchedGLTFMaterial*)te->getGLTFRenderMaterial(); + } // if not te, continue? bool is_pbr = gltf_mat != nullptr; if (is_pbr) @@ -5801,10 +5806,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) { cur_total += facep->getGeomCount(); - const LLTextureEntry* te = facep->getTextureEntry(); LLViewerTexture* tex = facep->getTexture(); - if (te->getGlow() > 0.f) + if (te && te->getGlow() > 0.f) { emissive = true; } @@ -5898,6 +5902,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) facep->mLastUpdateTime = gFrameTimeSeconds; } + if (te) { LLGLTFMaterial* gltf_mat = te->getGLTFRenderMaterial(); @@ -5962,6 +5967,11 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) add_face(sFullbrightFaces, fullbright_count, facep); } } + else // no texture entry + { + facep->setState(LLFace::FULLBRIGHT); + add_face(sFullbrightFaces, fullbright_count, facep); + } } } else |