v139 · graphics
WebGPU: 3D texture support for BC and ASTC compressed formats
Functionality added to the WebGPU spec after its first shipment in a browser. The “texture-compression-bc-sliced-3d” and “texture-compression-astc-sliced-3d” WebGPU features add respectively 3D texture support for BC and ASTC compressed formats.
concepts
-
Format Probe
BC and ASTC compressed formats now usable for 3D textures, not just 2D. Volumetric assets (medical, scientific viz) can ship in compressed form.
-
Volume Budget Calculator
The motivating numbers: a 512³ uncompressed RGBA volume is half a gigabyte. Pick a format and edge length and watch memory drop by 4× to 16×. Includes a live WebGPU feature probe.
-
Format Selector + Texture Spec
Pick W × H × D + a compressed format from the BC and ASTC families. The whole format matrix updates with byte cost; the snippet outputs a ready
device.createTexture()call with block-alignedwriteTexture()bytes-per-row. -
Texture Compression Benchmark
Probes which compression formats are available via
device.features.has(), then times the creation and upload of a 256×256×16 3D texture in each. Results show creation and upload time in ms, memory usage, and compression ratio vs uncompressed RGBA8. Falls back to a static comparison table when WebGPU is absent.
why it shipped
The "texture-compression-bc-sliced-3d" and "texture-compression-astc-sliced-3d" WebGPU features add respectively support for 3D textures using Block Compression (BC) and Adaptive Scalable Texture Compression (ASTC) formats. This lets developers leverage the efficient compression capabilities of BC and ASTC formats for volumetric texture data, offering significant reductions in memory footprint and bandwidth requirements without substantial loss in visual quality.