Skip to content

Remove empty reflection doc, update links to go to ReadTheDocs #134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 30, 2025
Merged
10 changes: 5 additions & 5 deletions docs/coming-from-hlsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ T max4(T x, T y, T z, T w)
{{ somemarkdown | markdownify }}
</td></tr></table>

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
Expand Down Expand Up @@ -242,7 +242,7 @@ MyStruct operator+(MyStruct lhs, MyStruct rhs)
{{ somemarkdown | markdownify }}
</td></tr></table>

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.
Expand Down Expand Up @@ -283,7 +283,7 @@ struct MyType
{{ somemarkdown | markdownify }}
</td></tr></table>

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
Expand Down Expand Up @@ -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
Expand All @@ -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]
Expand Down
14 changes: 7 additions & 7 deletions docs/compilation-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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<slang::CompilerOptionEntry, 1> options =
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
----------------
Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ intro_image_hide_on_mobile: false
<p>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 <a
href="https://shader-slang.com/slang/user-guide/convenience-features.html#pointers-limited">pointers</a> when generating
SPIR-V. Slang's <a href="/slang/user-guide/capabilities.html">capability
href="https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/03-convenience-features.html#pointers-limited">pointers</a> when generating
SPIR-V. Slang's <a href="https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/05-capabilities.html">capability
system</a> 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 <a
href="https://shader-slang.com/slang/user-guide/a1-04-interop.html">flexible
href="https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/a1-04-interop.html">flexible
interop</a> features to enable directly embedding target code or SPIR-V into generated shaders.</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/parameter-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 0 additions & 10 deletions docs/reflection-api.md

This file was deleted.

6 changes: 3 additions & 3 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<a href="/slang/user-guide/convenience-features.html#pointers-limited">pointers</a> when generating
<a href="https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/03-convenience-features.html#pointers-limited>pointers</a> when generating
SPIR-V.
Slang's <a href="/slang/user-guide/capabilities.html">capability system</a> helps applications
Slang's <a href="https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/05-capabilities.html">capability system</a> 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 <a href="/slang/user-guide/a1-04-interop.html">flexible
final code. Additionally, Slang provides <a href="https://docs.shader-slang.org/en/latest/external/slang/docs/user-guide/a1-04-interop.html">flexible
interop</a>
features to enable
directly embedding target code or SPIR-V into generated shaders.
Expand Down