fix(rendering): add warnings for silent texture fallbacks

M2 particle/ribbon/batch, terrain layer, and WMO material texture
resolution paths were silently falling back to white textures when
indices were out of range — making missing texture issues hard to
diagnose. Add LOG_WARNING at each silent failure point with model
name, index details, and array sizes.
This commit is contained in:
Kelsi 2026-04-03 16:11:45 -07:00
parent 791ea1919e
commit 81a9970c91
3 changed files with 36 additions and 0 deletions

View file

@ -575,7 +575,15 @@ bool WMORenderer::loadModel(const pipeline::WMOModel& model, uint32_t id) {
tex = modelData.textures[texIndex];
hasTexture = (tex != nullptr && tex != whiteTexture_.get());
if (!tex) tex = whiteTexture_.get();
} else {
LOG_WARNING("WMO ", id, " batch materialId=", batch.materialId,
" texIndex=", texIndex, " >= textures size ",
modelData.textures.size(), " — white fallback");
}
} else {
LOG_WARNING("WMO ", id, " batch materialId=", batch.materialId,
" >= materialTextureIndices size ",
modelData.materialTextureIndices.size(), " — white fallback");
}
bool alphaTest = false;