News for hackers. Stuff that matters.
Re:Show HN: Shadeup – A language that makes WebGPU easier by jrmydev on Wednesday January 17, 2024 @01:24PM (#39031444)
Thanks, and great question:

Shadeup will try to fit it all into one command encoder but may need to split if the coder: 1. Manually flushes 2. Reads/downloads a buffer on the CPU

Most calls are lazily evaluated, and a small dep graph is built as you reference/draw things.

That being said, shadeup does make some perf sacrifices in the name of simplicity. I'd say it's well suited to prototyping and learning. Of course, once you have a working prototype of something porting it to native wgsl should be easy

Re:Show HN: Shadeup – A language that makes WebGPU easier by stanleykm on Wednesday January 17, 2024 @05:15PM (#39034324)
Oh nice thanks for the explanation.
Re:Show HN: Shadeup – A language that makes WebGPU easier by burntcaramel on Wednesday January 17, 2024 @05:59PM (#39034820)
Have you thought about having an "eject" command? For example, Create React App had an eject command to go from the self-contained version to a full customisable Webpack app.
Re:Show HN: Shadeup – A language that makes WebGPU easier by jrmydev on Wednesday January 17, 2024 @06:27PM (#39035114)
Users can already kinda do this by showing the compiled output, but the js engine itself is still tucked away. At some point, I would probably have a tree shaken full output for each shadeup.