yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

jsmall-nvidiaShader playground improvements (#2066)f813d5f20

master
1.1 KiB25 linesraw

Using Slang on Shader Playground

A fast and simple way to try out Slang is by using the Shader Playground website. This site allows easy and interactive testing of shader code across several compilers including Slang without having to install anything on your local machine.

Using the Slang compiler is as simple as selecting 'Slang' from the box in the top left corner from the Shader Playground. This selects the Slang language for input, and the Slang compiler for compilation. The output of the compilation is shown in the right hand panel.

The default 'Output format' is HLSL. For graphics shaders the 'Output format' can be changed to

  • DXIL
  • SPIR-V
  • DXBC
  • HLSL
  • GLSL

Additionally for compute based shaders it can be set to

  • C++
  • CUDA
  • PTX

For binary formats (such as DXIL/SPIR-V/DXBC) the output will be displayed as the applicable disassembly.

Note that C++ and CUDA output include a 'prelude'. The prelude remains the same across compilations, with the code generated for the input Slang source placed at the very end of the output.

1Using Slang on Shader Playground
2================================
3
4A fast and simple way to try out Slang is by using the [Shader Playground](http://shader-playground.timjones.io/) website. This site allows easy and interactive testing of shader code across several compilers including Slang without having to install anything on your local machine.
5
6Using the Slang compiler is as simple as selecting 'Slang' from the box in the top left corner from the [Shader Playground](http://shader-playground.timjones.io/). This selects the Slang language for input, and the Slang compiler for compilation. The output of the compilation is shown in the right hand panel.
7
8The default 'Output format' is HLSL. For graphics shaders the 'Output format' can be changed to
9
10* DXIL 
11* SPIR-V
12* DXBC
13* HLSL
14* GLSL
15
16Additionally for compute based shaders it can be set to
17
18* C++
19* CUDA
20* PTX
21
22For binary formats (such as DXIL/SPIR-V/DXBC) the output will be displayed as the applicable disassembly.
23
24Note that C++ and CUDA output include a 'prelude'. The prelude remains the same across compilations, with the code generated for the input Slang source placed at the very end of the output. 
25