2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-03-05 12:33:02 +00:00

feat: set proper tech flags and sampler flags for loaded techniques

This commit is contained in:
Jan Laupetin
2026-02-28 11:35:37 +00:00
parent a3f250fdca
commit 38cb7d3759

View File

@@ -230,6 +230,9 @@ namespace
}
m_args.emplace_back(argumentType, commonDestination, techset::CommonShaderArgValue{.code_const_source = value});
if (maybeInfo->techFlags)
m_tech_flags |= *maybeInfo->techFlags;
return NoResult{};
}
@@ -241,7 +244,16 @@ namespace
.m_value_type = techset::CommonShaderValueType::CODE_SAMPLER,
};
const auto maybeInfo = m_common_code_source_infos.GetInfoForCodeSamplerSource(codeSamplerSource);
if (!maybeInfo)
return result::Unexpected<std::string>("Could not find info for code sampler");
m_args.emplace_back(argumentType, commonDestination, techset::CommonShaderArgValue{.code_sampler_source = codeSamplerSource});
if (maybeInfo->techFlags)
m_tech_flags |= *maybeInfo->techFlags;
if (maybeInfo->customSamplerIndex)
m_sampler_flags |= (1 << *maybeInfo->customSamplerIndex);
return NoResult{};
}