From 3d36e0ca08c6d8ea21bc825ccfae4754e18744be Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 20 Nov 2024 15:22:38 -0800 Subject: Add description on write-only textures in wgsl doc. --- docs/user-guide/a2-03-wgsl-target-specific.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs') diff --git a/docs/user-guide/a2-03-wgsl-target-specific.md b/docs/user-guide/a2-03-wgsl-target-specific.md index 206da365b..7d1ec87f6 100644 --- a/docs/user-guide/a2-03-wgsl-target-specific.md +++ b/docs/user-guide/a2-03-wgsl-target-specific.md @@ -117,6 +117,14 @@ Parameter blocks Each `ParameterBlock` is assigned its own bind group in WGSL. +Write-only Textures +--------------- + +Many image formats supported by WebGPU can only be accessed in compute shader as a write-only image. +Use `WTexture2D` type (similar to `RWTexture2D`) to write to an image when possible. +The write-only texture types are also supported when targeting HLSL/GLSL/SPIR-V/Metal and CUDA. + + Pointers -------- -- cgit v1.2.3