-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Q: Slang for shaders #1162
Comments
I'm thinking about it but there are a couple of issues to solve:
PS: one intermediate step I might try is to accept SPIRV as input to sokol-shdc |
Seems like they offer prebuilt binaries for most platforms at releases page, but they have up to 276MB in size, so it's too big.
From inspecting their binary package, it looks like with some work it could be statically linked, but it could result in a 700MB binary file, ouch.
Since its binaries are very big, maybe expect the user to have a slang compiler available in the system, and invoke Anyway, I have seen Sokol creating its own shader generator to target different backends, SDL3 seems to be on the same path with its own shader compiler. I just thought slang looks like a promising solution for this common problem that cross platform graphics libraries have. |
Yeah that could be the only realistic option, create a small wrapper cmdline tool which calls the slang executable and then uses its output for the sokol-gfx code generation... Ideally I'd like to give sokol-gfx users multiple options for authoring their shaders (another one could be WGSL as shader authoring language). Just need to find a way which doesn't add too much maintenance overhead. |
Since announcement from Khronos about hosting the slang shading language last month, I wondered what if Sokol supported it to create shaders, it's playground seems cool. Seems like it could fit as a more modern, more capable, and highly cross platform shading language since it can target all backends Sokol cares, maybe it would simplify
sokol-shdc
.What are your opinions on the subject?
The text was updated successfully, but these errors were encountered: