|
@@ -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 ) {
|