Shader/ShaderLang: Add support for Unary operators

This commit is contained in:
Lynix
2021-05-16 23:07:25 +02:00
parent 1f05e950e8
commit 525f24af2e
30 changed files with 566 additions and 208 deletions

View File

@@ -120,6 +120,11 @@ namespace Nz::ShaderBuilder
{
inline std::unique_ptr<ShaderAst::SwizzleExpression> operator()(ShaderAst::ExpressionPtr expression, std::vector<ShaderAst::SwizzleComponent> swizzleComponents) const;
};
struct Unary
{
inline std::unique_ptr<ShaderAst::UnaryExpression> operator()(ShaderAst::UnaryType op, ShaderAst::ExpressionPtr expression) const;
};
}
constexpr Impl::AccessMember AccessMember;
@@ -143,6 +148,7 @@ namespace Nz::ShaderBuilder
constexpr Impl::Return Return;
constexpr Impl::SelectOption SelectOption;
constexpr Impl::Swizzle Swizzle;
constexpr Impl::Unary Unary;
}
#include <Nazara/Shader/ShaderBuilder.inl>