The design of generics in this one seems rather well balanced in simplicity vs power. The part about interface-typed values [1] is interesting. They do dynamic dispatch as a fallback when the function is too polymorphic to be be specialized. In Rust terms it's as if it picks between `dyn` and `impl` automatically. It looks convenient, but also a bit of a non-obvious performance pitfall. [1] https://shader-slang.com/s…
The Slang Shading Language
31–40 of 50 posts
Re: The Slang Shading Language
#32Will Slang support compute shaders too, or is it just for graphics.
Re: The Slang Shading Language
#33I hope this becomes the standard way of writing shaders across all platforms. There is no compelling reason for having to use WGSL, HLSL, GLSL or Metal C++. Having one single feature-complete language is a huge QoL improvement.
Nobody is using all these languages at the same time, anyone who targets all these platforms already has some mechanism to turn HLSL or GLSL (or whatever) into what the target platform needs. That's why Slang will have difficulty finding adoption, it's the N+1th solution to a problem that already has been solved N times.
Slang provides a standard and open source solution that's better and more featureful than those custom solutions.
Re: The Slang Shading Language
#34I hope this becomes the standard way of writing shaders across all platforms. There is no compelling reason for having to use WGSL, HLSL, GLSL or Metal C++. Having one single feature-complete language is a huge QoL improvement.
What is missing from GLSL?
I for example really welcome Slang's support for automatic differentiation.
Re: The Slang Shading Language
#35Re: The Slang Shading Language
#36I hope this becomes the standard way of writing shaders across all platforms. There is no compelling reason for having to use WGSL, HLSL, GLSL or Metal C++. Having one single feature-complete language is a huge QoL improvement.
Nobody is using all these languages at the same time, anyone who targets all these platforms already has some mechanism to turn HLSL or GLSL (or whatever) into what the target platform needs. That's why Slang will have difficulty finding adoption, it's the N+1th solution to a problem that already has been solved N times.
Slang had to make a change to its type system[2] to make this work. But they did it, and as a result Slang is appealing as an "apex" language - you can translate from that to anything, and also get advanced features lacking in WebGPU.
Re: The Slang Shading Language
#37I'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.
Several commercial products are already using Slang, it has moved beyond research demo for quite some time now. The main difference, with something like Cg, is that now it isn't NVidia only.
Can you elaborate?
Re: The Slang Shading Language
#38Re: The Slang Shading Language
#39I hope this becomes the standard way of writing shaders across all platforms. There is no compelling reason for having to use WGSL, HLSL, GLSL or Metal C++. Having one single feature-complete language is a huge QoL improvement.
Nobody is using all these languages at the same time, anyone who targets all these platforms already has some mechanism to turn HLSL or GLSL (or whatever) into what the target platform needs. That's why Slang will have difficulty finding adoption, it's the N+1th solution to a problem that already has been solved N times.
But one of their big contributors also worked on Vulkan and Slang/SPIR-V itself if I recall correctly (and works at ARM on GPU drivers), so there's that.
Re: The Slang Shading Language
#40Earlier quoted context omitted.
Several commercial products are already using Slang, it has moved beyond research demo for quite some time now. The main difference, with something like Cg, is that now it isn't NVidia only.
I have known about slang for some time but hadn’t heard about these commercial products. Can you elaborate?
https://vulkan.org/user/pages/09.events/vulkanised-2024/vulk...
Omniverse, Portal RTX, RTX Remix, Source 2 shading infrastructure,