DERIVATIVE_INTRINSICS
Constant in Backends
The intrinsics whose value is a difference between neighbouring invocations, so WGSL requires uniform control flow at the call: the derivatives themselves and every sampling form that derives its level of detail implicitly.
import { DERIVATIVE_INTRINSICS } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
const DERIVATIVE_INTRINSICS: ReadonlySet<string>Description
Derived from the catalogue above rather than listed, so a sampling id added there joins by
construction: every textureSample… id that is not an explicit-Level or Grad form needs
the implicit LOD, and dpdx / dpdy / fwidth and their Coarse and Fine variants are
the derivative. textureSampleLevel, textureSampleGrad and textureSampleCompareLevel
carry the level the author wrote and are therefore legal anywhere — which is why the
diagnostic for one of these names them as the fix.
Not the same question as fragment-only-builtin’s FRAGMENT_ONLY_IDS, which asks which
stage may reach an id and carries a per-id fix string; that map is a subset of this set,
pinned by a test rather than derived, because a fix sentence is written, not computed.
Source
src/core/intrinsics.ts, line 1175, at commit 26de7be8