Skip to content

Commit

Permalink
HnMaterial: fixed issue with texcoord mapping update
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Oct 4, 2024
1 parent f34e9a7 commit 99303aa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Hydrogent/src/HnMaterial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,12 @@ static TEXTURE_FORMAT GetMaterialTextureFormat(const pxr::TfToken& Name)

HnMaterial::TexNameToCoordSetMapType HnMaterial::AllocateTextures(HnTextureRegistry& TexRegistry)
{
// Keep old textures alive in the cache
auto OldTextures = std::move(m_Textures);

m_Textures.clear();
m_TexCoords.clear();

// Texture name to texture coordinate set index (e.g. "diffuseColor" -> 0)
TexNameToCoordSetMapType TexNameToCoordSetMap;

Expand Down

0 comments on commit 99303aa

Please sign in to comment.