Fix typo in enum
This commit is contained in:
parent
4d63d6e022
commit
a9f2e05b57
|
|
@ -55,7 +55,7 @@ namespace Nz::ShaderBuilder
|
||||||
constexpr GenBuilder<ShaderNodes::Constant> Constant;
|
constexpr GenBuilder<ShaderNodes::Constant> Constant;
|
||||||
constexpr GenBuilder<ShaderNodes::DeclareVariable> DeclareVariable;
|
constexpr GenBuilder<ShaderNodes::DeclareVariable> DeclareVariable;
|
||||||
constexpr GenBuilder<ShaderNodes::Discard> Discard;
|
constexpr GenBuilder<ShaderNodes::Discard> Discard;
|
||||||
constexpr BinOpBuilder<ShaderNodes::BinaryType::Divide> Divide;
|
constexpr BinOpBuilder<ShaderNodes::BinaryType::Divide> Division;
|
||||||
constexpr BinOpBuilder<ShaderNodes::BinaryType::CompEq> Equal;
|
constexpr BinOpBuilder<ShaderNodes::BinaryType::CompEq> Equal;
|
||||||
constexpr BinOpBuilder<ShaderNodes::BinaryType::CompGt> GreaterThan;
|
constexpr BinOpBuilder<ShaderNodes::BinaryType::CompGt> GreaterThan;
|
||||||
constexpr BinOpBuilder<ShaderNodes::BinaryType::CompGe> GreaterThanOrEqual;
|
constexpr BinOpBuilder<ShaderNodes::BinaryType::CompGe> GreaterThanOrEqual;
|
||||||
|
|
@ -71,8 +71,9 @@ namespace Nz::ShaderBuilder
|
||||||
constexpr GenBuilder<ShaderNodes::OutputVariable> Output;
|
constexpr GenBuilder<ShaderNodes::OutputVariable> Output;
|
||||||
constexpr GenBuilder<ShaderNodes::ParameterVariable> Parameter;
|
constexpr GenBuilder<ShaderNodes::ParameterVariable> Parameter;
|
||||||
constexpr GenBuilder<ShaderNodes::Sample2D> Sample2D;
|
constexpr GenBuilder<ShaderNodes::Sample2D> Sample2D;
|
||||||
|
constexpr GenBuilder<ShaderNodes::StatementBlock> StatementBlock;
|
||||||
constexpr GenBuilder<ShaderNodes::SwizzleOp> Swizzle;
|
constexpr GenBuilder<ShaderNodes::SwizzleOp> Swizzle;
|
||||||
constexpr BinOpBuilder<ShaderNodes::BinaryType::Substract> Substract;
|
constexpr BinOpBuilder<ShaderNodes::BinaryType::Subtract> Subtract;
|
||||||
constexpr GenBuilder<ShaderNodes::UniformVariable> Uniform;
|
constexpr GenBuilder<ShaderNodes::UniformVariable> Uniform;
|
||||||
|
|
||||||
template<ShaderNodes::BasicType Type, typename... Args> std::shared_ptr<ShaderNodes::Cast> Cast(Args&&... args);
|
template<ShaderNodes::BasicType Type, typename... Args> std::shared_ptr<ShaderNodes::Cast> Cast(Args&&... args);
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ namespace Nz::ShaderNodes
|
||||||
enum class BinaryType
|
enum class BinaryType
|
||||||
{
|
{
|
||||||
Add, //< +
|
Add, //< +
|
||||||
Substract, //< -
|
Subtract, //< -
|
||||||
Multiply, //< *
|
Multiply, //< *
|
||||||
Divide, //< /
|
Divide, //< /
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -420,7 +420,7 @@ namespace Nz
|
||||||
switch (node.op)
|
switch (node.op)
|
||||||
{
|
{
|
||||||
case ShaderNodes::BinaryType::Add: Append(" + "); break;
|
case ShaderNodes::BinaryType::Add: Append(" + "); break;
|
||||||
case ShaderNodes::BinaryType::Substract: Append(" - "); break;
|
case ShaderNodes::BinaryType::Subtract: Append(" - "); break;
|
||||||
case ShaderNodes::BinaryType::Multiply: Append(" * "); break;
|
case ShaderNodes::BinaryType::Multiply: Append(" * "); break;
|
||||||
case ShaderNodes::BinaryType::Divide: Append(" / "); break;
|
case ShaderNodes::BinaryType::Divide: Append(" / "); break;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@ namespace Nz
|
||||||
case ShaderNodes::BinaryType::Add:
|
case ShaderNodes::BinaryType::Add:
|
||||||
case ShaderNodes::BinaryType::CompEq:
|
case ShaderNodes::BinaryType::CompEq:
|
||||||
case ShaderNodes::BinaryType::CompNe:
|
case ShaderNodes::BinaryType::CompNe:
|
||||||
case ShaderNodes::BinaryType::Substract:
|
case ShaderNodes::BinaryType::Subtract:
|
||||||
TypeMustMatch(node.left, node.right);
|
TypeMustMatch(node.left, node.right);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ namespace Nz::ShaderNodes
|
||||||
switch (op)
|
switch (op)
|
||||||
{
|
{
|
||||||
case BinaryType::Add:
|
case BinaryType::Add:
|
||||||
case BinaryType::Substract:
|
case BinaryType::Subtract:
|
||||||
exprType = left->GetExpressionType();
|
exprType = left->GetExpressionType();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ namespace Nz
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case ShaderNodes::BinaryType::Substract:
|
case ShaderNodes::BinaryType::Subtract:
|
||||||
{
|
{
|
||||||
switch (leftType)
|
switch (leftType)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -65,10 +65,10 @@ class BinMul : public BinOp<DataType, Nz::ShaderNodes::BinaryType::Multiply>
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename DataType>
|
template<typename DataType>
|
||||||
class BinSub : public BinOp<DataType, Nz::ShaderNodes::BinaryType::Substract>
|
class BinSub : public BinOp<DataType, Nz::ShaderNodes::BinaryType::Subtract>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using BinOp<DataType, Nz::ShaderNodes::BinaryType::Substract>::BinOp;
|
using BinOp<DataType, Nz::ShaderNodes::BinaryType::Subtract>::BinOp;
|
||||||
|
|
||||||
void ApplyOp(const Nz::Vector4f* left, const Nz::Vector4f* right, Nz::Vector4f* output, std::size_t pixelCount) override;
|
void ApplyOp(const Nz::Vector4f* left, const Nz::Vector4f* right, Nz::Vector4f* output, std::size_t pixelCount) override;
|
||||||
QString GetOperationString() const final;
|
QString GetOperationString() const final;
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,10 @@ class Mat4Mul : public Mat4BinOp<Nz::ShaderNodes::BinaryType::Multiply>
|
||||||
QString name() const override;
|
QString name() const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Mat4Sub : public Mat4BinOp<Nz::ShaderNodes::BinaryType::Substract>
|
class Mat4Sub : public Mat4BinOp<Nz::ShaderNodes::BinaryType::Subtract>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using Mat4BinOp<Nz::ShaderNodes::BinaryType::Substract>::Mat4BinOp;
|
using Mat4BinOp<Nz::ShaderNodes::BinaryType::Subtract>::Mat4BinOp;
|
||||||
|
|
||||||
QString caption() const override;
|
QString caption() const override;
|
||||||
QString name() const override;
|
QString name() const override;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue