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

A great overview of the terrible mess that underlies cross-3D-API shader compilation (and even though it focuses on D3D and Microsoft, it's not much better on other 3D APIs - for instance you simply can't cross-compile Metal shaders from a Linux host - only from macOS and - somewhat recently - Windows).

If the Mach team can pull off this whole "Zig as a cross-3D-API shader compiler" and make it work as smoothly as "Zig as a cross-compilation toolchain", then this would be pretty much the biggest thing in computer graphics since 1995 or so :)



> If the Mach team can pull off this whole "Zig as a cross-3D-API shader compiler" and make it work as smoothly as "Zig as a cross-compilation toolchain", then this would be pretty much the biggest thing in computer graphics since 1995 or so :)

And a major boost for Zig -- both as a language and a toolchain.


> for instance you simply can't cross-compile Metal shaders from a Linux host

Why not? Doesn't that just mean that nobody has implemented it yet?


The Metal shader compiler is only distributed as binary blobs for Mac and Windows. Reverse engineering of the undocumented output is possible of course, but that also means keeping track of all the changes Apple does to the output format in new versions.


If you can do it on Windows doesn't that mean you can do it on Linux with Wine?


It probably works, but Jenga tower hacks like that is exactly the problem ;)




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

Search: