diff --git a/vendor/hlslparser/src/GLSLGenerator.cpp b/vendor/hlslparser/src/GLSLGenerator.cpp index f836f381a7..47a0838864 100644 --- a/vendor/hlslparser/src/GLSLGenerator.cpp +++ b/vendor/hlslparser/src/GLSLGenerator.cpp @@ -887,9 +887,11 @@ void GLSLGenerator::OutputExpression(HLSLExpression* expression, const HLSLType* } else { + // Array subscript operator in GLSL requires an explicit int parameter + const HLSLType& intType = HLSLType(HLSLBaseType_Int); OutputExpression(arrayAccess->array); m_writer.Write("["); - OutputExpression(arrayAccess->index); + OutputExpression(arrayAccess->index, &intType); m_writer.Write("]"); }