Skip to content

Commit 562fa1a

Browse files
authored
Merge pull request #5553 from aferriss/matrix-uniforms-bug
Fixes bug introduced by #5483
2 parents 0fe597b + b2aac27 commit 562fa1a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/webgl/p5.Shader.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,17 @@ p5.Shader.prototype._loadUniforms = function() {
178178
samplerIndex++;
179179
this.samplers.push(uniform);
180180
}
181-
uniform.isArray = uniformInfo.size > 1;
181+
182+
uniform.isArray =
183+
uniformInfo.size > 1 ||
184+
uniform.type === gl.FLOAT_MAT3 ||
185+
uniform.type === gl.FLOAT_MAT4 ||
186+
uniform.type === gl.FLOAT_VEC2 ||
187+
uniform.type === gl.FLOAT_VEC3 ||
188+
uniform.type === gl.FLOAT_VEC4 ||
189+
uniform.type === gl.INT_VEC2 ||
190+
uniform.type === gl.INT_VEC4 ||
191+
uniform.type === gl.INT_VEC3;
182192

183193
this.uniforms[uniformName] = uniform;
184194
}

0 commit comments

Comments
 (0)