2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-05-17 07:21:43 +00:00

fix: inconsistencies on t5 technique compilation

This commit is contained in:
Jan Laupetin
2026-03-15 15:31:01 +01:00
parent f4ed3e6c93
commit b93925c306
6 changed files with 64 additions and 14 deletions
@@ -231,6 +231,7 @@ namespace
static_cast<unsigned>(arg.m_type.m_value_type));
return;
}
const auto buffer = std::ranges::find_if(shaderInfo.m_constant_buffers,
[&boundResource](const d3d11::ConstantBuffer& constantBuffer)
{
@@ -409,15 +410,15 @@ namespace
Indent();
std::string materialPropertyName;
if (m_constant_zone_state.GetConstantName(arg.m_value.name_hash, materialPropertyName)
|| m_constant_zone_state.GetTextureDefName(arg.m_value.name_hash, materialPropertyName))
{
m_stream << std::format("{} = material.{};\n", codeDestAccessor, materialPropertyName);
}
else if (m_constant_zone_state.HashString(codeDestAccessor) == arg.m_value.name_hash)
if (m_constant_zone_state.HashString(codeDestAccessor) == arg.m_value.name_hash)
{
m_stream << std::format("{} = material.{};\n", codeDestAccessor, codeDestAccessor);
}
else if (m_constant_zone_state.GetConstantName(arg.m_value.name_hash, materialPropertyName)
|| m_constant_zone_state.GetTextureDefName(arg.m_value.name_hash, materialPropertyName))
{
m_stream << std::format("{} = material.{};\n", codeDestAccessor, materialPropertyName);
}
else
{
m_stream << std::format("{} = material.#0x{:x};\n", codeDestAccessor, arg.m_value.name_hash);