Shader: Attribute can now have expressions as values and struct fields can be conditionally supported

This commit is contained in:
Jérôme Leclercq
2021-07-07 11:41:58 +02:00
parent 749b40cb31
commit f9af35b489
36 changed files with 945 additions and 600 deletions

View File

@@ -8,6 +8,7 @@
#define NAZARA_SHADER_CONSTANTVALUE_HPP
#include <Nazara/Prerequisites.hpp>
#include <Nazara/Core/TypeList.hpp>
#include <Nazara/Math/Vector2.hpp>
#include <Nazara/Math/Vector3.hpp>
#include <Nazara/Math/Vector4.hpp>
@@ -17,7 +18,7 @@
namespace Nz::ShaderAst
{
using ConstantValue = std::variant<
using ConstantTypes = TypeList<
bool,
float,
Int32,
@@ -30,6 +31,8 @@ namespace Nz::ShaderAst
Vector4i32
>;
using ConstantValue = TypeListInstantiate<ConstantTypes, std::variant>;
NAZARA_SHADER_API ExpressionType GetExpressionType(const ConstantValue& constant);
}