Fail-open everywhere
WebGL2 or software devices automatically receive standard Three.js textures — your scene never fails to render.
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 →
.ktx2 at equal PSNR (RDO 3–6)
.ktx2 with zero WASM overhead
WebGL2 or software devices automatically receive standard Three.js textures — your scene never fails to render.
GPU shaders hit ~43.8–44.8 dB BC7/ASTC; npx uft optimize enforces a ≥ 38–42 dB PSNR floor & never inflates files.
Paced compute yields between renders and resolves at queue.submit with zero GPU readbacks or WASM workers.
Keep existing WebP, PNG, AVIF & GLB files, or run npx uft init / uftVitePlugin() for automatic ORM & right-sizing.
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.
Preparing real-time Three.js WebGPURenderer and compressing 3× 1024² PBR weave maps on your GPU…
TextureLoader blows up VRAM; KTX2Loader bloats downloads. UltraTexture solves both.
.rcd 42.0 dB
89 ms
.ktx2) 44.1 dB
318 ms
.rcd 42.0 dB
0.95 s
.ktx2) 44.1 dB
3.68 s
.rcd 42.0 dB
13 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
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:
uftVitePlugin() & npx uft optimize (ORM pack, dedupe, never-inflate)≥ 38–42 dB) + automatic GPU mipmap generationSKILL.md + zero-dependency npx ultra-fast-texture mcp serverimport { 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()
WebP/AVIF via browser — or 0 ms CPU with .rcd.
Linear-light or normal-aware mipmap chain on GPU.
BC7/5/4/1, ASTC 4×4–8×8 or ETC2/EAC compute kernels.
Ready at queue.submit with zero readback.
Chosen from what the GPU can sample, never from the user agent.
PCs, Macs and high-end phones (4–8 bpp, −75–88% VRAM).
iPhone, Mali and Adreno — down to 2 bpp (−94% VRAM).
Compatibility-mode WebGPU devices (4–8 bpp, −75–88% VRAM).
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.
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.
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.
Each one opens in the Playground and compresses every material slot on your GPU.
.glb & .rcd.glb PBR material set.
Open in the Playground
Retro cartoon car
Paint decals and metallic-roughness.
Open in the Playground
Cat house
Hand-painted colour and normal maps.
Open in the Playground
Drop an image or a .glb into the Playground. Everything runs locally on your GPU.