Contents

generateMipmaps(texture:)

Encodes a command that generates mipmaps for a texture instance from the base mipmap level up to the highest mipmap level.

Declaration

func generateMipmaps(texture: any MTLTexture)

Parameters

  • texture:

    A mipmapped, color-renderable or color-filterable Mtltexture instance the command generates mipmaps for.

Discussion

This method generates mipmaps for a mipmapped texture. The texture you provide needs to have a mipmapLevelCount greater than 1, and a color-renderable or color-filterable pixelFormat.