MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / resolveUdimTexture

Method resolveUdimTexture

Source/Falcor/Utils/Image/TextureManager.cpp:750–760  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

748}
749
750TextureManager::CpuTextureHandle TextureManager::resolveUdimTexture(const CpuTextureHandle& handle, const float2& uv) const
751{
752 if (!handle.isUdim())
753 return handle;
754
755 // Compute which UDIM ID texture coordinate maps to.
756 FALCOR_CHECK(uv[0] >= 0.f && uv[0] < 10.f && uv[1] >= 0.f && uv[1] < 10.f, "UDIM texture coordinate ({}) is out of range.", uv);
757 uint32_t udimID = 1001 + uint32_t(uv[0]) + 10 * uint32_t(uv[1]);
758
759 return resolveUdimTexture(handle, udimID);
760}
761
762TextureManager::CpuTextureHandle TextureManager::resolveUdimTexture(const CpuTextureHandle& handle, const uint32_t udimID) const
763{

Callers

nothing calls this directly

Calls 3

CpuTextureHandleClass · 0.85
isUdimMethod · 0.80
getIDMethod · 0.80

Tested by

no test coverage detected