Skip to content

WebGPURenderer: Missing compressed texture formats #31690

@hybridherbst

Description

@hybridherbst

Description

I tried switching KTX2Loader to WebGPU because I saw some errors in one of our apps, and it turns out there are quite a few errors that can be reproduced from webgl_loader_texture_ktx2.

Additionally, I'm not sure how to get the behaviour of renderer.setScissor() in WebGPURenderer; I commented it out here because it throws exceptions.

Reproduction steps

  1. Have local three.js for development
  2. Open webgl_loader_texture_ktx2.html
  3. Change the importmap to "three": "../build/three.webgpu.js",
  4. Change WebGLRenderer to WebGPURenderer
  5. Add if ( renderer.isWebGPURenderer ) await renderer.init(); below renderer creation
  6. Comment out renderer.setScissor(...) (not sure how to work around this)
  7. Open the page and scroll down
  8. The first few files work fine
  9. Scroll further. Then, you get warnings:
Image
  1. Scroll further. Then, you get errors:
Image
  1. Scroll to the end. Now, you get unrecoverable errors (Note: these files load fine with KTX2Loader: Add VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT #31689).
Image

Code

Follow the steps above;
or copy from https://github.com/needle-tools/three.js/blob/feature/ktx2loader_webgpu/examples/webgl_loader_texture_ktx2.html

Live example

https://raw.githack.com/needle-tools/three.js/feature/ktx2loader_webgpu/examples/webgl_loader_texture_ktx2.html

Screenshots

No response

Version

r180dev

Device

Desktop

Browser

Chrome

OS

MacOS

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions