-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Allow passing raw wgsl implementation to shell à la template literal #1128
Conversation
pkg.pr.new packages
benchmark commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please implement the same thing for vertexFn
, fragmentFn
and computeFn
. and update some examples to use this api (I suggest box raytracing), and functions documentation
apps/typegpu-docs/src/content/docs/fundamentals/functions/index.mdx
Outdated
Show resolved
Hide resolved
createComputeFn( | ||
shell, | ||
options.workgroupSize, | ||
implementation as Implementation, | ||
stripTemplate(arg as Implementation | TemplateStringsArray, ...values), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stripTemplate(arg as Implementation | TemplateStringsArray, ...values), | |
stripTemplate(arg, ...values), |
and same for all the other functions. I believe arg parameter of the call function can be typed as Implementation | TemplateStringsArray
in fragment and vertex too, but we should check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can replace those argument types with raw Implementation | TemplateStringsArray
, however I think that our Implementation
type needs tweaking. I failed to come up with something right now, so I created issue #1147
apps/typegpu-docs/src/content/examples/simulation/confetti/index.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! 🎉
No description provided.