Skip to content

Commit

Permalink
Set depthSlice with emscripten as well
Browse files Browse the repository at this point in the history
  • Loading branch information
eliemichel authored Apr 21, 2024
1 parent ddbfd9a commit 48dfae8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions next/getting-started/first-color.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,16 +270,13 @@ renderPassColorAttachment.storeOp = WGPUStoreOp_Store;
renderPassColorAttachment.clearValue = WGPUColor{ 0.9, 0.1, 0.2, 1.0 };
```

````{admonition} Dawn
Dawn has an extra member `depthSlice` in the attachment, that we must explicitly set to its undefined value because we do not use a depth buffer:
There is a last member `depthSlice` to set in the attachment, that we must explicitly set to its undefined value because we do not use a depth buffer. This option is not supported by `wgpu-native` for now so we enclosed this within a `#ifdef`:

```{lit} C++, Describe the attachment (append)
#ifdef WEBGPU_BACKEND_DAWN
#ifndef WEBGPU_BACKEND_WGPU
renderPassColorAttachment.depthSlice = WGPU_DEPTH_SLICE_UNDEFINED;
#endif // WEBGPU_BACKEND_DAWN
#endif // NOT WEBGPU_BACKEND_WGPU
```
````


### Misc

Expand Down

0 comments on commit 48dfae8

Please sign in to comment.