nutexb 0.7.0

Library for working with Smash Ultimate's nutexb texture files
Documentation

nutexb

Nutexb is an image texture format used in Super Smash Bros Ultimate and some other games. The extension ".nutexb" may stand for "Namco Universal Texture Binary".

Image data is stored in a contiguous region of memory with metadata stored in the layer_mipmaps and footer. The supported image formats in [NutexbFormat] use standard compressed and uncompressed formats used for DDS files. The arrays and mipmaps for the image data are stored in a memory layout optimized for the Tegra X1 in a process known as swizzling. This library provides tools for reading and writing nutexb files as well as working with the swizzled image data.

Reading

Read a [NutexbFile] with [NutexbFile::read] or [NutexbFile::read_from_file]. The image data needs to be deswizzled first with [NutexbFile::deswizzled_data] to use with applications that expect a standard row-major memory layout.

Writing

The easiest way to create a [NutexbFile] is by calling [NutexbFile::from_dds] and [NutexbFile::from_image] when using the "ddsfile" and "image" features, respectively. For manually specifying the surface dimensions and data, use [NutexbFile::from_surface].