# convert

function in `@dioramajs/glsl/convert`

```ts
import { convert } from '@dioramajs/glsl/convert'
```

Converts one GLSL stage into a `GlslShader` module.

```ts
function convert(source: string, options?: ConvertOptions): ConvertResult
```

| Parameter | Type | Description |
| --- | --- | --- |
| `source` | `string` |  |
| `options?` | `ConvertOptions` |  |

Throws With every error diagnostic of the stage; `diagnostics` holds the codes.

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