decode
abstract fun decode(compressed: ByteArray, count: Int, byteStride: Int, mode: MeshoptDecoder.Mode, filter: MeshoptDecoder.Filter? = null): ByteArray
Decode an EXT_meshopt_compression bufferView.
Return
the decoded bufferView, count * byteStride bytes.
Parameters
compressed
bytes of the compressed bufferView the extension declared.
count
number of elements (vertices / indices).
byte Stride
bytes per element in the decoded output.
mode
element type — drives which decoder path runs.
filter
optional post-decode transform applied per element (octahedral normal unpack, quaternion unpack, exponential float decompression). null means no filter.
Throws
for malformed compressed input. The layer translates this into a per-bufferView failure; affected primitives' attributes degrade gracefully (positions absent → primitive skipped; secondary attribute absent → falls back to baseColor / flat shading).