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:
@@ -230,6 +230,9 @@ namespace
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_args.emplace_back(argumentType, commonDestination, techset::CommonShaderArgValue{.code_const_source = value});
|
m_args.emplace_back(argumentType, commonDestination, techset::CommonShaderArgValue{.code_const_source = value});
|
||||||
|
if (maybeInfo->techFlags)
|
||||||
|
m_tech_flags |= *maybeInfo->techFlags;
|
||||||
|
|
||||||
return NoResult{};
|
return NoResult{};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -241,7 +244,16 @@ namespace
|
|||||||
.m_value_type = techset::CommonShaderValueType::CODE_SAMPLER,
|
.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});
|
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{};
|
return NoResult{};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user