48 for (
auto& iter : _allMaterial)
50 if (!iter._pathTexDiffuse.empty()
51 || !iter._pathTexPhysical.empty()
52 || !iter._pathTexNormal.empty()
53 || !iter._pathTexAo.empty()
54 || !iter._pathTexEmissvie.empty())
64 std::unordered_map<std::string, std::string> map_out;
66 auto fn_output = [&map_out, path](std::string& path_name,
size_t i, std::string_view tag)
68 if (path_name.empty())
70 auto iter = map_out.find(path_name);
71 if (iter == map_out.end())
74 std::string name = fmt::format(
"{}{}{}.{}", path, tag, i,
fmt);
76 map_out[path_name] = name;
81 path_name = iter->second;
85 for (
auto& iter : _allMaterial)
87 fn_output(iter._pathTexDiffuse, i,
"diffuse#");
88 fn_output(iter._pathTexPhysical, i,
"physical#");
89 fn_output(iter._pathTexNormal, i,
"normal#");
90 fn_output(iter._pathTexAo, i,
"ao#");
91 fn_output(iter._pathTexEmissvie, i,
"emissvie#");