Getting Started

Try Slang

Try slang locally in your browser without downloading or installing anything with the Slang Playground.

Try the Slang Playground

Learn How to Become a Slang Expert

Slang 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.

Prebuilt Releases

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.

Build from Source

Instructions for building Slang from source code are maintained as part of the source code repository.

Your First Slang Shader

Follow this tutorial on how to write your first slang shader and compile it for execution with the Vulkan API.

Documentation

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.

Articles

We are continuously adding new articles to help inform and guide you on specific Slang topics. The latest articles can be found under Documentation.

Examples

The GitHub repository contains example programs showing how to use the Slang language, compiler, and API.