Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KTX2Loader #18490

Merged
merged 2 commits into from
Jul 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ var files = {
"webgl_loader_texture_exr",
"webgl_loader_texture_hdr",
"webgl_loader_texture_ktx",
"webgl_loader_texture_ktx2",
"webgl_loader_texture_pvrtc",
"webgl_loader_texture_rgbm",
"webgl_loader_texture_tga",
Expand Down
27 changes: 23 additions & 4 deletions examples/js/libs/basis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,19 @@ a wide variety of GPU texture compression formats.

[GitHub](https://github.com/BinomialLLC/basis_universal)

## Contents
## Transcoders

This folder contains two files:
Basis Universal texture data may be used in two different file formats:
`.basis` and `.ktx2`. Texture data is identical in both cases, but different
transcoders are required to read the two file types. Both transcoders are
available in this folder now, but they may be merged in the future.

For further documentation about the Basis compressor and transcoder, refer to
the [Basis GitHub repository](https://github.com/BinomialLLC/basis_universal).

### .basis

The folder contains two files required for transcoding `.basis` textures:

* `basis_transcoder.js` — JavaScript wrapper for the WebAssembly transcoder.
* `basis_transcoder.wasm` — WebAssembly transcoder.
Expand All @@ -35,8 +45,17 @@ basisLoader.load( 'diffuse.basis', function ( texture ) {
} );
```

For further documentation about the Basis compressor and transcoder, refer to
the [Basis GitHub repository](https://github.com/BinomialLLC/basis_universal).
### .ktx2

The folder contains two files required for transcoding `.ktx2` textures:

* `msc_basis_transcoder.js` — JavaScript wrapper for the WebAssembly transcoder.
* `msc_basis_transcoder.wasm` — WebAssembly transcoder.

Currently, the `msc_basis_transcoder.js` file must be added to the page as a
global script. The WASM transcoder will be downloaded from the same directory
automatically. These will likely be replaced with ES modules, and merged with
the `.basis` transcoder, in the future. See `KTX2Loader` for usage.

## License

Expand Down
21 changes: 21 additions & 0 deletions examples/js/libs/basis/msc_basis_transcoder.js

Large diffs are not rendered by default.

Binary file added examples/js/libs/basis/msc_basis_transcoder.wasm
Binary file not shown.
Loading