Browse Source

gl.UNSIGNED_BYTE type for Uint8ClampedArray (#21876)

0X-JonMichaelGalindo 4 years ago
parent
commit
c50649f1ce
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/renderers/webgl/WebGLAttributes.js

+ 4 - 0
src/renderers/webgl/WebGLAttributes.js

@@ -66,6 +66,10 @@ function WebGLAttributes( gl, capabilities ) {
 
 			type = gl.UNSIGNED_BYTE;
 
+		} else if ( array instanceof Uint8ClampedArray ) {
+			
+			type = gl.UNSIGNED_BYTE;
+			
 		}
 
 		return {