# LoaderOptions

interface in `@dioramajs/glsl/loader`

```ts
import type { LoaderOptions } from '@dioramajs/glsl/loader'
```

Options of the webpack and Turbopack loader.

```ts
interface LoaderOptions extends Omit<ConvertOptions, 'filename' | 'name' | 'include'>
```

## Members

| Name | Type | Description |
| --- | --- | --- |
| `bindings?` | `{ [uniform: string]: Binding }` | Binding overrides by GLSL uniform name. |
| `colorSpace?` | `'srgb' \| 'linear'` | Colour space of the output. |
| `defaults?` | `{ [uniform: string]: ParamDefault }` | Default values of params by GLSL uniform name. |
| `dialect?` | `'auto' \| 'three' \| 'glsl3' \| 'shadertoy'` | GLSL flavour. `auto` infers it from the code. |
| `mode?` | `LoaderMode` | Defaults to the import query, else 'shader'. `entry` needs webpack's `resourceQuery`. |
| `outDir?` | `string` | Folder of the generated module, for relative `@texture` URLs. Default: the shader's. |
| `stage?` | `'auto' \| 'uv' \| 'color' \| 'position'` | What the shader changes. `auto` infers it from the code. |

Defined in [packages/glsl/src/loader.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/glsl/src/loader.ts#L13).
