Comment by pjmlp

Comment by pjmlp 10 months ago

4 replies

C based, no support for modular programming, everything needs to be a giant include, no one is adding features to it as Khronos isn't assigned any budget to it.

HLSL has evolved to be C++ like, including lightweight templates, mesh shaders and work graphs, has module support via libraries, is continuously being improved on each DirectX release.

flohofwoe 10 months ago

I'm not a fan of GLSL either, but adding C++ like baggage to shading languages like HLSL and especially MSL do (which is C++) is a massive mistake IMHO, I'd prefer WGSL over that sort of pointless language complexity any day.

  • pjmlp 10 months ago

    Long term shading languages will be a transition phase, and most GPUs will turn into general purpose compute devices, where we can write code like in the old days of software rendering, except it will be hardware accelerated anyway.

    We already see this with rendering engines that are using CUDA instead, or as shown at Vulkanised sessions.

    I do agree that to the extent C++ has grown, and the security issues, something else would be preferable, maybe NVidia has some luck with their Slang adoption proposal.

  • NotGMan 10 months ago

    At some point you have to stop working in assembly and graduate to a high-level language and beyond.

    Modern GPU stuff is getting too complex to be practical without higher language features.

    • flohofwoe 10 months ago

      From the pov of assembly, C and any other high level language are basically the same. That doesn't mean that climbing even higher up on the abstraction ladder is a good thing though (especially for performance).