// …
const depthTexture = device.createTexture({
size: [canvas.width, canvas.height],
format: "depth24plus",
usage: GPUTextureUsage.RENDER_ATTACHMENT,
});
console.log(depthTexture.mipLevelCount); // 1GPUTexture: mipLevelCount property / notebook
GPUTexture: mipLevelCount property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.