# ShaderScope

interface in `@dioramajs/diorama/glsl`

```ts
import type { ShaderScope } from '@dioramajs/diorama/glsl'
```

Nodes a shader's `build` reads.

```ts
interface ShaderScope
```

## Members

| Name | Type | Description |
| --- | --- | --- |
| `box` | `Node<'vec2'>` | Box UV before transforms (gl_FragCoord). |
| `fragCoord` | `Node<'vec4'>` | gl_FragCoord in CSS px of the box. |
| `functions` | `{ [name: string]: ShaderFunction }` | TSL bodies of GLSL prototypes by name. |
| `position` | `Node<'vec3'> \| undefined` | Position stage only: the vertex in the plane's local unit square. |
| `uniforms` | `{ [name: string]: Node \| SamplerLike }` | Uniform nodes and samplers by GLSL name. |
| `uv` | `Node<'vec2'>` | Box UV after earlier uv transforms, or the plane UV in a position stage. |
| `varyings` | `{ [name: string]: Node }` | Varying nodes by GLSL name. |

Also exported from `@dioramajs/glsl`.

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