diff --git a/docs/coming-from-hlsl.md b/docs/coming-from-hlsl.md index 361eecc..3835c6a 100644 --- a/docs/coming-from-hlsl.md +++ b/docs/coming-from-hlsl.md @@ -179,7 +179,7 @@ T max4(T x, T y, T z, T w) {{ somemarkdown | markdownify }} -For more detailed explanations on defining a custom interface, please refer to the [Slang User's Guide](https://shader-slang.com/slang/user-guide/interfaces-generics.html). +For more detailed explanations on defining a custom interface, please refer to the [Slang User's Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/06-interfaces-generics.html). #### `#pragma` for DXC wouldn't work for Slang @@ -242,7 +242,7 @@ MyStruct operator+(MyStruct lhs, MyStruct rhs) {{ somemarkdown | markdownify }} -For more details, please consult the [Slang User's Guide](https://shader-slang.com/slang/user-guide/convenience-features.html#operator-overloading) +For more details, please consult the [Slang User's Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/03-convenience-features.html#operator-overloading) #### Subscript Operator Slang uses a different syntax for overloading subscript operator so both reads and writes to a subscript location can be defined. @@ -283,7 +283,7 @@ struct MyType {{ somemarkdown | markdownify }} -For more details, please consult the [Slang User's Guide](https://shader-slang.com/slang/user-guide/convenience-features.html#subscript-operator). +For more details, please consult the [Slang User's Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/03-convenience-features.html#subscript-operator). #### Implicit parameter binding @@ -325,7 +325,7 @@ Due to this difference, some casting issues may appear as errors while migrating #### SPIR-V target specific functionalities -When you target SPIR-V, there are a few things that the user may want to know. Please check the [Slang User's Guide](https://shader-slang.com/slang/user-guide/spirv-target-specific.html) for more details. +When you target SPIR-V, there are a few things that the user may want to know. Please check the [Slang User's Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/a2-01-spirv-target-specific.html) for more details. ### Debugging and Performance Tips @@ -337,7 +337,7 @@ When debugging Slang shaders, disabling optimizations can simplify the debugging Slang offers a command-line option to emit or suppress `#line` directives when targeting C-like text formats such as HLSL, GLSL, Metal, and WGSL. When `#line` directives are emitted, they can assist in debugging with shader debugging tools, as these tools can correlate back to the original Slang shader. -For more information, please refer to `LineDirectiveMode` in the [Slang User's Guide](https://shader-slang.com/slang/user-guide/compiling.html). +For more information, please refer to `LineDirectiveMode` in the [Slang User's Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/08-compiling.html). #### Experiment with [ForceInline] diff --git a/docs/compilation-api.md b/docs/compilation-api.md index 9910b81..29f0924 100644 --- a/docs/compilation-api.md +++ b/docs/compilation-api.md @@ -13,7 +13,7 @@ This tutorial explains the flow of calls needed to use the Slang Compilation API Using the compilation API offers much more control over compilation compared to `slangc`, and with better performance as well. For applications with complex needs, or ones that are sensitive to compilation performance, it is recommneded to use the Compilation API. -The Slang compilation API is provided as a dynamic library. Linking to it, you have access to the compilation API which is organized in a Component Object Model (COM) fashion. The Slang [User Guide](https://shader-slang.com/slang/user-guide/compiling.html#using-the-compilation-api) describes Slang's "COM-lite" interface a bit more. +The Slang compilation API is provided as a dynamic library. Linking to it, you have access to the compilation API which is organized in a Component Object Model (COM) fashion. The Slang [User Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/08-compiling.html#using-the-compilation-api) describes Slang's "COM-lite" interface a bit more. ## Table of Contents @@ -96,7 +96,7 @@ Slang supports using the preprocessor. ##### Compiler options -Here is where you can specify Session-wide options. Check the [User Guide](https://shader-slang.com/slang/user-guide/compiling.html#compiler-options) for info on available options. +Here is where you can specify Session-wide options. Check the [User Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/08-compiling.html#compiler-options) for info on available options. ```cpp std::array options = @@ -168,7 +168,7 @@ A common way to query an entry-point is by using the `IModule::findEntryPointByN ``` It is also possible to query entry-points by index, and work backwards to check the name of the entry-points that are returned at different indices. -Check the [User Guide](https://shader-slang.com/slang/user-guide/reflection.html#program-reflection) for info. +Check the [User Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/09-reflection.html#program-reflection) for info. #### Compose Modules and Entry Points @@ -291,19 +291,19 @@ Modules are loaded into the session as described in [Load Modules](#load-modules Slang offers the capability to save modules to disk after this initial processing, allowing for faster initial module load times. -API methods for module precompilation are described in the [User Guide](https://shader-slang.com/slang/user-guide/link-time-specialization.html#using-precompiling-modules-with-the-api). +API methods for module precompilation are described in the [User Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/10-link-time-specialization.html#using-precompiling-modules-with-the-api). Specialization -------------- #### Link-time Constants -This form of specialization involves placing relevant constant definitions in a separate Module that can be selectively included. For example, if you have two variants of a shader that differ in constants that they use, you can create two different Modules for the constants, one for each variant. When composing one variant or the other, just select the right constants module in createCompositeComponentType(). This is described also in the [User Guide](https://shader-slang.com/slang/user-guide/link-time-specialization.html#link-time-constants) +This form of specialization involves placing relevant constant definitions in a separate Module that can be selectively included. For example, if you have two variants of a shader that differ in constants that they use, you can create two different Modules for the constants, one for each variant. When composing one variant or the other, just select the right constants module in createCompositeComponentType(). This is described also in the [User Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/10-link-time-specialization.html#link-time-constants) #### Link-time Types Similar to Link-time Constants. This form of specialization simply puts different versions of user types in separate modules so that the needed implementation can be selected when creating the CompositeComponentType. -[User Guide](https://shader-slang.com/slang/user-guide/link-time-specialization.html#link-time-types) +[User Guide](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/10-link-time-specialization.html#link-time-types) #### Generics Specialization @@ -679,7 +679,7 @@ An `IMetaData` interface can be queried from a compiled program. After `getEntry isUsed); ``` -See [Reflection API Tutorial](https://shader-slang.com/slang/docs/reflection-api) for more details. +See [Using the Reflection API](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/09-reflection.html) for more details. Complete Example ---------------- diff --git a/docs/getting-started.md b/docs/getting-started.md index ea5f522..47cc1d2 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -49,12 +49,12 @@ intro_image_hide_on_mobile: false

