[2/3]
Even just focusing on the GPU we have:
- CUDA supporting only NVIDIA and no graphics shaders.
- OpenCL is multi-platform but no graphics shaders and pretty much dead anyway?
- Metal (MSL) is Apple-only.
- GLSL on Vulkan is viable but clearly in maintenance-only mode and no longer evolving.
- HLSL works and is being worked on, but is controlled by Microsoft and not a standard.
- WebGPU (WGSL) might be an option for native applications at some point, but not yet.
Anything else?
[3/3]
Regardless, none of these address natively compiling to the CPU.
There's promising things like VCC https://shady-gang.github.io/vcc/ but it seems too early and risky to base a project on it for now.
My use case is a raymarching based game engine, where the content is defined in terms of functions representing an SDF.
I want to be able to use these SDF-defining functions and their associated data in CPU and GPU compute for physics and gameplay, and on GPU graphics for rendering.