Class: GpuMipmapGenerator

GpuMipmapGenerator

A class which generates mipmaps for a GPUTexture. Thanks to @toji for the original implementation https://github.com/toji/web-texture-tool/blob/main/src/webgpu-mipmap-generator.js

Methods

generateMipmap (texture) module:External.GPUTexture

Generates mipmaps for the given GPUTexture from the data in level 0.

Name Type Description
texture module:External.GPUTexture

Texture to generate mipmaps for.

Returns:
Type Description
module:External.GPUTexture
  • The originally passed texture