Spark scales from high-end PCs and consoles down to low-end phones. It's specifically optimized for low- and mid-range mobile devices. It runs on most iOS devices with Metal 1.2 support and most Android devices with support for OpenGL ES or Vulkan.
It also runs in most web browsers via WebGL and WebGPU. For web-only projects, we offer spark.js, a simple API that makes it easy to use the Spark codecs on the web.
| Platform / Vendor | Support Version |
|---|---|
| iOS / Apple | iPhone 6 and above using Metal 1.2 or OpenGL ES |
| Android / Arm | Bifrost and above |
| Android / Qualcomm | Adreno 500 and above with driver version ≥ 512.490 |
| Android / ImgTec | All PowerVR devices starting with Series 6, including Series D |
| Android / Samsung | All Xclipse devices |
| MacOS | All Metal 1.2 devices from Apple, Intel, AMD, and NVIDIA |
| Windows | All D3D11, D3D12, OpenGL, and Vulkan |
| PlayStation® | Optimized for PlayStation®5 |
| Linux | Valve's SteamDeck only |
| Web | Most browsers and devices using WebGL and WebGPU. See spark.js |
Spark is designed to take advantage of the GPU's capabilities to optimize its performance. It runs on most graphics APIs including Metal, Vulkan, OpenGL and Direct3D.
While block compression is intrinsically parallel, targeting it requires carefully crafted algorithms that minimize divergence and fit within the constrained resource limits. Spark is the result of the refinement of these techniques over years of compression experience.
Spark aims to maximize the quality that can be attained while saturating memory bandwidth. To achieve this we optimize the use of the arithmetic units by meticulously implementing numerically sensitive algorithms and table lookups in half floating point, ensuring correctness and consistency across GPUs.
Spark's output is often competitive with the native hardware compressors built into GPUs — see this comparison. Unlike those encoders, Spark produces consistent results across devices and targets higher compression ratios that hardware encoders typically don't support.
The following charts show the expected performance on some of our devices:
On bandwidth-limited devices, Spark's throughput is often higher than an uncompressed texture upload. A plain blit must read the full input and write the same amount of data back out, whereas Spark only writes one quarter of the input. The memory bandwidth saved on writes is often enough to offset the computational cost of encoding, resulting in higher net throughput.
Spark has been optimized using a comprehensive collection of freely accessible PBR textures, complemented by assets generously shared by our clients.
Our codecs target the formats best suited for this content: ASTC 4x4 for color and albedo maps, both with and without alpha, and EAC for normal maps, roughness, metalness, occlusion, and height. Additionally, we support ETC2 for lower quality color maps, and ASTC 5x5 and 6x6 for a finer-grained tradeoff between quality and compression ratio.
On MacOS, Desktop PCs, modern iOS devices, and some Androids (Adreno 7/8xx, Meta Quest), Spark supports BC1, BC3, BC4, BC5, BC6H, and BC7 formats. There are several real-time GPU encoders that also target some of these formats, but Spark provides higher quality and performance than the alternatives:
Error and throughput of Spark BC1 and BC7 codecs against competing BC1 encoders on the Adreno 740
Spark also targets the native HDR formats: BC6H on desktop and consoles, and ASTC HDR on mobile. Both are sampled directly by the GPU and decode to 16-bit floats, so they can be deployed without any shader changes. For devices that support neither format we provide RGBM as a fallback, which packs an HDR range into an LDR format, but requires a color transform in the shader at sampling time.
Both codecs are optimized for perceptual quality rather than error in the format's internal space. At their highest quality levels they match or exceed the best offline encoders while running orders of magnitude faster:
For the full set of measurements and image comparisons, see the Spark 1.4 release post.