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