Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

With the "fun" to rewrite all WebGL shaders into WGSL.


You can use the SPIR-V compiler toolchain to just transpile from GLSL to WGSL :)


Minor nitpick: this translation happens in separate libraries/tools which just make use of the SPIRVTools library for some SPIRV processing tasks, but not the actual translation to WGSL.

Tint (Google, implemented in C++): https://dawn.googlesource.com/tint/

Naga (Mozilla(?), implemented mostly in Rust): https://github.com/gfx-rs/naga

Both are a bit similar to SPIRV-Cross, except that they also support WGSL.


Naga (a community project) translates GLSL directly into WGSL, unlike other tools.


Ah alright, thanks for the correction :)


Yes I know, even more fun dealing with additional kludges, because 3D on the Web versus native doesn't have enough of them already.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: