# \#depth-write

**URL:** https://discourse.threejs.org/tag/depth-write/1535.md

[Latest](https://discourse.threejs.org/latest.md) · [Categories](https://discourse.threejs.org/categories.md) · [Tags](https://discourse.threejs.org/tags.md)

---

## [Does the current Nodes system support writing to depth buffer in WebGPU?](https://discourse.threejs.org/t/does-the-current-nodes-system-support-writing-to-depth-buffer-in-webgpu/58463)

<div class="topic-metadata">

**Author:** [@Berthur](https://discourse.threejs.org/u/Berthur)\
**Replies:** 16\
**Last updated:** [December 7, 2023, 3:39pm UTC](https://discourse.threejs.org/t/does-the-current-nodes-system-support-writing-to-depth-buffer-in-webgpu/58463 "2023-12-07T15:39:49Z")

</div>

In WebGL, we can set the fragment depth from within the fragment shader, which writes to the depth buffer: gl\_FragDepthEXT = 0.123; In WGSL, it can be done as follows: struct OutputStruct { @location(0) color: vec4\<f…