Slang code is highly portable, but can still leverage unique platform capabilities, including the latest features in Direct3D and Vulkan. For example, developers can make full use of pointers when generating - SPIR-V. Slang's capability + href="https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/03-convenience-features.html#pointers-limited">pointers when generating + SPIR-V. Slang's capability system helps applications manage feature set differences across target platforms by ensuring code only uses available features during the type-checking step, before generating final code. Additionally, Slang provides flexible + href="https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/a1-04-interop.html">flexible interop features to enable directly embedding target code or SPIR-V into generated shaders.

diff --git a/docs/parameter-blocks.md b/docs/parameter-blocks.md index 84f86ff..92126ee 100644 --- a/docs/parameter-blocks.md +++ b/docs/parameter-blocks.md @@ -545,7 +545,7 @@ The approach we will describe here is only appropriate for applications that abi In the absence of manual annotation, the Slang compiler will bind parameters to locations in a deterministic fashion, and an application can simply mirror that deterministic logic in its own code in order to derive the locations that parameters have been bound to. Applications that need to support the fully general case (including shader code with manual binding annotations) can still make use of parameter blocks. -In such cases, developers are encouraged to read the other [documentation](user-guide/reflection) that exists for the Slang reflection API. +In such cases, developers are encouraged to read the other [documentation](https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/09-reflection.html) that exists for the Slang reflection API. This section will also restrict itself to the Vulkan API, for simplicity. We cover the creation of descriptor set layouts and pipeline layouts using reflection, but *not* the task of writing to them. diff --git a/docs/reflection-api.md b/docs/reflection-api.md deleted file mode 100644 index afe9e29..0000000 --- a/docs/reflection-api.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Using the Slang Reflection API -layout: page -description: Using the Slang Reflection API -permalink: "/docs/reflection-api/" -intro_image_absolute: true -intro_image_hide_on_mobile: false ---- - -[//]: # (TODO: write documentation on reflection API here, and update link in docs/index.md) \ No newline at end of file diff --git a/index.md b/index.md index 4fe0acf..6cc727d 100755 --- a/index.md +++ b/index.md @@ -95,16 +95,16 @@ description: Empowering real-time graphics developers with advanced language fea latest features in Direct3D and Vulkan. For example, developers can make full use of - pointers when generating + capability system helps applications + Slang's capability system helps applications manage feature set differences across target platforms by ensuring code only uses available features during the type-checking step, before generating - final code. Additionally, Slang provides flexible + final code. Additionally, Slang provides flexible interop features to enable directly embedding target code or SPIR-V into generated shaders.