Try slang locally in your browser without downloading or installing anything with the Slang Playground.
Try the Slang PlaygroundSlang code is highly portable, but can still leverage unique platform capabilities, including the latest features in Direct3D and Vulkan. For example, developers can make full use of pointers when generating SPIR-V. Slang's capability system helps applications manage feature set differences across target platforms by ensuring code only uses available features during the type-checking step, before generating final code. Additionally, Slang provides flexible interop features to enable directly embedding target code or SPIR-V into generated shaders.
Binary packages are available for Windows, Linux and MacOS. Binary releases include the command-line compiler slangc, a shared library for the compiler, and the header files necessary for interacting with that library.
Instructions for building Slang from source code are maintained as part of the source code repository.
Follow this tutorial on how to write your first slang shader and compile it for execution with the Vulkan API.
Check out the Slang User’s Guide to learn more about the language features, and the Slang Standard Library Reference Manual for details on Slang’s built-in types and the functions available for use in your shader code.
We are continuously adding new articles to help inform and guide you on specific Slang topics. The latest articles can be found under Documentation.
The GitHub repository contains example programs showing how to use the Slang language, compiler, and API.