Shader: Remove the need of layout(std140) in external block

This commit is contained in:
Jérôme Leclercq
2021-04-12 18:52:48 +02:00
parent 854bb16320
commit 3499c1f92f
8 changed files with 144 additions and 125 deletions

View File

@@ -95,6 +95,7 @@ namespace Nz::ShaderAst
inline bool IsNoType(const ExpressionType& type);
inline bool IsPrimitiveType(const ExpressionType& type);
inline bool IsSamplerType(const ExpressionType& type);
inline bool IsStructType(const ExpressionType& type);
inline bool IsUniformType(const ExpressionType& type);
inline bool IsVectorType(const ExpressionType& type);
}

View File

@@ -109,6 +109,11 @@ namespace Nz::ShaderAst
return std::holds_alternative<SamplerType>(type);
}
bool IsStructType(const ExpressionType& type)
{
return std::holds_alternative<StructType>(type);
}
bool IsUniformType(const ExpressionType& type)
{
return std::holds_alternative<UniformType>(type);