diff --git a/examples/jsm/renderers/webgpu/utils/WebGPUTextureUtils.js b/examples/jsm/renderers/webgpu/utils/WebGPUTextureUtils.js index acbf064d389f0d..6b6e1eb87895a2 100644 --- a/examples/jsm/renderers/webgpu/utils/WebGPUTextureUtils.js +++ b/examples/jsm/renderers/webgpu/utils/WebGPUTextureUtils.js @@ -144,6 +144,14 @@ class WebGPUTextureUtils { } else { + if ( format === undefined ) { + + console.warn( 'WebGPURenderer: Texture format not supported.' ); + + return this.createDefaultTexture( texture ); + + } + textureData.texture = backend.device.createTexture( textureDescriptorGPU ); } @@ -201,6 +209,9 @@ class WebGPUTextureUtils { const { needsMipmaps, textureDescriptorGPU } = textureData; + if ( textureDescriptorGPU === undefined ) // unsupported texture format + return; + // transfer texture data if ( texture.isDataTexture || texture.isDataArrayTexture || texture.isData3DTexture ) {