Diorama

Made for a big screen.

This site is one 3D scene, built for a computer: a wide window and a mouse. Open dioramajs.dev on a desktop or a laptop to see it.This site is one 3D scene, built for a wide window. Make this one wider, or open dioramajs.dev on a larger screen.

GitHub

DioramaDocs

@dioramajs/glsl/convert

GLSL to TSL at build time, in Node.

View as Markdown
On this page
import { convert, convertParts, entryMeta } from '@dioramajs/glsl/convert'

Functions

convertConverts one GLSL stage into a `GlslShader` module.
convertPartsLike `convert`, with the module also split into parts.
entryMetaEntry metadata of a stage and its pair. `main` (the imported file) wins over `other`.
entryModuleThe `?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.
readIncludeDefault include reader: relative to the including file, then as a package path.

Classes

GlslErrorThrown when a conversion fails. Carries every error, not just the first.

Interfaces

ConvertedResult with the module split into parts, for loaders that inline stages.
ConvertOptionsOptions of `convert`.
ConvertResultWhat `convert` returns.
EntryMetaWhat a registry knows of a shader effect before its module loads: the `EffectEntry` fields other than `load`. Keys without a pragma are left out.
GlslDiagnosticA problem or note found while converting GLSL.

Types

GlslCodeCodes of conversion diagnostics: errors, warnings and notes.
IncludeReaderGets the spec as written and the absolute path of the including file.
IncludeResultWhat an include reader returns: the code, the code with its path, or nothing.