WebGPU · three.js · Zero WASM · Zero Drawback

Pure GPU texture speed. One line. Zero drawback.

Keep ordinary .webp, .avif, .png or .glb assets — get compressed GPU textures with mipmaps in ~1 ms. 75–87% less VRAM, 0 WASM, automatic WebGL fallback, and 1-command optimization.

pnpm add ultra-fast-texture
npx uft init

MIT Pre-release Auto optimize & CLI → MCP & Agent Skill →

Published numbers

One 4×4 block of texels: the unit that BC7, ETC2 and ASTC 4×4 compress.

RGBA8 BC7
Format
BC7picked on GPUs with BC
GPU time
0.42ms1024², 11 mip levels
VRAM
−75%1.40 MB vs 5.59 MB
Published: median of 30 runsApple M3 Max, Chrome 157, 2026-11-15

Why UltraTexture

  • 2.5–3.6× smaller downloads than .ktx2 at equal PSNR (RDO 3–⁠6)
  • −75–94% less GPU memory across every PBR slot
  • 1.8–3.9× faster to the GPU than .ktx2 with zero WASM overhead
  • 0drawback auto WebGL fallback · closed-loop quality · 1-command CLI

Fail-open everywhere

WebGL2 or software devices automatically receive standard Three.js textures — your scene never fails to render.

Closed-loop quality

GPU shaders hit ~43.8–44.8 dB BC7/ASTC; npx uft optimize enforces a ≥ 38–42 dB PSNR floor & never inflates files.

Zero frame jank

Paced compute yields between renders and resolves at queue.submit with zero GPU readbacks or WASM workers.

Zero workflow lock-in

Keep existing WebP, PNG, AVIF & GLB files, or run npx uft init / uftVitePlugin() for automatic ORM & right-sizing.

Live Three.js WebGPU Atelier

Sculpted cloth physics. Crisp weave normals at a quarter of the VRAM.

Real-time Verlet cloth draped over studio forms using 3× 1024² PBR maps (albedo, ORM roughness/metalness, micro-weave normal) compressed live on your GPU with UltraFastTextureLoader.

Live WebGPU Cloth Simulation

Preparing real-time Three.js WebGPURenderer and compressing 3× 1024² PBR weave maps on your GPU…

Format
BC7 / ASTC 4×4picked live for your GPU
GPU encode (3× 1024²)
~3.4 msfull mip chains included
Texture VRAM saved
−75%4.0 MB vs 16.0 MB RGBA8
Cloth simulation
60–120 fps2,401 vertices · 0 readback
Why UltraTexture

Small files and low VRAM.

TextureLoader blows up VRAM; KTX2Loader bloats downloads. UltraTexture solves both.

Download vs GPU Memory .rcd and Images at equal PSNR
Download size of a 4-map PBR material versus GPU memory of a 4K texture with mips. UltraTexture .rcd (867 KiB) and UltraTexture Images (AVIF-Fast, 726 KiB) are at equal PSNR, 42.0 dB mean before BC7. KTX2Loader downloads 3.59 MB of UASTC .ktx2 at 44.1 dB; spark.js and TextureLoader load the 1,128 KiB source WebPs. SWEET SPOT 45 MB 24 MB 11 MB 0 0 1 MB 2 MB 3 MB 4 MB GPU VRAM (4K + mips) Download size (4 PBR maps) → TextureLoader · 44.7 MB KTX2Loader · 3.59 MB 44.1 dB spark.js · 1,128 KiB UltraTexture · .rcd · 867 KiB · 42.0 dB UltraTexture · Images · 726 KiB · 42.0 dB
4-Map PBR Material → GPU Ready
  • UltraTexture · Images 42.0 dB 88 ms
  • UltraTexture · .rcd 42.0 dB 89 ms
  • @ludicon/spark.js + WebP source 111 ms
  • TextureLoader (WebP → RGBA8) source 163 ms
  • KTX2Loader (Basis .ktx2) 44.1 dB 318 ms
  • UltraTexture · Images 42.0 dB 0.81 s
  • UltraTexture · .rcd 42.0 dB 0.95 s
  • @ludicon/spark.js + WebP source 1.22 s
  • TextureLoader (WebP → RGBA8) source 1.27 s
  • KTX2Loader (Basis .ktx2) 44.1 dB 3.68 s
  • UltraTexture · .rcd 42.0 dB 13 ms
  • UltraTexture · Images 42.0 dB 18 ms
  • KTX2Loader (4 WASM workers) 44.1 dB 23 ms
  • @ludicon/spark.js + WebP source 26 ms
  • TextureLoader (WebP → RGBA8) source 58 ms

4-map PBR + mipmaps · .rcd 867 KiB and Images 726 KiB at equal PSNR, 42.0 dB mean before BC7; .ktx2 3,508 KiB at 44.1 dB; spark.js and TextureLoader load the 1,128 KiB source WebPs the PSNR is measured against · median of 21 warm loads · Apple M3 Max · Chrome 157

Drop-in & Automatic

Drop in one line. Automate the rest.

Use UltraFastTextureLoader at runtime, let npx uft + uftVitePlugin() auto-pack & right-size assets with a closed-loop PSNR floor, or wire our MCP server straight to your AI agents:

  • Zero-config uftVitePlugin() & npx uft optimize (ORM pack, dedupe, never-inflate)
  • Closed-loop PSNR floor (≥ 38–42 dB) + automatic GPU mipmap generation
  • Native AI agent SKILL.md + zero-dependency npx ultra-fast-texture mcp server
Read the auto-optimization, Vite & MCP guide
import { WebGPURenderer } from 'three/webgpu'
import { UltraFastTextureLoader } from 'ultra-fast-texture/three'

const renderer = new WebGPURenderer()
await renderer.init()
const loader = new UltraFastTextureLoader(renderer)

// .webp, .avif, .png or .rcd → BC7, ASTC or ETC2 + mipmaps (auto WebGL fallback)
material.map = await loader.loadAsync('albedo.avif')

// normal map → BC5 or EAC RG11
material.normalMap = await loader.loadAsync('normal.webp', {
  semantic: 'normal',
})
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js'
import { UltraFastTextureLoader } from 'ultra-fast-texture/three'
import { registerUltraFastTexture } from 'ultra-fast-texture/gltf'

const gltfLoader = registerUltraFastTexture(
  new GLTFLoader(),
  new UltraFastTextureLoader(renderer),
)

// .glb or .rcd.glb: every PBR slot gets BC7 / BC5 / BC4 / ASTC
const gltf = await gltfLoader.loadAsync('scene.glb')
# 1-command automatic project setup, audit & safe in-place optimization
npx uft init                     # wires Vite plugin, scripts & agent skill
npx uft audit                    # finds oversized, solid or unpacked ORM assets
npx uft optimize --in-place      # PSNR-guarded AVIF/WebP/GLB pack + never-inflate

// Zero-config vite.config.js: auto-optimizes .glb/.gltf, assets & public/
import { uftVitePlugin } from 'ultra-fast-texture/vite'
export default { plugins: [uftVitePlugin()] }
# Give Claude Code, Cursor or Codex full optimization expertise
npx skills add Makio64/ultra-fast-texture

// .mcp.json — zero-dependency stdio MCP server (4 tools built in)
{
  "mcpServers": {
    "ultra-fast-texture": {
      "command": "npx",
      "args": ["-y", "ultra-fast-texture", "mcp"]
    }
  }
}
import { createDevice, createTextureEncoder } from 'ultra-fast-texture'

const device = await createDevice() // or your own GPUDevice
const encoder = await createTextureEncoder(device)

const out = await encoder.encode('albedo.rcd', { semantic: 'color' })
out.texture // GPUTexture, mipmaps included
out.format  // 'bc7', 'astc-4x4', 'etc2-rgb', … or 'rgba8'
out.release()
How it works

From file to GPU texture in four steps.

  1. Decode

    WebP/AVIF via browser — or 0 ms CPU with .rcd.

  2. Mipmaps

    Linear-light or normal-aware mipmap chain on GPU.

  3. Encode

    BC7/5/4/1, ASTC 4×4–8×8 or ETC2/EAC compute kernels.

  4. Sample

    Ready at queue.submit with zero readback.

Every GPU

The right format on every device.

Chosen from what the GPU can sample, never from the user agent.

  • Desktop-class GPUs

    BC7 · BC5 · BC4 · BC1

    PCs, Macs and high-end phones (4–8 bpp, −75–88% VRAM).

  • Mobile GPUs

    ASTC 4×4–8×8 · EAC

    iPhone, Mali and Adreno — down to 2 bpp (−94% VRAM).

  • Older Android GPUs

    ETC2 · EAC

    Compatibility-mode WebGPU devices (4–8 bpp, −75–88% VRAM).

All 11 formats and options
Beyond BC7 · HDR & TSL Prototypes

Past the 8-bpp hardware ceiling.

Two WebGPU encoders in bench/beyond-bc7/: hardware BC6H for HDR environment maps with zero adoption friction, and GPU-packed variable-bitrate JMBC1 materials decoded in one Three.js TSL node with zero pipeline changes.

Hardware BC6H_UF16 · 8.00 bpp

8.0× smaller HDR lightmaps & IBL

Adaptive Modes 11–14 encoded directly in log2 space in WebGPU WGSL: 70.09 dB mPSNR (+8.07 dB vs Mode 11), 0-ULP hardware textureLoad parity, and ExternalTexture + PMREMNode integration.

Joint PBR TSL (JMBC1) · 2.6–5.9 bpp

4.3×–6.0× less PBR VRAM than BC7+BC5

Compresses standard .glb, .avif, or .webp PBR tuples into 4 adaptive 8×8 macro-tile tiers on GPU load: viking_ship shrinks from 6.03 MB BC7 to 1.27 MB (4.76×) at 43.52 dB render PSNR.

Try it on your own textures.

Drop an image or a .glb into the Playground. Everything runs locally on your GPU.

MIT licence · three.js 0.186 · pre-release