MCPcopy Create free account
hub / github.com/DiligentGraphics/DiligentFX / GetMaterialTextureFormat

Function GetMaterialTextureFormat

Hydrogent/src/HnMaterial.cpp:410–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408}
409
410static TEXTURE_FORMAT GetMaterialTextureFormat(const pxr::TfToken& Name)
411{
412 if (Name == HnTokens->diffuseColor ||
413 Name == HnTokens->emissiveColor ||
414 Name == HnTokens->normal)
415 {
416 return TEX_FORMAT_RGBA8_UNORM;
417 }
418 else if (Name == HnTokens->metallic ||
419 Name == HnTokens->roughness ||
420 Name == HnTokens->occlusion)
421 {
422 return TEX_FORMAT_R8_UNORM;
423 }
424 else
425 {
426 return TEX_FORMAT_UNKNOWN;
427 }
428}
429
430HnMaterial::TexNameToCoordSetMapType HnMaterial::AllocateTextures(HnTextureRegistry& TexRegistry)
431{

Callers 1

AllocateTexturesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected