Shader: AccessMember can now access nested fields

This commit is contained in:
Jérôme Leclercq
2020-08-21 22:50:30 +02:00
parent 9df219e402
commit cd23c01ace
10 changed files with 80 additions and 33 deletions

View File

@@ -144,11 +144,12 @@ namespace Nz
ShaderExpressionType GetExpressionType() const override;
void Visit(ShaderAstVisitor& visitor) override;
std::size_t memberIndex;
ExpressionPtr structExpr;
ShaderExpressionType exprType;
std::vector<std::size_t> memberIndices;
static inline std::shared_ptr<AccessMember> Build(ExpressionPtr structExpr, std::size_t memberIndex, ShaderExpressionType exprType);
static inline std::shared_ptr<AccessMember> Build(ExpressionPtr structExpr, std::vector<std::size_t> memberIndices, ShaderExpressionType exprType);
};
//////////////////////////////////////////////////////////////////////////