shader-slang/slang

Making it easier to work with shaders

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 35 minutes ago
Added to GitGenius on September 12th, 2026
Created on June 9th, 2017
Open Issues & Pull Requests: 1,330 (+0)
GitHub issues: Enabled
Number of forks: 489
Total Stargazers: 5,641 (+0)
Total Subscribers: 58 (+0)

Repository Insights (GitGenius)

Most active contributors

Sign in to see contributor activity.

Related repositories by overlapping contributors

No overlapping-contributor repos identified yet.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue API getrepoissuespagesummary failed: 429 Rate limit exceeded. Please try again later.

Detailed Description

Slang is a shading language that enables developers to write portable, high-performance shader code that compiles to multiple graphics APIs and compute platforms.

Slang addresses the challenge of maintaining large shader codebases across diverse GPU targets and graphics APIs. Rather than writing separate shader code for each platform, developers write once in Slang and the compiler generates optimized code for Direct3D 12, Vulkan, Metal, Direct3D 11, CUDA, and CPU targets. The language preserves readability in generated textual outputs like Metal Shading Language and CUDA, maintaining identifier names and code structure to aid debugging. Slang's capability system allows code to conditionally use platform-specific features—such as pointers in SPIR-V or the latest Direct3D extensions—while ensuring type safety before code generation. The tool also supports automatic differentiation, generating both forward and backward derivative propagation for complex functions with arbitrary control flow, enabling existing rendering systems to become differentiable for machine learning integration.

Slang suits teams building real-time graphics applications that target multiple platforms and want to avoid maintaining separate shader implementations. It is particularly valuable for studios working with cutting-edge GPU features or those integrating neural graphics techniques. The project's module system enables separate compilation of shader code to an intermediate representation with optional obfuscation, supporting offline compilation and runtime linking workflows. Developers prioritizing code reuse, maintainability, and access to the latest platform capabilities across heterogeneous targets will find Slang's approach compelling.

The project maintains active continuous integration testing across multiple configurations. The codebase receives regular updates addressing compiler improvements and language features. Development activity shows consistent engagement with both core functionality and platform-specific optimizations. The project sustains a test suite that includes compatibility verification against graphics API conformance standards.