Skip to main content

Texture container

Keep compressed desktop texture assets upload-ready.

DDS packages compressed texture blocks, dimensions, and mipmaps in a container common to Direct3D-oriented pipelines. loaders.gl extracts the levels and canonical format metadata for the consuming GPU runtime.

loaders.gl support​

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.

Compressed texture path

Read the levels without expanding them prematurely.

DDS is useful when the runtime can consume the compressed blocks directly. The loader keeps the payload compressed and reports its layout so the application can choose upload or transcode behavior.

Header

Dimensions, format flags, mip count, and array/cube metadata.

Payload

BC, DXT, and other recognized compressed texture blocks.

Levels

Return mip data as a shared TextureLevel representation.

Runtime

Upload directly or choose an application-specific fallback.

Detailed guide

DDS format and API details

The reference below covers the container header, compressed formats, mip-level extraction, and GPU upload boundaries.

DDS, short for DirectDraw Surface, is a Microsoft texture container format widely used to store GPU texture data, especially in Direct3D-oriented pipelines.

Although the name comes from an older Microsoft graphics API, the format remains common in asset pipelines because it can store compressed texture payloads and mipmaps in a single file.

Why It Is Used​

DDS is often used for:

  • precomputed mip chains
  • BC / DXT-family compressed textures
  • older desktop-oriented real-time rendering pipelines

loaders.gl Support​

Format Featureloaders.gl SupportNotes
DDS container parsing✅ YesSupported by CompressedTextureLoader.
Mip level extraction✅ YesReturned as TextureLevel[].
Common compressed texture formats✅ Yesloaders.gl maps known DDS texture formats to canonical texture format identifiers.
Direct GPU upload workflows✅ YesOutput is designed for GPU upload by consuming frameworks and applications.