We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0fe597b + b2aac27 commit 562fa1aCopy full SHA for 562fa1a
src/webgl/p5.Shader.js
@@ -178,7 +178,17 @@ p5.Shader.prototype._loadUniforms = function() {
178
samplerIndex++;
179
this.samplers.push(uniform);
180
}
181
- uniform.isArray = uniformInfo.size > 1;
+
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;
192
193
this.uniforms[uniformName] = uniform;
194
0 commit comments