libsdl-org / SDL_shader_tools

Shader compiler and tools for SDLSL (Simple Directmedia Layer Shader Language)
https://libsdl.org/
zlib License
131 stars 2 forks source link

[Question] Is there a potential for Slang shaders to be supported in SLD_gpu? #18

Open LouChiSoft opened 1 week ago

LouChiSoft commented 1 week ago

I'll preface this with I am not a compiler engineer, so I don't know if this is acheivable in a reasonable amount of time/is even possible.

I have only seen one mention of Slang in another thread and it wasn't directly responded to so I figured I would make a dedicated question post about it. Slang according to the developers is "a language for real-time graphics programming that extends HLSL with new capabilities for modular, extensible, and high-performance programming." It specifies that one of it's big features is the fact that it can be transpiled to other shading languages like HLSL or GLSL, or even compiled directly to SPIR-V or DXIL for example.

I know there is talk of an SDL bytecode, so instead of also having to maintain an additional shader language has it been considered maybe collaborating with the Slang devs to make Slang a first class shader language for SDL? From a lay persons perspective at least they both have similar goals of being high performance, cross platform and most importantly just more enjoyable to write.

icculus commented 1 week ago

This isn't on my TODO list at the moment, but I am very interested in the final result not being tied to one programming language, so it could definitely be worth exploring!