Improve recognition of material types

This commit is contained in:
Jan
2022-04-29 23:55:10 +02:00
parent 353ad52eba
commit 01d9a4d912
4 changed files with 220 additions and 3 deletions

View File

@ -515,6 +515,17 @@ namespace IW4
};
static_assert(std::extent_v<decltype(g_customSamplerSrc)> == CUSTOM_SAMPLER_COUNT);
inline MaterialTypeInfo g_materialTypeInfo[]
{
{"", ""},
{"m/", "m_"},
{"mc/", "mc_"},
{"mg/", "mg_"},
{"w/", "w_"},
{"wc/", "wc_"}
};
static_assert(std::extent_v<decltype(g_materialTypeInfo)> == MTL_TYPE_COUNT);
static constexpr std::pair<uint32_t, const char*> KnownMaterialSource(const char* name)
{
return std::make_pair(Common::R_HashString(name, 0u), name);