All Projects → microsoft → Directxshadercompiler

microsoft / Directxshadercompiler

Licence: other
This repo hosts the source for the DirectX Shader Compiler which is based on LLVM/Clang.

Programming Languages

C++
36643 projects - #6 most used programming language
HLSL
714 projects
LLVM
166 projects
c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
C#
18002 projects

Projects that are alternatives of or similar to Directxshadercompiler

Dxbc2Dxil
DEPRECATED. DXBC to DXIL (HLSL Bytecode to LLVM IR) using internal APIs.
Stars: ✭ 21 (-98.96%)
Mutual labels:  hlsl, dxil
Bakerboy
A single-component, GPU-based universal ambient occlusion and bent normal baker for Unity. The successor to my BNAO respository
Stars: ✭ 128 (-93.68%)
Mutual labels:  hlsl
Hexbokehblur
Hexagonal Bokeh Blur
Stars: ✭ 85 (-95.8%)
Mutual labels:  hlsl
Unity Optimized Cginclude File
Deeply optimized Unity CGInclude files
Stars: ✭ 103 (-94.91%)
Mutual labels:  hlsl
Gteleporter
Stars: ✭ 91 (-95.51%)
Mutual labels:  hlsl
Crossshader
⚔️ A tool for cross compiling shaders. Convert between GLSL, HLSL, Metal Shader Language, or older versions of GLSL.
Stars: ✭ 113 (-94.42%)
Mutual labels:  hlsl
Plannarshadowforunity
Planar Shadow is very cheap and useful for mobile games.
Stars: ✭ 74 (-96.35%)
Mutual labels:  hlsl
Shaderc Rs
Rust bindings for the shaderc library.
Stars: ✭ 143 (-92.94%)
Mutual labels:  hlsl
Krafix
GLSL cross-compiler based on glslang and SPIRV-Cross
Stars: ✭ 124 (-93.88%)
Mutual labels:  hlsl
Particlemotionvector
Shows how to support rendering motion vectors within the standard particle system of Unity.
Stars: ✭ 97 (-95.21%)
Mutual labels:  hlsl
Gshade
GShade is a heavily modified fork of ReShade that features numerous improvements as well as a selectively-unlocked depth buffer for specific online games.
Stars: ✭ 97 (-95.21%)
Mutual labels:  hlsl
Gpu Planetary Rendering
GPU atmosphertic scattering and planet generation in Unity 3D
Stars: ✭ 92 (-95.46%)
Mutual labels:  hlsl
Jplogistics c152
A MSFS Addon to improve the Cessna C152
Stars: ✭ 118 (-94.17%)
Mutual labels:  hlsl
Hlslexplorer
See how hardware understands your HLSL
Stars: ✭ 91 (-95.51%)
Mutual labels:  hlsl
Unity Raymarching Framework
A framework to easy implement raymarching in unity. Include lots of hash,noise,fbm,SDF,rotate functions
Stars: ✭ 129 (-93.63%)
Mutual labels:  hlsl
Stormshade
Custom reshade build (unlocked z-depth) + shader preset for Final Fantasy 14.
Stars: ✭ 83 (-95.9%)
Mutual labels:  hlsl
Cs2x
Transpiles a C# subset to non .NET languages and runtimes. (Powered by Roslyn)
Stars: ✭ 97 (-95.21%)
Mutual labels:  hlsl
Proccharvfx
Procedural character generation with Unity Shader Graph and VFX Graph
Stars: ✭ 114 (-94.37%)
Mutual labels:  hlsl
Glslang
Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.
Stars: ✭ 2,034 (+0.44%)
Mutual labels:  hlsl
Anisotropicstandardshader
A modified version of Unity's Standard Shader using an Anisotropic GGX BRDF.
Stars: ✭ 144 (-92.89%)
Mutual labels:  hlsl

DirectX Shader Compiler

Build status

The DirectX Shader Compiler project includes a compiler and related tools used to compile High-Level Shader Language (HLSL) programs into DirectX Intermediate Language (DXIL) representation. Applications that make use of DirectX for graphics, games, and computation can use it to generate shader programs.

For more information, see the Wiki.

Visit the DirectX Landing Page for more resources for DirectX developers.

