You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/typegpu-docs/src/content/docs/fundamentals/utils.mdx
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -191,11 +191,12 @@ When using `console.log`, atomic operations are injected into the WGSL code to s
191
191
This synchronization can introduce overhead and significantly impact shader performance.
192
192
:::
193
193
194
+
Other supported `console` functionalities include `console.debug`, `console.info`, `console.warn`, `console.error` and `console.clear`.
195
+
194
196
There are some limitations (some of which we intend to alleviate in the future):
195
197
196
198
-`console.log` only works when used in TGSL, when calling or resolving a TypeGPU pipeline.
197
199
Otherwise, for example when using `tgpu.resolve` on a WGSL template, logs are ignored.
198
200
-`console.log` only works in fragment and compute shaders.
199
201
This is due to a [WebGPU limitation](https://www.w3.org/TR/WGSL/#address-space) that does not allow modifying buffers during the vertex shader stage.
200
-
-`console.log` currently does not support template literals and string substitutions.
201
-
- Other `console` methods like `clear` or `warn` are not yet supported.
202
+
-`console.log` currently does not support template literals (but you can use [string substitutions](https://developer.mozilla.org/en-US/docs/Web/API/console#using_string_substitutions), or just pass multiple arguments instead).
0 commit comments