# @dioramajs/glsl/convert

GLSL to TSL at build time, in Node.

## Functions and values

- [convert](/docs/api/glsl-convert/convert.md): Converts one GLSL stage into a `GlslShader` module.
- [convertParts](/docs/api/glsl-convert/convert-parts.md): Like `convert`, with the module also split into parts.
- [entryMeta](/docs/api/glsl-convert/entry-meta.md): Entry metadata of a stage and its pair. `main` (the imported file) wins over `other`.
- [entryModule](/docs/api/glsl-convert/entry-module.md): The `?entry` module: a lazy import of the effect with its metadata.
- [formatDiagnostic](/docs/api/glsl-convert/format-diagnostic.md): `wave.frag:12:5 error GLSL_INOUT message`, then the hint, the page of the code and the frame.
- [GlslError](/docs/api/glsl-convert/glsl-error.md): Thrown when a conversion fails. Carries every error, not just the first.
- [readInclude](/docs/api/glsl-convert/read-include.md): Default include reader: relative to the including file, then as a package path.

## Types

- [Converted](/docs/api/glsl-convert/types/converted.md): Result with the module split into parts, for loaders that inline stages.
- [ConvertOptions](/docs/api/glsl-convert/types/convert-options.md): Options of `convert`.
- [ConvertResult](/docs/api/glsl-convert/types/convert-result.md): What `convert` returns.
- [EntryMeta](/docs/api/glsl-convert/types/entry-meta.md): What a registry knows of a shader effect before its module loads: the `EffectEntry` fields other than `load`. Keys without a pragma are left out.
- [GlslCode](/docs/api/diorama-glsl/types/glsl-code.md): Codes of conversion diagnostics: errors, warnings and notes.
- [GlslDiagnostic](/docs/api/diorama-glsl/types/glsl-diagnostic.md): A problem or note found while converting GLSL.
- [IncludeReader](/docs/api/glsl-convert/types/include-reader.md): Gets the spec as written and the absolute path of the including file.
- [IncludeResult](/docs/api/glsl-convert/types/include-result.md): What an include reader returns: the code, the code with its path, or nothing.
