glsl-transpiler

JSON →
library 2.0.21 ·javascript
verified May 1, 2026

Transforms GLSL shader source code into optimized JavaScript, converting vectors and matrices to arrays, expanding swizzles, and applying expression optimizations. The latest version (2.0.21) ships as an ESM package with optional CommonJS support. It works both as a programmatic API and as a stream transform, integrating with glsl-parser and glsl-tokenizer. Key differentiators include runtime variable replacement for uniforms/attributes/varyings, built-in stdlib for environment compatibility, debug facilities (print/show), and support for GLSL ES 100 and 300. Alternatives like glsl.js or raw string manipulation lack its AST-level optimization and streaming pipeline. The package is a fork of the original stackgl/glsl-transpiler with ongoing maintenance.

total hits 10
actors 3 distinct systems
last hit 5d ago AhrefsBot
MetaBot
3
GPTBot
2
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇧🇷 Brazil · 🇸🇬 Singapore