diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2021-12-20 17:52:13 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-20 17:52:13 -0500 |
| commit | f813d5f20b3aa839a7865be483d4c89ac63d8e19 (patch) | |
| tree | c432ae382f663e7a168904208a7e4a8537e122b4 /docs | |
| parent | 407f1809821086afc520694e0a34e264679a6bb5 (diff) | |
Shader playground improvements (#2066)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Improve shader playground docs.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/shader-playground.md | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/docs/shader-playground.md b/docs/shader-playground.md index d95cc9fcd..e1187951b 100644 --- a/docs/shader-playground.md +++ b/docs/shader-playground.md @@ -3,8 +3,23 @@ Using Slang on Shader Playground A 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. -Using the Slang compiler is as simple as selecting 'Slang' from the list of compilers in box underneath 'Compiler #1'. The output of the Slang compilation is shown in the right hand panel with the default 'Output format' of HLSL. To see the input source compiled to GLSL, select 'GLSL' from the 'Output format' box. +Using 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. -To compile using the Slang language (as opposed to the default input language of HLSL) select 'Slang' from the combo box underneath 'Shader Playground'. It may be necessary to change the Entry Point name from 'PSMain' to 'computeMain' for successful compilation of the sample. +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. -For compute based shaders Slang can compile to C++, CUDA and PTX. Seeing this output is as simple as selecting the option via 'Output Format'. 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. |
