Skip to content

Repository files navigation

GLSL Editor

Browser-based GLSL shader editor with live WebGL preview, published by 10k24 Studio.

Write a fragment shader, see it render instantly. Works with plain GLSL (gl_FragColor) and Shadertoy-style shaders (mainImage + iTime, iResolution, etc.) — paste Shadertoy code and it just runs.

Features

  • Live preview — debounced recompile on every keystroke, WebGL2 with WebGL1 fallback
  • Shadertoy compatibility — mainImage entry point with the full set of i* uniforms wired up
  • Inline docs — hover a line for plain-English explanations of GLSL built-ins and Shadertoy patterns
  • Autocomplete — GLSL + Shadertoy-aware completions (toggle in header)
  • Define toggles — flag-style #defines get checkboxes; flip dead code without editing
  • Preprocessor — client-side #ifdef/#else/#endif branch stripping with line numbers preserved
  • Error surfacing — compile errors mapped back to your source lines (gutter markers + overlay)
  • GPU watchdog — pauses rendering if a frame hangs, protecting the page from pathological shaders

Development

bun install
bun run dev        # dev server on :3000
bun run typecheck  # tsc --noEmit
bun run build      # production build → docs/
bun run preview    # serve the production build

Deployment

bun run build outputs the static site to docs/ (CNAME + brand assets included). Commit docs/ and push — GitHub Pages serves it from the main branch /docs folder at glsl.10k24.com, same convention as 10k24.github.io.

The committed .nojekyll marker tells Pages to skip its default Jekyll build, which would otherwise mangle the static output.

Do not point Pages at the repo root: hosts serve .ts source as video/mp2t, which browsers refuse to execute as module scripts.

License

LGPL-2.1 — see LICENSE.

About

WIP: GLSL editor with line by line explanations

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages