News for hackers. Stuff that matters.
Re:StableDiffusion can now run directly in the browser on We... by naillo on Tuesday July 18, 2023 @09:50AM (#36772191)
WASM can access the GPU via middle layers like SDL. I.e. you can write a C program that uses opengl and compile it and as long as you include the right flags etc into `emcc` you will barely need to touch or glue it together on the JS side at all.
Re:StableDiffusion can now run directly in the browser on We... by 3cats-in-a-coat on Tuesday July 18, 2023 @02:34PM (#36777238)
All those go through JS as far as I'm aware. Emscripten bridges everything for you, but technically it goes through JS so SDL's bindings also go through JS.
Re:StableDiffusion can now run directly in the browser on We... by naillo on Wednesday July 19, 2023 @05:29AM (#36783904)
You're correct but I don't see why that matters. From your perspective as a C coder you get webgl access without having to write JS, that's what's important. Everything is "mixed together" into asm in the end anyway whether it's glue code in JS or browser side glue code.