Log reserving texture units

depth-refraction
Petr Mikheev 2 years ago
parent 88567cd363
commit e007dc9d6b

@ -568,7 +568,6 @@ namespace MWRender
{ {
int skyTextureUnit = mResourceSystem->getSceneManager()->getShaderManager().reserveGlobalTextureUnits( int skyTextureUnit = mResourceSystem->getSceneManager()->getShaderManager().reserveGlobalTextureUnits(
Shader::ShaderManager::Slot::SkyTexture); Shader::ShaderManager::Slot::SkyTexture);
Log(Debug::Info) << "Reserving texture unit for sky RTT: " << skyTextureUnit;
mPerViewUniformStateUpdater->enableSkyRTT(skyTextureUnit, mSky->getSkyRTT()); mPerViewUniformStateUpdater->enableSkyRTT(skyTextureUnit, mSky->getSkyRTT());
} }

@ -713,6 +713,27 @@ namespace Shader
mReservedTextureUnitsBySlot[static_cast<int>(slot)] = unit; mReservedTextureUnitsBySlot[static_cast<int>(slot)] = unit;
std::string_view slotDescr;
switch (slot)
{
case Slot::OpaqueDepthTexture:
slotDescr = "opaque depth texture";
break;
case Slot::SkyTexture:
slotDescr = "sky RTT";
break;
case Slot::ShadowMaps:
slotDescr = "shadow maps";
break;
default:
slotDescr = "UNKNOWN";
}
if (unit.count == 1)
Log(Debug::Info) << "Reserving texture unit for " << slotDescr << ": " << unit.index;
else
Log(Debug::Info) << "Reserving texture units for " << slotDescr << ": " << unit.index << ".."
<< (unit.index + count - 1);
return unit.index; return unit.index;
} }

Loading…
Cancel
Save