Skip to main content

Portable texture payload

Ship one compressed asset. Transcode at the edge.

Basis Universal keeps distribution compact and postpones the final texture choice until the runtime knows which GPU formats the device supports. It can travel as a standalone Basis file or inside KTX2.

loaders.gl support​

TypeAPI
LoaderBasisLoader
WriterKTX2BasisWriter

Portable texture delivery

Package once. Choose the GPU target at runtime.

Containers preserve dimensions and mip levels; portable payloads delay the final format choice until the application knows what the current device supports.

Runtime choice

mipsdevicetranscode

metadata · levels · capabilities

Renderer receives

BC / S3TCdesktop GPU target
ETC2 / ASTCmobile GPU target
Fallback pixelswhen compression is unavailable

The application keeps one asset pipeline while the renderer receives the representation its WebGL or WebGPU device can use efficiently.

The delivery tradeoff

Separate distribution format from device format.

A Basis payload is optimized for transport. At load time, the transcoder selects a compressed or fallback representation that the current rendering device can use.

Input

Raw .basis files or Basis payloads in .ktx2

Runtime choice

Target selected from device texture capabilities

Preserves

Images, mip levels, dimensions, and texture metadata

Output

TextureLevel data ready for the rendering layer

Basis Universal is a supercompressed texture format designed to be transcoded efficiently into GPU-native compressed texture formats at load time.

Detailed guide

Basis format and transcoding details

The sections below document containers, runtime selection, returned levels, and loaders.gl compatibility.

Rather than shipping one texture asset per target GPU family, applications can distribute Basis-compressed data and transcode it on the client into a supported runtime format.

Why It Is Used​

Basis Universal is useful when an application needs:

  • smaller portable texture distribution assets
  • one source asset for multiple GPU format families
  • runtime selection of the best supported target texture format

Basis data may appear as:

  • raw .basis files
  • Basis payloads stored inside .ktx2 containers

loaders.gl Support​

Format Featureloaders.gl SupportNotes
Raw .basis input✅ YesSupported by BasisLoader.
Basis payloads in KTX2✅ YesSupported by BasisLoader.
Runtime transcoding✅ YesTranscodes into compressed or fallback uncompressed target formats.
Automatic format selection✅ Yesbasis.format: 'auto' and basis.supportedTextureFormats help select a target format.
Preservation of multiple images / mip levels✅ YesReturned as TextureLevel[][].