Live data from Hacker News

Show HN: Shadeup – A language that makes WebGPU easier

shadeup.dev

21–30 of 57 posts

Re: Show HN: Shadeup – A language that makes WebGPU easier

#21
post #18

Earlier quoted context omitted.

wgpu is a nice implementation of webgpu for native rust applications on desktop.

I don't see a point of that versus middleware engines, with much better tooling. WebGPU/WebGL are like JavaScript, something that we have to put up with, because on the browser there is no other alternative. No need to constrain ourselves to the browser limitations when there are other options.

A single code base for both native & web? Not having to write Javascript on the web?

Re: Show HN: Shadeup – A language that makes WebGPU easier

#22
post #6

This is really cool. As far as boilerplate goes WebGPU is really not that bad (one just needs to look at Vulkan to see how fun it can get) but really anything to lower the barrier to entry is nice. I am curious about the API overhead here. For example if I run two separate passes using bare WebGPU I could use a single command encoder. Would two function calls here result in two command encoders? Another question - fr…

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,…

Oh nice thanks for the explanation.

Re: Show HN: Shadeup – A language that makes WebGPU easier

#23
post #10

This is really cool. As far as boilerplate goes WebGPU is really not that bad (one just needs to look at Vulkan to see how fun it can get) but really anything to lower the barrier to entry is nice. I am curious about the API overhead here. For example if I run two separate passes using bare WebGPU I could use a single command encoder. Would two function calls here result in two command encoders? Another question - fr…

WebGPU main pain point is forcing everyone to rewrite their shaders, no wonder most Web native game engines are going the shading language abstraction route, when only Chrome does WebGPU on desktop, and it isn't even an option on mobile years to come. Thus cross API WebGL / WebGPU shading middleware is needed.

Reducing boilerplate isnt really trying to solve that problem. Barrier to entry here can also be read as “making shaders less scary for newbies”

Re: Show HN: Shadeup – A language that makes WebGPU easier

#24
post #6

This is really cool. As far as boilerplate goes WebGPU is really not that bad (one just needs to look at Vulkan to see how fun it can get) but really anything to lower the barrier to entry is nice. I am curious about the API overhead here. For example if I run two separate passes using bare WebGPU I could use a single command encoder. Would two function calls here result in two command encoders? Another question - fr…

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,…

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

#25
post #6

Earlier quoted context omitted.

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,…

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.

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.

Re: Show HN: Shadeup – A language that makes WebGPU easier

#26
post #18

Earlier quoted context omitted.

I don't see a point of that versus middleware engines, with much better tooling. WebGPU/WebGL are like JavaScript, something that we have to put up with, because on the browser there is no other alternative. No need to constrain ourselves to the browser limitations when there are other options.

A single code base for both native & web? Not having to write Javascript on the web?

Exactly this, along with a lot of the "smoothing-out" done by the webgpu spec which provides a clear and open abstraction target.

Re: Show HN: Shadeup – A language that makes WebGPU easier

#27

webgpu hype is pretty cringe,even if you want to run in a browser (and most customers don’t) most game engines can still bake WebAssembly/WebGPU packages.

I think the main feature that's exciting for me is the gpgpu potential. Even just looking at the ability to accelerate llms in the browser on any device without an installation is awesome

For example: fleetwood.dev has a really cool project that does audio transcription in browser on the GPU: https://whisper-turbo.com/#

Re: Show HN: Shadeup – A language that makes WebGPU easier

#28

I like https://github.com/evanw/lightgl.js learnt from https://jamie-wong.com/2016/08/05/webgl-fluid-simulation/#im... the elegant lightgl.js, which is an abstraction layer on top of WebGL that makes it much nicer to work with. Unlike THREE.js, it doesn’t make any assumptions about you wanting any concept of a camera or lighting or that you’re working in 3D at all.

Key highlight for anyone unfamiliar with web graphics technologies reading this comment and interested in trying one out themselves: as mentioned above, lightgl only abstracts WebGL and this is different than the more flexible WebGPU Shadeup abstracts. One example of the difference is the fluid sim example in lightgl/WebGL has to be written as pixel based shaders (meant to do operations on pixels in textures) while Shadeup/WebGPU let you do this as a pure general purpose compute shader (more like a generic bit of code that happens to run on a GPU). This is both much more flexible in terms of what you can do as well as much more efficient/scalable in execution.

Re: Show HN: Shadeup – A language that makes WebGPU easier

#29
Very cool project.

I learned WebGL three years ago but before I dove into the underlying concepts I used GPU.js [1] to quickly prototype my project. Eventually, the abstraction prevented necessary performance optimizations so I switched to vanilla GLSL and these vanilla GLSL "shaders" were initially ejected from GPU.js.

Writing JS code then looking at the generated WebGPU output is a great way to get familiar with WebGPU. Thanks for this.

[1] https://github.com/gpujs/gpu.js/

Re: Show HN: Shadeup – A language that makes WebGPU easier

#30
post #18

Earlier quoted context omitted.

wgpu is a nice implementation of webgpu for native rust applications on desktop.

I don't see a point of that versus middleware engines, with much better tooling. WebGPU/WebGL are like JavaScript, something that we have to put up with, because on the browser there is no other alternative. No need to constrain ourselves to the browser limitations when there are other options.

Don’t be fooled by “web” in the name. Just like WebAssembly is/will be a better JVM, WebGPU is already posed to be a better OpenGL/Vulkan. It is a full graphics API unconstrained by browser implementations, and available without a browser runtime.
Post reply on HN