MCPcopy Create free account
hub / github.com/NVIDIA-RTX/Donut / GetMipLevelsNum

Function GetMipLevelsNum

src/engine/TextureCache.cpp:329–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329uint GetMipLevelsNum(uint width, uint height)
330{
331 uint size = std::min(width, height);
332 uint levelsNum = (uint)(logf((float)size) / logf(2.0f)) + 1;
333
334 return levelsNum;
335}
336
337void TextureCache::FinalizeTexture(
338 std::shared_ptr<TextureData> texture,

Callers 1

FinalizeTextureMethod · 0.85

Calls 1

minFunction · 0.50

Tested by

no test coverage detected