Replies: 4 comments 1 reply
-
Great idea! |
Beta Was this translation helpful? Give feedback.
0 replies
-
@reczkok Thoughts? 🧠 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Would something like this work? const group = {
a: tgpu.fn([]).does(/* ... */),
b: tgpu.fn([]).does(/* ... */),
};
const foo = tgpu.fn([])
.does(/* wgsl */`() {
a();
b();
}`)
.$uses({ ...group }); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, if we have resources/functions grouped into an object, the only way to access them in WGSL strings it to pass in every resource one by one.
We could do this by checking what type of value
group
is when applying externals, and if it's a plain JS object, seeing if there are any property accesses to the right.Beta Was this translation helpful? Give feedback.
All reactions