Integrating latest 47acbe8

This commit is contained in:
alexpete
2021-03-25 13:57:57 -07:00
parent 448c549698
commit 75dc720198
10312 changed files with 2711566 additions and 671451 deletions
@@ -41,9 +41,24 @@ namespace AZ
AZ_Assert(m_layout, "ShaderOptionGroup created with null layout!");
}
void ShaderOptionGroup::Reflect(AZ::ReflectContext* context)
{
if (BehaviorContext* behaviorContext = azrtti_cast<BehaviorContext*>(context))
{
behaviorContext->Class<ShaderOptionGroup>()
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation)
->Attribute(AZ::Script::Attributes::Category, "Shader")
->Attribute(AZ::Script::Attributes::Module, "shader")
->Method("GetValueByOptionName", static_cast<ShaderOptionValue (ShaderOptionGroup::*)(const Name&) const>(&ShaderOptionGroup::GetValue))
->Method("GetShaderOptionDescriptors", &ShaderOptionGroup::GetShaderOptionDescriptors)
->Method("GetShaderVariantId", &ShaderOptionGroup::GetShaderVariantId)
;
}
}
void ShaderOptionGroup::Clear()
{
m_id.reset();
m_id.Reset();
}
ShaderOptionIndex ShaderOptionGroup::FindShaderOptionIndex(const Name& optionName) const
@@ -304,5 +319,10 @@ namespace AZ
return s;
}
const AZStd::vector<AZ::RPI::ShaderOptionDescriptor>& ShaderOptionGroup::GetShaderOptionDescriptors() const
{
return m_layout->GetShaderOptions();
}
} // namespace RPI
} // namespace AZ