This PR will add support for ASTC and ETC2 if supported by your device and reported by the browser:
Note that dxt support is currently handled, engine.texturesSupported returns ['-dxt.ktx'] for me in the Playground when in WebGPU mode.
Note that if you don’t use the Playground you must create the engine by asking support for the extensions you want to use. For eg, the Playground is creating the engine like this:
var engine = new WebGPUEngine(canvas, {
deviceDescriptor: {
requiredFeatures: [
"depth-clip-control",
"depth24unorm-stencil8",
"depth32float-stencil8",
"texture-compression-bc",
"texture-compression-etc2",
"texture-compression-astc",
"timestamp-query",
"indirect-first-instance",
],
},
});
await engine.initAsync();
You will get in engine.supportedExtensions the extensions that are supported by the browser and enabled among the ones you asked.