Selaa lähdekoodia

Correct mipmaps not generated anymore

Popov72 4 vuotta sitten
vanhempi
commit
b589ddf0f7
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      src/Engines/webgpuEngine.ts

+ 3 - 0
src/Engines/webgpuEngine.ts

@@ -1272,6 +1272,9 @@ export class WebGPUEngine extends Engine {
 
 
                         if (this._textureHelper.isImageBitmap(imageBitmap)) {
                         if (this._textureHelper.isImageBitmap(imageBitmap)) {
                             this._textureHelper.updateTexture(imageBitmap, gpuTextureWrapper.underlyingResource!, imageBitmap.width, imageBitmap.height, gpuTextureWrapper.format, 0, 0, invertY, false, 0, 0, this._uploadEncoder);
                             this._textureHelper.updateTexture(imageBitmap, gpuTextureWrapper.underlyingResource!, imageBitmap.width, imageBitmap.height, gpuTextureWrapper.format, 0, 0, invertY, false, 0, 0, this._uploadEncoder);
+                            if (!noMipmap && !isCompressed) {
+                                this._generateMipmaps(texture, texture._hardwareTexture!.underlyingResource);
+                            }
                         }
                         }
                     } else if (!noMipmap && !isCompressed) {
                     } else if (!noMipmap && !isCompressed) {
                         this._generateMipmaps(texture, texture._hardwareTexture!.underlyingResource);
                         this._generateMipmaps(texture, texture._hardwareTexture!.underlyingResource);