Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

GLML

A ML for fragment shaders

GLML (OpenGL Meta Language) is a small functional language aimed at signed-distance fields, raymarchers, and procedural coloring. It brings Hindley-Milner inference, algebraic data types, closures, recursion, ad-hoc polymorphism; all of the features from classic ML languages like OCaml to shaders. GLML compiles to GLSL, with the ML features erased at compile time.

  • Try the Playground in the browser, with examples provided!
  • For those familiar with ML syntax, Overview and Type System cover new material, but the browsing the playground’s examples are the quickest way to learn (for now)
  • Install and Source

Playground