yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
c3557978c
master
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
DerivativeGroupQuadsNVorDerivativeGroupLinearNV. - GLSL: Enables
derivative_group_quadsNVorderivative_group_LinearNV. - HLSL: Does nothing.
sm_6_6is required to use derivatives in compute shaders. HLSL uses an equivalent ofDerivativeGroupQuad.
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`.