Explorar el Código

Correct mipmaps not generated anymore

Popov72 hace 5 años
padre
commit
b589ddf0f7
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  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);