diff --git a/packages/dev/core/src/Engines/thinEngine.ts b/packages/dev/core/src/Engines/thinEngine.ts index cb63d89ea72..666e2a442db 100644 --- a/packages/dev/core/src/Engines/thinEngine.ts +++ b/packages/dev/core/src/Engines/thinEngine.ts @@ -4970,6 +4970,8 @@ export class ThinEngine { texture.width = potWidth; texture.height = potHeight; texture.isReady = true; + texture.type = Constants.TEXTURETYPE_UNSIGNED_BYTE; + texture.format = extension === ".jpg" && !texture._useSRGBBuffer ? Constants.TEXTUREFORMAT_RGB : Constants.TEXTUREFORMAT_RGBA; if ( processFunction(potWidth, potHeight, img, extension, texture, () => { diff --git a/packages/dev/core/src/Engines/webgpuEngine.ts b/packages/dev/core/src/Engines/webgpuEngine.ts index ab153c04568..bc2f9fcbf46 100644 --- a/packages/dev/core/src/Engines/webgpuEngine.ts +++ b/packages/dev/core/src/Engines/webgpuEngine.ts @@ -2052,7 +2052,8 @@ export class WebGPUEngine extends Engine { texture.baseHeight = imageBitmap.height; texture.width = imageBitmap.width; texture.height = imageBitmap.height; - texture.format = format ?? -1; + texture.format = format ?? Constants.TEXTUREFORMAT_RGBA; + texture.type = Constants.TEXTURETYPE_UNSIGNED_BYTE; processFunction(texture.width, texture.height, imageBitmap, extension, texture, () => {});