Git Product home page Git Product logo

shader-slang.github.io's Introduction

Slang is a language for real-time graphics programming that extends HLSL with new capabilities for modular, extensible, and high-performance programming.

Why Slang?

Real-time graphics developers need tools that help them achieve the highest possible performance on a variety of hardware platforms and GPU APIs while also managing the complexity of large and evolving GPU codebases. Slang has been designed and implemented based on these needs:

  • Compatibility: The Slang language is backwards compatible with most existing HLSL, so you don't need to rewrite your code. The Slang compiler can generate code for D3D12, Vulkan, D3D11, CUDA, and CPU, with more targets on the way.

  • Modular and Extensible Graphics Code: The extensions that Slang adds to HLSL support cleaner and more modular shader code, allowing developers to confidently scale up their codebases to support ray tracing and other new real-time graphics techniques.

  • Performance: Slang is first and foremost a GPU language, and its new features have been carefully implemented so that they do not compromise on the runtime performance of generated code.

  • Automatic Differentiation: Slang supports automatic differentiation as a first-class language feature. This enables developers to seemlessly integrate gradient-based learning techniques into their rendering systems, or to use graphics components in a machine learning framework via slangpy. Slang supports differentiating arbitrary control flow, user-defined types, dynamic dispatch, generics, and global memory accesses. With Slang, existing real-time renderers written using Slang or plain HLSL can be made differentiable and learnable without major source code changes.

If you want to read more about the unique features of Slang, you can do so here.

Getting Started

If you'd like to give Slang a try, please read our guide on how to get started. Check out the Slang User's Guide to learn more about the language features.

We also provide a Visual Studio Code extension for complete intellisense experience.

Contributing

The Slang project is developed as open-source software on GitHub. Issues and pull requests from individuals and organizations are welcome.

License

The code of the Slang project is available under the MIT license.

By default, the Slang project is compiled to use the glslang project, which is distributed under a BSD license.

shader-slang.github.io's People

Contributors

axtens avatar csyonghe avatar tangent-vector avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

jsmall-zzz axtens

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.