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
We need to update our imports to get access to both `d` and `common` from typegpu:
76
+
77
+
```ts
78
+
import { d, common } from'typegpu';
79
+
```
80
+
81
+
Then we call the `useConfigureContext` hook, which will give us a `ref` to pass into a `<canvas>` element, as well as access to the WebGPU context via `ctxRef`.
After these changes, you should see a blank red canvas on your webpage. Let's make the effect more interesting.
92
+
93
+
### Dynamic values
94
+
95
+
To pass dynamic values to your shader without having to recompile it (compilation takes significant time), you can use `useUniform` or `useMirroredUniform`, depending on the situation.
0 commit comments