@dioramajs/glsl/convert
GLSL to TSL at build time, in Node.
On this page
import { convert, convertParts, entryMeta } from '@dioramajs/glsl/convert'Functions
convert | Converts one GLSL stage into a `GlslShader` module. |
convertParts | Like `convert`, with the module also split into parts. |
entryMeta | Entry metadata of a stage and its pair. `main` (the imported file) wins over `other`. |
entryModule | The `?entry` module: a lazy import of the effect with its metadata. |
formatDiagnostic | `wave.frag:12:5 error GLSL_INOUT message`, then the hint, the page of the code and the frame. |
readInclude | Default include reader: relative to the including file, then as a package path. |
Classes
GlslError | Thrown when a conversion fails. Carries every error, not just the first. |
Interfaces
Converted | Result with the module split into parts, for loaders that inline stages. |
ConvertOptions | Options of `convert`. |
ConvertResult | What `convert` returns. |
EntryMeta | 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. |
GlslDiagnostic | A problem or note found while converting GLSL. |
Types
GlslCode | Codes of conversion diagnostics: errors, warnings and notes. |
IncludeReader | Gets the spec as written and the absolute path of the including file. |
IncludeResult | What an include reader returns: the code, the code with its path, or nothing. |