Shader: Switch type<subtype> to type[subtype]

This commit is contained in:
Jérôme Leclercq
2022-01-26 19:24:46 +01:00
parent 29a01e975c
commit e6951d54a5
27 changed files with 506 additions and 510 deletions

View File

@@ -431,7 +431,7 @@ namespace Nz::ShaderAst
vectorComponentCount = std::get<VectorType>(GetExpressionType(*vectorExpr)).componentCount;
}
// cast expression (turn fromMatrix[i] to vec3<f32>(fromMatrix[i]))
// cast expression (turn fromMatrix[i] to vec3[f32](fromMatrix[i]))
ExpressionPtr castExpr;
if (vectorComponentCount != targetMatrixType.rowCount)
{
@@ -1967,7 +1967,7 @@ namespace Nz::ShaderAst
{
const ExpressionType& type = GetExpressionType(*node.parameters.front());
if (type != ExpressionType{ VectorType{ 3, PrimitiveType::Float32 } })
throw AstError{ "CrossProduct only works with vec3<f32> expressions" };
throw AstError{ "CrossProduct only works with vec3[f32] expressions" };
node.cachedExpressionType = type;
break;