invoke

operator fun invoke(equirectangular: Texture, outCubemap: Texture? = null): Texture

Converts an equirectangular image to a cubemap.

Return

returns outCubemap

Parameters

equirectangular

Texture to convert to a cubemap: a SAMPLEABLE 2D texture with equirectangular geometry (width == 2 * height), allocated with all mip levels.

outCubemap

Output cubemap, with SAMPLEABLE and COLOR_ATTACHMENT usage bits. If null the texture is automatically created with default parameters (size of 256 with 9 levels).