Model loading · function
ddsToRgba
Decode a DDS surface's level 0 into RGBA.
Explained in Importing models.
function ddsToRgba(bytes: Uint8Array): DdsImageimport { ddsToRgba } from '@driftengine/assets';Parameters
| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array |
In depth
A surface whose dimensions are not multiples of four is decoded block by block and cropped, which is what the format itself does: the blocks cover a padded rectangle and the texels outside the declared size are padding rather than image.