Downloads

You can download the latest successful build's artifacts (built by Appveyor) for the master branch:

Downloads
Windows
Ubuntu

Features and Goals

The starting point of the project is a fork of the LLVM and Clang projects, modified to accept HLSL and emit a validated container that can be consumed by GPU drivers.

At the moment, the DirectX HLSL Compiler provides the following components:

  • dxc.exe, a command-line tool that can compile HLSL programs for shader model 6.0 or higher

  • dxcompiler.dll, a DLL providing a componentized compiler, assembler, disassembler, and validator

  • dxilconv.dll, a DLL providing a converter from DXBC (older shader bytecode format)

  • various other tools based on the above components

The Microsoft Windows SDK releases include a supported version of the compiler and validator.

The goal of the project is to allow the broader community of shader developers to contribute to the language and representation of shader programs, maintaining the principles of compatibility and supportability for the platform. It's currently in active development across two axes: language evolution (with no impact to DXIL representation), and surfacing hardware capabilities (with impact to DXIL, and thus requiring coordination with GPU implementations).

Pre-built Releases

Binary packages containing the output of this project are available from appveyor. Development kits containing only the dxc.exe driver app, the dxcompiler.dll, and the dxil.dll signing binary are available here, or in the releases tab.

SPIR-V CodeGen

As an example of community contribution, this project can also target the SPIR-V intermediate representation. Please see the doc for how HLSL features are mapped to SPIR-V, and the wiki page for how to build, use, and contribute to the SPIR-V CodeGen.

Building Sources

Note: If you intend to build from sources on Linux/macOS, follow these instructions.

Before you build, you will need to have some additional software installed. This is the most straightforward path - see Building Sources on the Wiki for more options, including Visual Studio 2015 and Ninja support.

After cloning the project, you can set up a build environment shortcut by double-clicking the utils\hct\hctshortcut.js file. This will create a shortcut on your desktop with a default configuration. If your system doesn't have the requisite association for .js files, this may not work. If so, open a cmd window and invoke: wscript.exe utils\hct\hctshortcut.js.

Tests are built using the TAEF framework which is included in the Windows Driver Kit.

To build, run this command on the HLSL Console.

hctbuild

You can also clean, build and run tests with this command.

hctcheckin

To see a list of additional commands available, run hcthelp

Running Tests

To run tests, open the HLSL Console and run this command after a successful build.

hcttest

Some tests will run shaders and verify their behavior. These tests also involve a driver that can run these execute these shaders. See the next section on how this should be currently set up.

Running Shaders

To run shaders compiled as DXIL, you will need support from the operating system as well as from the driver for your graphics adapter. Windows 10 Creators Update is the first version to support DXIL shaders. See the Wiki for information on using experimental support or the software adapter.

Hardware Support

Hardware GPU support for DXIL is provided by the following vendors:

NVIDIA

NVIDIA's r396 drivers (r397.64 and later) provide release mode support for DXIL 1.1 and Shader Model 6.1 on Win10 1709 and later, and experimental mode support for DXIL 1.2 and Shader Model 6.2 on Win10 1803 and later. These drivers also support DXR in experimental mode.

Drivers can be downloaded from geforce.com.

AMD

AMD’s driver (Radeon Software Adrenalin Edition 18.4.1 or later) provides release mode support for DXIL 1.1 and Shader Model 6.1. Drivers can be downloaded from AMD's download site.

Intel

Intel's 15.60 drivers (15.60.0.4849 and later) support release mode for DXIL 1.0 and Shader Model 6.0 as well as release mode for DXIL 1.1 and Shader Model 6.1 (View Instancing support only).

Drivers can be downloaded from the following link Intel Graphics Drivers

Direct access to 15.60 driver (latest as of of this update) is provided below:

Installer

Release Notes related to DXIL

Making Changes

To make contributions, see the CONTRIBUTING.md file in this project.

Documentation

You can find documentation for this project in the docs directory. These contain the original LLVM documentation files, as well as two new files worth nothing:

License

DirectX Shader Compiler is distributed under the terms of the University of Illinois Open Source License.

See LICENSE.txt and ThirdPartyNotices.txt for details.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].