Files
CosmicEngine/lib/All/slang/share/doc/slang/gpu-feature/derivatives-in-compute/derivatives-in-compute.md

591 B

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.