shaders are perfectly suited for functional programming and yet every major shader language is brutally imperative. it’s horrible. does anyone know how one might go about writing an alternative shader language? is there a shader version of assembly i can compile to???
-
-
If this would be a for-fun project, or you only care about Vulkan, then SPIR-V would be a good choice. If you want something broadly useful you’ll probably need to generate source in GLSL/HLSL/... (that’s what I do in my current work).
-
On the deeper question, there is some prior work on functional programming for GPUs: Vertigo by Conan Elliot, Renaissance, and the GPipe effort come to mind. I can only conjecture about why these kinds of approaches haven’t caught on.
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
cognitive psychology. PhD