Live-coding environment

Polymorphic

Polymorphic is a graph-based shader composition language and a live-coding environment for it. Programs compile to GPU render passes and run in the browser.

  • Free
  • Browser, installable PWA
  • WebGL2 and WebGPU
  • Desktop: macOS, Windows, Linux
Polymorphic with a program on the left over a full-page shader canvas and the documentation panel open on the right
Polymorphic: the program floats over the full-page canvas, with the built-in documentation panel open.

Overview

Polymorphic is the composition language of the Noisemaker engine. A program chains effects with dots and writes the result to an output surface. It compiles to a directed graph of render passes that run as GLSL on WebGL2 or WGSL on WebGPU.

The Polymorphic app is a live-coding environment for the language. The shader fills the page, and the editor floats above it. The canvas updates as you type. Noisedeck compositions are Polymorphic programs, so code moves between the two apps.

The Book of Polymorphic DSL is an illustrated reference to over 100 effects. Every page is a running program that you can edit in place and open in Polymorphic.

Features

Specifications

PlatformsWeb browser, installable as a PWA with offline support; desktop app for macOS (Apple Silicon), Windows, Linux
RenderingWebGL2 (default) and WebGPU
InputsMicrophone, MIDI (CC and clock), webcam, screen capture, images, video, text
OutputWebM video, PNG and JPG stills, short share links, Syphon, Spout, NDI, and camera output through Sync
LanguagePolymorphic DSL, compiled to GLSL (WebGL2) or WGSL (WebGPU) render passes
Custom effectsPortable Effects Format (Portable)
URL parameters?dsl= loads a program, ?code= loads a shared sketch, ?backend=webgpu selects the backend, ?embed=1 gives a chromeless canvas for iframes
PriceFree in the browser. The desktop app is included with Noisedeck Forever.

Get started

  1. Open polymorphic.noisedeck.app.
  2. Type search synth and noise().write(o0) to render a noise pattern.
  3. Add effects with dots, for example noise().palette().lighting().write(o0).
  4. Press ? for the keyboard shortcuts, or open the Book to browse effects.

Resources

Questions

What is the difference between Polymorphic and Noisedeck?
Both use the same language and engine. Noisedeck is a visual editor with controls for each effect. Polymorphic is a code-first live-coding environment. A Noisedeck composition is a Polymorphic program.
What does a Polymorphic program look like?
Effects chain with dots and write to an output surface. For example, noise().palette().lighting().write(o0) generates noise, colors it, lights it, and writes it to surface o0.
Is Polymorphic free?
Yes. Polymorphic is free in the browser. The desktop app is included with Noisedeck Forever.
What is The Book of Polymorphic DSL?
An illustrated reference to over 100 Noisemaker effects. Each page is a full-screen running program with an explanation of its shader, and you can edit it in place or open it in Polymorphic.