by caspar on 8/29/24, 11:04 PM with 122 comments
by caspar on 8/29/24, 11:16 PM
As far as I understand: the new GPU API is notable because it should allow writing graphics code & shaders once and have it all work cross-platform (including on consoles) with minimal hassle - and previously that required Unity or Unreal, or your own custom solution.
WebGPU/WGSL is a similar "cross-platform graphics stack" effort but as far as I know nobody has written console backends for it. (Meanwhile the SDL3 GPU API currently doesn't seem to support WebGPU as a backend.)
by quadhome on 8/29/24, 11:58 PM
by rudedogg on 8/30/24, 4:30 AM
I've been going down the Vulkan rabbit hole. It's been fun/enlightening to learn, but the nature of Vulkan makes progress feel slow. I think if SDL3 were available when I started, I would have happily went that route and have more to show for the amount of time I've invested.
by kvark on 8/31/24, 4:05 PM
I’m also sceptical about their new bytecode for a shading language. Parsing shaders at runtime was not a concern with WebGPU - it’s very fast. Even producing native shaders is fast [1]. It’s the pipeline creation that’s slow, and this bytecode wouldn’t help here.
[1] http://kvark.github.io/naga/shader/2022/02/17/shader-transla...
by ivars on 8/30/24, 7:06 AM
by bartwe on 8/30/24, 7:34 AM
by Ono-Sendai on 8/30/24, 6:54 AM
by JKCalhoun on 8/30/24, 5:13 PM
When I went looking for a cross-platform gaming library, SDL and its API struck the right balance for me. I just wanted a C (++) library I could call to create windows and graphical contexts — a fast sprite rendering framework. I didn't need a whole IDE or a bloated library, didn't want to learn a new language, etc.
by immibis on 8/30/24, 12:43 AM
by jb1991 on 8/30/24, 5:19 AM
by JoeyJoJoJr on 8/30/24, 8:48 AM
by bni on 8/30/24, 5:32 AM
by davikr on 8/30/24, 12:30 AM
by ammar-DLL on 8/30/24, 9:22 AM
by kookamamie on 8/30/24, 10:06 AM
See for yourself: https://github.com/libsdl-org/SDL_shader_tools/blob/main/doc...
Deviations from C-language families, such as "Flow control statements don't need parentheses." are completely unnecessary, I think. Same goes for "Flow control statements must use braces."