• Slang User's Guide
    • Introduction
    • Getting Started with Slang
    • Conventional Language Features
    • Basic Convenience Features
    • Modules and Access Control
    • Capabilities
    • Interfaces and Generics
    • Automatic Differentiation
    • Compiling Code with Slang
    • Using the Reflection API
    • Supported Compilation Targets
    • Link-time Specialization and Module Precompilation
    • Special Topics
    • Target-specific features
    • Reference

Slang User’s Guide

Welcome to the Slang User’s Guide, an introduction to the Slang language, compiler, and API. In this guide, you will learn:

  • Slang’s language features, including those inherited from HLSL and additional language features to make it easy to work with shaders.
  • The compiler API that controls how to assemble shaders from different pieces of code, and how they are compiled for different targets.
  • The reflection API that allows the host application to query the details of shader code in order to generate the right shader kernel and to set shader parameters correctly.

Note: this documentation is still under active development. While the coverage on language features is complete, we are still working on the remaining chapters on Slang’s compilation and reflection API.