Thursday, November 21st 2024
Khronos Group Launches Slang Initiative, Hosting Open Source Compiler Contributed by NVIDIA
The Khronos Group, an open consortium of industry leaders in interoperability standards, has announced the launch of the new Slang Initiative. This initiative will oversee and advance the open-source Slang shading language and compiler, building on 15 years of research, development, and deployment experience. Supported by NVIDIA since 2017, Slang has been widely adopted in production projects across the industry.
Slang empowers real-time graphics developers with innovative features that complement existing shading languages, including modular code development, portable deployment to multiple target APIs, and neural computation in graphics shaders. Hosting under multi-company governance at Khronos will enable and foster industry-wide collaboration to drive Slang's continued evolution."Slang is now a significant shading language option for graphics developers everywhere, as all are enabled to directly influence and participate in its ongoing development," said Neil Trevett, president of The Khronos Group and vice president developer ecosystems, NVIDIA. "Khronos's innovative Slang governance structure blends open-source development agility with the patent safeguards of open standards. Slang is freely available for any platform or API to use, including Khronos, which will leverage Slang in the Vulkan ecosystem while ensuring SPIR-V remains responsive to Slang's requirements."
"NVIDIA will continue its longstanding investment in Slang, which is designed to meet the needs of today's graphics developers while paving the way for the neural graphics revolution," said Nicholas Haemel, vice president of graphics and system software, NVIDIA. "With Slang in open governance at Khronos, the graphics community can collaboratively advance and harness the advantages of cross-platform support, scalable graphics systems, reduced compile times, and enhanced modularity."
Fostering Open Industry Collaboration
Khronos has established a unique governance model to ensure Slang remains open and responsive to developers. Hosted on GitHub and licensed under Apache 2.0, the Slang open-source project will follow best practices for technical development while fostering an active, self-governing contributor community. Contributors can influence language design, improve the codebase, and address bugs, with opportunities to earn elevated rights within the project—independent of Khronos membership.
The associated Slang working group, composed of Khronos members, provides financial, logistical, and marketing support to the open-source project, offering strategic guidance while enabling Slang engineering work to remain agile. Together, the open-source project and the working group form the Slang Initiative.
The Slang open-source project will develop a rigorous language specification alongside the compiler, ensuring clarity, and architectural consistency backward compatibility, for developers. This specification will be periodically ratified by the Slang Working Group to provide patent license protection under the Khronos Intellectual Property Framework.
Slang's Value to Developers
Slang is designed to address the evolving needs of real-time graphics developers, especially those working with large-scale shader codebases. By supporting modular development with features like modules, interfaces, and generics, Slang simplifies shader creation and maintenance while significantly reducing compilation times.
Many developers must currently rewrite shader code to run on multiple target APIs and platforms or use complex translation or recompilation toolchains. The Slang compiler directly supports multiple backend targets for portable code deployment across diverse APIs and platforms, including SPIR-V for Vulkan, HLSL for Direct3D, GLSL for OpenGL, WGSL for WebGPU, and Metal Shading Language for Apple platforms. For example, Autodesk uses Slang in the Aurora path tracing renderer to enable a single-source ray tracing codebase.
The Slang compiler enables ingestion of existing HLSL and GLSL shader codebases for developers who wish to incrementally migrate to Slang's modern language features. For example, Valve compiled the entire production Source 2 HLSL codebase with Slang while modifying only 10 lines of code.
Slang supports automatic differentiation as a first-class language feature, making it ideal for integrating neural computation into graphics shaders. Slang can automatically generate both forward- and backward-derivative propagation code for complex functions to easily make existing rendering codebases differentiable, or to use Slang as the kernel language in a PyTorch-driven machine learning framework via slangtorch. For example, Slang is used in the Slang.D Gaussian Splatting Rasterizer, a unified platform for real-time, inverse, and differentiable rendering which can compile to rendering code for diverse platforms.
Slang Enhances the Khronos Standards Ecosystem
Establishing Slang as a modern shading language, actively maintained and shaped by the community, greatly enriches the Khronos standards ecosystem. Designed to empower developers, Slang broadens the choice of available shading languages to address diverse needs and drive innovation across the industry.
Slang will provide timely access to new API functionality, including the latest Vulkan features, and is available as one of the shading language options in the Vulkan SDK. As a "client" language, Slang will also actively contribute to the evolution of the SPIR-V intermediate representation, thereby benefiting the broader standards-based compiler ecosystem.
Get Involved
As part of the SIGGRAPH Asia 2024 conference in Tokyo on December 4th, Khronos will host a Birds of a Feather Session titled "Slang and the 3D Shading Language Landscape" that will explore the role of Slang in the landscape of 3D shading languages, how it complements languages like GLSL and HLSL, and how Slang enables shader portability across multiple platforms, including PCs, the web, cloud environments, mobile devices, and Apple platforms.
The Slang open-source project warmly welcomes participation by any interested developers to join the Slang Discord and contribute to the public Slang GitHub repository, where they can submit pull requests, RFCs, bug reports, and more. More information on Slang can be found at https://shader-slang.org/.
Industry Support for Slang
"We're excited to see Slang maturing, gaining industry momentum, and transitioning to open governance under Khronos—a major advancement for the developer community. Within Adobe's 3D & Immersive division, we're actively exploring Slang as part of our unified rasterization and path-tracing renderer, recognizing its potential as a versatile, unified shading language. With its expressive syntax and modern design, Slang offers real promise in streamlining complex shading workflows, and we're enthusiastic about its potential role in advancing our rendering pipeline," said Francois Beaune, director of rendering for 3D&I, Adobe.
"We see great benefits with Slang in reducing code complexity and maintenance overhead across APIs, as well as in unlocking potential for future neural graphics capabilities. We welcome Slang's transition to an open, multi-company governance model under Khronos and believe this will greatly benefit the shading language ecosystem and the graphics industry as a whole," said Henrik Edstrom, distinguished architect, graphics, Autodesk.
"The global landscape requires an open shading language that allows developers and researchers to innovate in graphics without constraints and with high efficiency. Slang builds on the accomplishments of existing languages while offering novel solutions to the challenges we face in the realm of modern graphics development," said Billy Khan, director of engine technology, id Software.
"Establishing open governance and standardizing Slang - an already portable, multiplatform shader language - is crucial for its widespread industry adoption. With over 20 years of experience in open-source development and standards, Igalia is proud to contribute our expertise to help establish Slang as an industry standard through this collaborative initiative," said Samuel Iglesias, coordinator of the GPU driver development team at Igalia.
"The process of getting our large HLSL shader codebase working with Slang went extremely smoothly. We were able to integrate Slang into the Source 2 engine and ship the generated SPIR-V into production on multiple titles, including Counter-Strike 2 and Dota 2, with minimal changes to our shaders. After completing the initial integration, we have since adopted some of the advanced features of Slang, such as BufferPointer, enumerants, interfaces, and generics. We are very thankful for NVIDIA offering Slang to the open-source community and believe ongoing contributions from multiple companies within Khronos will help ensure a healthy future for Slang," said Dan Ginsburg, software developer, Valve.
Slang empowers real-time graphics developers with innovative features that complement existing shading languages, including modular code development, portable deployment to multiple target APIs, and neural computation in graphics shaders. Hosting under multi-company governance at Khronos will enable and foster industry-wide collaboration to drive Slang's continued evolution."Slang is now a significant shading language option for graphics developers everywhere, as all are enabled to directly influence and participate in its ongoing development," said Neil Trevett, president of The Khronos Group and vice president developer ecosystems, NVIDIA. "Khronos's innovative Slang governance structure blends open-source development agility with the patent safeguards of open standards. Slang is freely available for any platform or API to use, including Khronos, which will leverage Slang in the Vulkan ecosystem while ensuring SPIR-V remains responsive to Slang's requirements."
"NVIDIA will continue its longstanding investment in Slang, which is designed to meet the needs of today's graphics developers while paving the way for the neural graphics revolution," said Nicholas Haemel, vice president of graphics and system software, NVIDIA. "With Slang in open governance at Khronos, the graphics community can collaboratively advance and harness the advantages of cross-platform support, scalable graphics systems, reduced compile times, and enhanced modularity."
Fostering Open Industry Collaboration
Khronos has established a unique governance model to ensure Slang remains open and responsive to developers. Hosted on GitHub and licensed under Apache 2.0, the Slang open-source project will follow best practices for technical development while fostering an active, self-governing contributor community. Contributors can influence language design, improve the codebase, and address bugs, with opportunities to earn elevated rights within the project—independent of Khronos membership.
The associated Slang working group, composed of Khronos members, provides financial, logistical, and marketing support to the open-source project, offering strategic guidance while enabling Slang engineering work to remain agile. Together, the open-source project and the working group form the Slang Initiative.
The Slang open-source project will develop a rigorous language specification alongside the compiler, ensuring clarity, and architectural consistency backward compatibility, for developers. This specification will be periodically ratified by the Slang Working Group to provide patent license protection under the Khronos Intellectual Property Framework.
Slang's Value to Developers
Slang is designed to address the evolving needs of real-time graphics developers, especially those working with large-scale shader codebases. By supporting modular development with features like modules, interfaces, and generics, Slang simplifies shader creation and maintenance while significantly reducing compilation times.
Many developers must currently rewrite shader code to run on multiple target APIs and platforms or use complex translation or recompilation toolchains. The Slang compiler directly supports multiple backend targets for portable code deployment across diverse APIs and platforms, including SPIR-V for Vulkan, HLSL for Direct3D, GLSL for OpenGL, WGSL for WebGPU, and Metal Shading Language for Apple platforms. For example, Autodesk uses Slang in the Aurora path tracing renderer to enable a single-source ray tracing codebase.
The Slang compiler enables ingestion of existing HLSL and GLSL shader codebases for developers who wish to incrementally migrate to Slang's modern language features. For example, Valve compiled the entire production Source 2 HLSL codebase with Slang while modifying only 10 lines of code.
Slang supports automatic differentiation as a first-class language feature, making it ideal for integrating neural computation into graphics shaders. Slang can automatically generate both forward- and backward-derivative propagation code for complex functions to easily make existing rendering codebases differentiable, or to use Slang as the kernel language in a PyTorch-driven machine learning framework via slangtorch. For example, Slang is used in the Slang.D Gaussian Splatting Rasterizer, a unified platform for real-time, inverse, and differentiable rendering which can compile to rendering code for diverse platforms.
Slang Enhances the Khronos Standards Ecosystem
Establishing Slang as a modern shading language, actively maintained and shaped by the community, greatly enriches the Khronos standards ecosystem. Designed to empower developers, Slang broadens the choice of available shading languages to address diverse needs and drive innovation across the industry.
Slang will provide timely access to new API functionality, including the latest Vulkan features, and is available as one of the shading language options in the Vulkan SDK. As a "client" language, Slang will also actively contribute to the evolution of the SPIR-V intermediate representation, thereby benefiting the broader standards-based compiler ecosystem.
Get Involved
As part of the SIGGRAPH Asia 2024 conference in Tokyo on December 4th, Khronos will host a Birds of a Feather Session titled "Slang and the 3D Shading Language Landscape" that will explore the role of Slang in the landscape of 3D shading languages, how it complements languages like GLSL and HLSL, and how Slang enables shader portability across multiple platforms, including PCs, the web, cloud environments, mobile devices, and Apple platforms.
The Slang open-source project warmly welcomes participation by any interested developers to join the Slang Discord and contribute to the public Slang GitHub repository, where they can submit pull requests, RFCs, bug reports, and more. More information on Slang can be found at https://shader-slang.org/.
Industry Support for Slang
"We're excited to see Slang maturing, gaining industry momentum, and transitioning to open governance under Khronos—a major advancement for the developer community. Within Adobe's 3D & Immersive division, we're actively exploring Slang as part of our unified rasterization and path-tracing renderer, recognizing its potential as a versatile, unified shading language. With its expressive syntax and modern design, Slang offers real promise in streamlining complex shading workflows, and we're enthusiastic about its potential role in advancing our rendering pipeline," said Francois Beaune, director of rendering for 3D&I, Adobe.
"We see great benefits with Slang in reducing code complexity and maintenance overhead across APIs, as well as in unlocking potential for future neural graphics capabilities. We welcome Slang's transition to an open, multi-company governance model under Khronos and believe this will greatly benefit the shading language ecosystem and the graphics industry as a whole," said Henrik Edstrom, distinguished architect, graphics, Autodesk.
"The global landscape requires an open shading language that allows developers and researchers to innovate in graphics without constraints and with high efficiency. Slang builds on the accomplishments of existing languages while offering novel solutions to the challenges we face in the realm of modern graphics development," said Billy Khan, director of engine technology, id Software.
"Establishing open governance and standardizing Slang - an already portable, multiplatform shader language - is crucial for its widespread industry adoption. With over 20 years of experience in open-source development and standards, Igalia is proud to contribute our expertise to help establish Slang as an industry standard through this collaborative initiative," said Samuel Iglesias, coordinator of the GPU driver development team at Igalia.
"The process of getting our large HLSL shader codebase working with Slang went extremely smoothly. We were able to integrate Slang into the Source 2 engine and ship the generated SPIR-V into production on multiple titles, including Counter-Strike 2 and Dota 2, with minimal changes to our shaders. After completing the initial integration, we have since adopted some of the advanced features of Slang, such as BufferPointer, enumerants, interfaces, and generics. We are very thankful for NVIDIA offering Slang to the open-source community and believe ongoing contributions from multiple companies within Khronos will help ensure a healthy future for Slang," said Dan Ginsburg, software developer, Valve.
5 Comments on Khronos Group Launches Slang Initiative, Hosting Open Source Compiler Contributed by NVIDIA
... Or, academically oriented programmers, counting uptime in the number and size of sailboats. (As I have recalled.)