yum-mirror/slang

Making it easier to work with shaders

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

Bruce Mitchenerdocs: Reduce typo count (#5671)c3557978c

master
591 B9 linesraw

Derivatives In Compute

An entry point may be decorated with [DerivativeGroupQuad] or [DerivativeGroupLinear] to specify how to use derivatives in compute shaders.

GLSL syntax may also be used, but is not recommended (derivative_group_quadsNV/derivative_group_linearNV).

Targets:

  • SPIRV: Enables DerivativeGroupQuadsNV or DerivativeGroupLinearNV.
  • GLSL: Enables derivative_group_quadsNV or derivative_group_LinearNV.
  • HLSL: Does nothing. sm_6_6 is required to use derivatives in compute shaders. HLSL uses an equivalent of DerivativeGroupQuad.
1### Derivatives In Compute 
2An entry point may be decorated with `[DerivativeGroupQuad]` or `[DerivativeGroupLinear]` to specify how to use derivatives in compute shaders.
3
4GLSL syntax may also be used, but is not recommended (`derivative_group_quadsNV`/`derivative_group_linearNV`).
5
6Targets:
7* **_SPIRV:_** Enables `DerivativeGroupQuadsNV` or `DerivativeGroupLinearNV`.
8* **_GLSL:_** Enables `derivative_group_quadsNV` or `derivative_group_LinearNV`.
9* **_HLSL:_** Does nothing. `sm_6_6` is required to use derivatives in compute shaders. HLSL uses an equivalent of `DerivativeGroupQuad`.