Browse Source

WebGPURenderer: Align integer attribute check of WebGL backend. (#28918)

* WebGLAttributeUtils: Fix integer check.

* GLSLNodeBuilder: Fix `getTypeFromAttribute()` check.
Michael Herzog 1 year ago
parent
commit
b09742f5fe

+ 1 - 1
src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js

@@ -476,7 +476,7 @@ ${ flowData.code }
 
 			const array = dataAttribute.array;
 
-			if ( ( array instanceof Uint32Array || array instanceof Int32Array || array instanceof Uint16Array || array instanceof Int16Array ) === false ) {
+			if ( ( array instanceof Uint32Array || array instanceof Int32Array || array instanceof Int16Array ) === false ) {
 
 				nodeType = nodeType.slice( 1 );
 

+ 1 - 1
src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js

@@ -135,7 +135,7 @@ class WebGLAttributeUtils {
 			bytesPerElement: array.BYTES_PER_ELEMENT,
 			version: attribute.version,
 			pbo: attribute.pbo,
-			isInteger: type === gl.INT || type === gl.UNSIGNED_INT || type === gl.UNSIGNED_SHORT || attribute.gpuType === IntType,
+			isInteger: type === gl.INT || type === gl.UNSIGNED_INT || attribute.gpuType === IntType,
 			id: _id ++
 		};