# SurfaceInput

interface in `@dioramajs/diorama/effects`

```ts
import type { SurfaceInput } from '@dioramajs/diorama/effects'
```

Input of a colour transform. The final alpha is then multiplied by `u.opacity` and the clip mask.

```ts
interface SurfaceInput
```

## Members

| Name | Type | Description |
| --- | --- | --- |
| `box` | `Node<'vec2'>` | Box UV before transforms. |
| `radius` | `Node<'float'>` | border-radius mask at box UV. `sample()` includes it; a transform drawing its own colour multiplies by it. |
| `uv` | `Node<'vec2'>` | Box UV after all `uv` transforms. |
| `sample` | `sample(uv: Node<'vec2'>): Node<'vec4'>` | The element's media at box UV with crop, contain and radius masks applied; `vec4(0)` without media. |

Also exported from `@dioramajs/effects`.

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