diff --git a/src/data/program_configuration.js b/src/data/program_configuration.js index d1c7dd5a932..a6d37c0d20e 100644 --- a/src/data/program_configuration.js +++ b/src/data/program_configuration.js @@ -144,7 +144,7 @@ class CrossFadedConstantBinder implements UniformBinder { } getBinding(context: Context, location: WebGLUniformLocation, name: string): $Shape> { - return name.startsWith('u_pattern') ? + return name.substr(0, 9) === 'u_pattern' ? new Uniform4f(context, location) : new Uniform1f(context, location); } diff --git a/src/render/painter.js b/src/render/painter.js index 719530a0fe2..32fbe08548b 100644 --- a/src/render/painter.js +++ b/src/render/painter.js @@ -210,7 +210,7 @@ class Painter { this.emptyTexture = new Texture(context, { width: 1, height: 1, - data: new Uint8ClampedArray([0, 0, 0, 0]) + data: new Uint8Array([0, 0, 0, 0]) }, context.gl.RGBA); const gl = this.context.gl;