mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-25 21:03:51 +00:00
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:
parent
791ea1919e
commit
81a9970c91
3 changed files with 36 additions and 0 deletions
|
|
@ -344,6 +344,9 @@ bool TerrainRenderer::loadTerrain(const pipeline::TerrainMesh& mesh,
|
|||
if (baseTexId < texturePaths.size()) {
|
||||
gpuChunk.baseTexture = loadTexture(texturePaths[baseTexId]);
|
||||
} else {
|
||||
LOG_WARNING("Terrain[", tileX, ",", tileY, "] chunk[", x, ",", y,
|
||||
"] base textureId ", baseTexId, " >= texturePaths size ",
|
||||
texturePaths.size(), " — white fallback");
|
||||
gpuChunk.baseTexture = whiteTexture.get();
|
||||
}
|
||||
|
||||
|
|
@ -354,6 +357,11 @@ bool TerrainRenderer::loadTerrain(const pipeline::TerrainMesh& mesh,
|
|||
VkTexture* layerTex = whiteTexture.get();
|
||||
if (layer.textureId < texturePaths.size()) {
|
||||
layerTex = loadTexture(texturePaths[layer.textureId]);
|
||||
} else {
|
||||
LOG_WARNING("Terrain[", tileX, ",", tileY, "] chunk[", x, ",", y,
|
||||
"] layer[", i, "] textureId ", layer.textureId,
|
||||
" >= texturePaths size ", texturePaths.size(),
|
||||
" — white fallback");
|
||||
}
|
||||
gpuChunk.layerTextures[li] = layerTex;
|
||||
|
||||
|
|
@ -445,6 +453,9 @@ bool TerrainRenderer::loadTerrainIncremental(const pipeline::TerrainMesh& mesh,
|
|||
if (baseTexId < texturePaths.size()) {
|
||||
gpuChunk.baseTexture = loadTexture(texturePaths[baseTexId]);
|
||||
} else {
|
||||
LOG_WARNING("Terrain[", tileX, ",", tileY, "] chunk[", cx, ",", cy,
|
||||
"] base textureId ", baseTexId, " >= texturePaths size ",
|
||||
texturePaths.size(), " — white fallback");
|
||||
gpuChunk.baseTexture = whiteTexture.get();
|
||||
}
|
||||
|
||||
|
|
@ -455,6 +466,11 @@ bool TerrainRenderer::loadTerrainIncremental(const pipeline::TerrainMesh& mesh,
|
|||
VkTexture* layerTex = whiteTexture.get();
|
||||
if (layer.textureId < texturePaths.size()) {
|
||||
layerTex = loadTexture(texturePaths[layer.textureId]);
|
||||
} else {
|
||||
LOG_WARNING("Terrain[", tileX, ",", tileY, "] chunk[", cx, ",", cy,
|
||||
"] layer[", i, "] textureId ", layer.textureId,
|
||||
" >= texturePaths size ", texturePaths.size(),
|
||||
" — white fallback");
|
||||
}
|
||||
gpuChunk.layerTextures[li] = layerTex;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue