Contents

generateSkybox(using:fromEquirectangular:quality:into:)

Adds commands for generating a cube from an equirectangular image, including generating mipmaps.

Declaration

func generateSkybox(using commandBuffer: any MTLCommandBuffer, fromEquirectangular texture: any MTLTexture, quality: TextureSamplingQuality = .low, into destination: any MTLTexture) throws

Parameters

  • commandBuffer:

    The command buffer to dispatch GPU work to generate cubemap

  • texture:

    The source image equirectangular texture, also known as “latitude longitude” texture.

  • quality:

    The sampling quality the method applies as it generates the cube texture.

  • destination:

    The destination cube texture. Use Makedescriptor(fromequirectangular:) to get a recommended descriptor for creating the destination texture.

Discussion

See Also

Generating a skybox