Skip to content

Commit

Permalink
WebGPURenderer: Align integer attribute check of WebGL backend. (#28918)
Browse files Browse the repository at this point in the history
* WebGLAttributeUtils: Fix integer check.

* GLSLNodeBuilder: Fix `getTypeFromAttribute()` check.
  • Loading branch information
Mugen87 authored Jul 19, 2024
1 parent 9834113 commit b09742f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down
2 changes: 1 addition & 1 deletion src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
};

Expand Down

0 comments on commit b09742f

Please sign in to comment.