loaders.gl support
| Type | API |
|---|---|
| Loader | CompressedTextureLoader |
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.
Distributed asset
Runtime choice
metadata · levels · capabilities
Renderer receives
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.
@loaders.gl/images- loaders.gl implementationCompressedTextureLoader- reads DDS containers
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 Feature | loaders.gl Support | Notes |
|---|---|---|
| DDS container parsing | ✅ Yes | Supported by CompressedTextureLoader. |
| Mip level extraction | ✅ Yes | Returned as TextureLevel[]. |
| Common compressed texture formats | ✅ Yes | loaders.gl maps known DDS texture formats to canonical texture format identifiers. |
| Direct GPU upload workflows | ✅ Yes | Output is designed for GPU upload by consuming frameworks and applications. |