Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@@ -640,10 +640,14 @@ class WebGLTextureUtils {
if ( gl.texElementImage2D.length === 3 ) {
+ // Chrome 150+
+
gl.texElementImage2D( gl.TEXTURE_2D, gl.RGBA8, options.image );
} else {
+ // Chrome 138 - 149
gl.texElementImage2D( gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, options.image );
}
@@ -1297,10 +1297,14 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
if ( _gl.texElementImage2D.length === 3 ) {
_gl.texElementImage2D( _gl.TEXTURE_2D, _gl.RGBA8, image );
const level = 0;
const internalFormat = _gl.RGBA;
const srcFormat = _gl.RGBA;
@@ -650,6 +650,8 @@ class WebGPUTextureUtils {
if ( device.queue.copyElementImageToTexture.length === 2 ) {
device.queue.copyElementImageToTexture(
{ source: image },
{
@@ -661,6 +663,8 @@ class WebGPUTextureUtils {
image, width, height,
{ texture: textureData.texture }