|
@@ -36,16 +36,19 @@ class WebGLAttributeUtils {
|
|
//attribute.onUploadCallback();
|
|
//attribute.onUploadCallback();
|
|
|
|
|
|
let type;
|
|
let type;
|
|
|
|
+ let isFloat = false;
|
|
|
|
|
|
if ( array instanceof Float32Array ) {
|
|
if ( array instanceof Float32Array ) {
|
|
|
|
|
|
type = gl.FLOAT;
|
|
type = gl.FLOAT;
|
|
|
|
+ isFloat = true;
|
|
|
|
|
|
} else if ( array instanceof Uint16Array ) {
|
|
} else if ( array instanceof Uint16Array ) {
|
|
|
|
|
|
if ( attribute.isFloat16BufferAttribute ) {
|
|
if ( attribute.isFloat16BufferAttribute ) {
|
|
|
|
|
|
type = gl.HALF_FLOAT;
|
|
type = gl.HALF_FLOAT;
|
|
|
|
+ isFloat = true;
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
|
|
|
@@ -86,7 +89,9 @@ class WebGLAttributeUtils {
|
|
backend.set( attribute, {
|
|
backend.set( attribute, {
|
|
bufferGPU,
|
|
bufferGPU,
|
|
type,
|
|
type,
|
|
- bytesPerElement: array.BYTES_PER_ELEMENT
|
|
|
|
|
|
+ bytesPerElement: array.BYTES_PER_ELEMENT,
|
|
|
|
+ version: attribute.version,
|
|
|
|
+ isFloat
|
|
} );
|
|
} );
|
|
|
|
|
|
}
|
|
}
|