Also check out Rust GPU, which has similar features and uses Rust rather than a new language: https://github.com/Rust-GPU/rust-gpu
The Slang Shading Language
11–20 of 50 posts
Re: The Slang Shading Language
#12Re: The Slang Shading Language
#13Will Slang support compute shaders too, or is it just for graphics.
Re: The Slang Shading Language
#14Re: The Slang Shading Language
#15I have to wonder how this fits in with other shader technologies that seem to have overlapping purposes. (There's Khronos' own Spir-V, SDL's SDLSL, Three's TSL, and WebGPU's WGSL) The reflection and automatic differentiation look interesting, I just wish I understood better what problems they're trying to solve. I actually think WebGPU/WGSL will and should become ubiquitous, though it's a shame it's not more C/GLSL-l…
- the frontend language is mostly compatible with HLSL, which is the defacto shader authoring standard in the gamedev industry
- it compiles to the 'shader language/bytecode zoo' of the different 3D APIs (since recently even WGSL/WebGPU)
So it lets you author your shaders in a single language that's already accepted by most of the industry, and target the various 3D APIs (D3D, Metal, GL, WebGPU, ...).
It is already possible to build such a tool yourself by glueing together existing libraries (like glslang, SPIRVTools, SPIRVCross and Tint), but it requires quite some work and there are little annoying details like SPIRVCross never supporting WGSL output for some non-technical reasons (so that you need a separate library like Tint just for the SPIRV-to-WGSL conversion). In fact there are tons of such engine-specific shader cross-compilers, all built around the same few Khronos libraries and doing more or less the same thing. Slang looks like it could be the standard replacement for all those custom solutions.
For my own needs, the main thing I'll need to investigate is how easy it is to add engine-specific custom annotations to Slang resources and then output those as part of the reflection information.
Re: The Slang Shading Language
#16[flagged]
Re: The Slang Shading Language
#17I've been very impressed by Slang as an open source project. The development team is quick to respond to issues and review pull requests. It's clear from their repository and their presentations that they take Slang seriously as a user-facing project, not a research demo.
Re: The Slang Shading Language
#18I have to wonder how this fits in with other shader technologies that seem to have overlapping purposes. (There's Khronos' own Spir-V, SDL's SDLSL, Three's TSL, and WebGPU's WGSL) The reflection and automatic differentiation look interesting, I just wish I understood better what problems they're trying to solve. I actually think WebGPU/WGSL will and should become ubiquitous, though it's a shame it's not more C/GLSL-l…
IMHO Slang fixes two problems in one tool: - the frontend language is mostly compatible with HLSL, which is the defacto shader authoring standard in the gamedev industry - it compiles to the 'shader language/bytecode zoo' of the different 3D APIs (since recently even WGSL/WebGPU) So it lets you author your shaders in a single language that's already accepted by most of the industry, and target the various 3D APIs (D3…
Re: The Slang Shading Language
#19Also check out Rust GPU, which has similar features and uses Rust rather than a new language: https://github.com/Rust-GPU/rust-gpu
Don't we already have a shader language with Rust-syntax in WGSL? It also works everywhere, given that WebGPU works wherever Vulkan, Metal & DirectX do...
WGSL will also always only cover the WebGPU feature set, which is very conservative by definition (e.g. no modern features like mesh shaders, raytracing, etc...). Again, I don't know how much of this Slang provides though.
Re: The Slang Shading Language
#20[flagged]