Skip to content

11 shader lab

aivrar edited this page Sep 8, 2026 · 1 revision

Shader Lab

Shader Lab authors standard GLSL, compact Twigl-style shaders, and visual-only Shadertoy pass graphs. Playback starts automatically and follows live template and runtime changes.

Left heading: Shader Lab

Subtitle: “Write standard GLSL, compact Twigl-style shaders, or visual-only Shadertoy Image and Buffer A-D graphs. Playback starts automatically and follows live template and runtime changes.”

Shader source editor and the compiled live preview.

Shader source editor and the compiled live preview.

Creative workspace: Twigl Lab and Shadertoy Lab

Label Creative workspace. Combo values:

Label Meaning
Twigl Lab Standard GLSL plus all 12 Twigl regulation/runtime combinations (WebGL 1, GLSL ES 3, MRT).
Shadertoy Lab Image and Buffer A-D graphs with four visual input channels per pass.

Seeded build actions work in both Twigl Lab and Shadertoy Lab and share locations/global-control behavior with the other visual tabs.

The 86-starter catalog includes 27 detailed visual families supplied in both forms, plus Twigl regulation/runtime starters, Shadertoy pass-graph examples, and a stateful Ginzburg–Landau simulation.

Shader Lab in Shadertoy Lab mode.

Shader Lab in Shadertoy Lab mode.

Curated starter library

Control Role
Category Filter starters.
Search Names, categories, descriptions.
Template combo Selecting a template loads it immediately into the live preview.
Count label N starters.

Source & render buttons

Button Role
Compile on GPU Fragment/link/pass diagnostics. A failed candidate never replaces the last valid runtime or preview.
Render final output Shared deterministic frame-packet pipeline at Exact output settings, then Resources policy. Not a browser recorder.
Reset workspace Reset shader project toward the workspace default (see also Reset all to baseline).
Cancel render Stop preview playback or final render.

WebGL 1/2, RGBA8/16F/32F targets, normalized mouse position, and MRT attachment 0/1 are explicit. Shader Lab reports the active target when the GPU must fall back.

Quick tools

Same family as the other visual tabs:

Generate any, Generate this, Mutate, Intensify, Simplify, Next palette, Next motion, Harmonize, Lock seed, New seed.

Generate any chooses from the detailed library for the active lab.

Also:

Button Role
Import JSON Load a Shader Lab / Shadertoy JSON project. Enters Safe Mode.
Paste Raw GLSL into the current editor or selected Shadertoy pass, or a complete JSON project. Clipboard imports enter Safe Mode.
Export JSON Save the project.
Copy for Shadertoy Shadertoy Lab only.

Shader Lab quick tools.

Shader Lab quick tools.

Shadertoy Quick Create

Expander Shadertoy Quick Create (visible in Shadertoy Lab). Specialized 8-pattern / 5-motion / 15-palette / 3-detail recipe. Dropdowns define a recipe; Generate replaces the current shader. Random idea fills the dropdowns.

Import public shader link

Expander Import public shader link.

Paste a public Twigl, FragCoord, Sledit WebGL, or Shadertoy link. Import URL runs the import.

Imported work starts in Safe Mode. Inspect it, then press Compile on GPU before relying on playback. Shadertoy links need a session-only API token (never saved in the project or draft). WGSL/WebGPU links are identified but cannot execute on the current WebGL runtime.

Helper text: imports are bounded, visual-only, and enter Safe Mode.

Import public Shadertoy ID

Expander Import public Shadertoy ID. Import ID plus the session token.

Visual Shadertoy media is embedded locally. Audio, Sound, Cubemap, and VR inputs are skipped.

Saved shader library

Expander Saved shader library. Local versioned library:

Save new, Update, Load, Delete.

Invalid library files are quarantined instead of preventing Videos from opening.

Motion & view, pointer, curves

Heading Motion & view (same order in both labs): animation speed 0x16x, static rotation, rotation speed, view zoom 0.05x24x, zoom-pulse speed, zoom-pulse depth. Speed changes shader motion but never stretches Exact output duration. 0x pauses shader time.

Expander Pointer input — normalized mouse.

Expander Animation curves — shared curve editor on eligible values.

Twigl mode combo: all four Twigl regulations across WebGL 1, GLSL ES 3, and MRT.

Previous-frame backbuffer — Standard/Twigl projects can use a deterministic previous-frame backbuffer. Enabling persistent or forward feedback switches execution to sequential stateful rendering.

Shadertoy projects expose Common, Image, and Buffer A–D with four validated visual channels per pass (procedural/image/video/webcam/keyboard where supported). Audio, Sound/Cubemap/VR passes, and network-at-render-time dependencies are out of scope for this visual-only phase.

Editor

“Edit the active fragment source. Shadertoy Lab adds Common, Buffer A-D, Image, and four visual input channels per pass.”

Format current source pretty-prints the editor.

Per-channel: Flip Y, Mipmaps, Choose local visual, Clear file.

Checkbox Safe mode metadata for imported/shared projects.

Expander Description, license & attribution.

Reset all to baseline

Reset all to baseline restores Shader Lab motion, view, and uniform parameters to baseline without replacing shader source, passes, exact-output settings, or post effects.

Exact output and Color studio

Same shared cards as the other procedural workspaces. Render final output bakes Color studio & post effects into the published clip.

Continue: Resources for output policy, or Auto Builder to batch Shader Lab jobs.

Additional control views

Twigl workspace example

Shader Lab in Twigl Lab mode.

Shadertoy Quick Create example

Shadertoy Quick Create expanded.

Clone this wiki locally