This simple demo uses the Basis Universal C++ transcoder (compiled to WebAssembly using Emscripten) to transcode a .ktx2 file to:
FORMAT
The viewer is implemented in WebGL and renders a single textured quad. It also supports encoding .PNG, .JPG, .EXR or .HDR files to LDR or HDR .KTX2 files.
Thanks to Evan Parker for providing webgl-texture-utils and this test bed. Go back.
Notes: Enable your browser debug console (F12 on Chrome/Firefox) to see debug output.
The largest image resolution that can be compressed in the browser with
this library is limited to either 12 megapixels or 4 megapixels (depending on format and WASM64/WASM32) to avoid running out of WASM memory.
Supported WebGL formats:
Test
Use Multithreading (if available)
Additional Worker Threads (Max 18):
.ktx2 file:
.png/.jpg/.exr/.hdr file:
Drag and drop a .KTX2 or image file here, or click to select a file.
KTX2 Texture Format to Encode: Primary compression quality/effort options:
Use unified quality/effort options (overrides below low-level options):
2
80 Transcoder Options (Decode Flags):
ETC1S: No BC7 Chroma Artifact Filtering (faster transcoding):
XUASTC/ASTC LDR: Disable deblocking filtering (faster):
XUASTC/ASTC LDR: Stronger deblocking filtering:
XUASTC/ASTC LDR: Use deblocking on all block sizes (slower):
XUASTC LDR 4x4/6x6/8x6: No direct BC7 transcoding (slower/higher quality):
Prefer higher quality transcoding when supported (slower):
Display/Visualization Options: