if (
navigator.gpu.wgslLanguageFeatures.has(
"readonly_and_readwrite_storage_textures",
)
) {
console.log("Read-only and read-write storage textures are available");
}WGSLLanguageFeatures / notebook
WGSLLanguageFeatures
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const wgslFeatures = navigator.gpu.wgslLanguageFeatures;
// Return the size of the set
console.log(wgslFeatures.size);
// Iterate through all the set values using values()
const valueIterator = wgslFeatures.values();
for (const value of valueIterator) {
console.log(value);
}
// …