Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

246
Visualizações
ThreeJS KTX2Loader "Attempt to load unsupported compressed texture format in .uploadTexture()"

I'm debugging some unfamiliar code, and am getting the following 3 when it's loading KTX2 textures:

THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()

WebGL warning: compressedTexSubImage: format must match the format of the existing texture image.

WebGL warning: blitFramebuffer: DRAW_FRAMEBUFFER may not have multiple samples.

The textures are also loading in as black, which I believe is linked to the warnings.

I've managed to track it down to these bits of code

this.ktx2Loader = new KTX2Loader(this.manager).detectSupport(editor.renderer.renderer);

...

loader = this.ktx2Loader;
const texture = await loadTexture(textureUrl, loader);

...

function loadTexture(src, textureLoader = new TextureLoader()) {
  return new Promise((resolve, reject) => {
    textureLoader.load(src, resolve, null, error => reject(new RethrownError(`Error loading texture "${src}"`, error)));
  });
}

And that's where it disappears into ThreeJS internal code that I'm not experienced enough to know how to handle.

The formats are loading in with a format of 36492 which I believe is KTX2 from what I can tell, so I'm a little unsure of what's causing the error. Stranger still it's working on some co-workers machines, but not my own.

Anyone know what might be going on?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The compressed format you try to load (36492 or 0x8E8C) is EXT_texture_compression_bptc and more specifically COMPRESSED_RGBA_BPTC_UNORM_EXT (aka BC7) Here is the webgl spec

Any compressed format support in webgl is provided as an extension. As such you cannot assume that any format is supported for a given platform/hardware. Generally, each OS require it's own set.

To properly use compressed texture in webgl, you need to export various formats, and based on runtime capabilities tests, load the proper one. And ultimatly, always provide a non compressed fallback(jpg, png, webp...).

Note that KTX is just a container and not a compression format/codec. It can contain any format AFAIK.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda