---
title: "INTRINSIC_HELPERS: constant in Backends, TypeShade API"
description: "INTRINSIC_HELPERS, a constant in Backends. The helper functions an intrinsic's GLSL spelling calls, keyed by intrinsic id."
url: https://typeshade.dev/api/intrinsichelpers/
language: en
---

# `INTRINSIC_HELPERS`

Constant in Backends

The helper functions an intrinsic's GLSL spelling calls, keyed by intrinsic id.

`import { INTRINSIC_HELPERS } from 'typeshade'`

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

## Syntax

```ts
const INTRINSIC_HELPERS: Readonly<Record<string, { readonly fn: string; readonly def: string; }>>
```

## Description

`fn` is the name the spelling calls and `def` is the GLSL definition of that function. A GLSL writer must emit `def` for every listed intrinsic that a reachable function calls; otherwise the spelling calls a function the shader never defines. Each definition calls only GLSL builtins, so the definitions can be emitted in any order at the top of the function section, with no prototype. A helper that nothing calls compiles but adds bytes, so key the emit off the calls actually collected.

Only the GLSL target has helpers: WGSL indexes storage buffers directly. Exported from `typeshade`.

## Source

[`src/core/intrinsics.ts`, line 1101](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/intrinsics.ts#L1101), at commit af54ddad5
