question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support compressing KTX2 textures without CLI

See original GitHub issue

Is your feature request related to a problem? Please describe. I’m in the process of updating from 2.1.7 to 2.4.2 (due to the toktx command changes), but running into what looks like “incorrect but somehow working” use of the library.

In 2.1.7, we were using something like

import { NodeIO, PropertyType } from '@gltf-transform/core';
import { draco, toktx } from "@gltf-transform/cli";
...
await document.transform(
		// see https://github.com/donmccurdy/glTF-Transform/blob/main/packages/cli/src/transforms/toktx.ts
		toktx({ mode: Mode.ETC1S }),
		draco(),
);

It looks like in 2.4.2 draco has moved into /functions, but otherwise this still works.

How can we use the simplicity of the toktx command but not depend on the CLI? Might be missing something obvious here!

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hybridherbstcommented, Nov 4, 2022

Yep, we were. We also ended up doing what you recommended and moving the toktx scripts out of the CLI package into our own, to get rid of the CLI dependency.

0reactions
donmccurdycommented, Nov 1, 2022

@hybridherbst were you able to get the v2.4.2 update working?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support decompressing KTX2 textures · Issue #591 - GitHub
Describe the bug KTX2 textures are not converted when demanded using the CLI. To Reproduce Steps to reproduce the behavior: gltf-transform ...
Read more >
KTX2 Compressed Textures - Babylon.js Documentation
Learn advanced texture compression with KTX2 support in Babylon.js.
Read more >
How to create ktx2 correctly - Questions - three.js forum
The reason is that the Basis Universal GPU Texture Compression tool which is responsible for interpreting KTX2 file to GPU supports, ...
Read more >
basis_universal - Google Git
KTX2 files have built-in lossless compression support using Zstandard, which is used by default on UASTC textures. Basis Universal is not an image...
Read more >
Khronos Texture Tools: ktxsc
ktxsc can encode and supercompress the images in Khronos texture format version 2 files (KTX2). Uncompressed files, i.e those whose vkFormat name does...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found