A minimalistic WebGL2 wrapper that reduces boilerplate for managing shaders, textures, and framebuffers in procedural visualizations and simulations.
SwissGL is a minimalistic wrapper library for the WebGL2 JavaScript API designed to drastically reduce boilerplate code. It simplifies the management of GLSL shaders, textures, and framebuffers, making it easier to create procedural visualizations and GPGPU-style simulations directly in the browser.
Graphics programmers, creative coders, and developers building real-time visualizations, simulations, or computational projects with WebGL2 who want to avoid low-level API verbosity.
Developers choose SwissGL for its extreme simplicity and compact API, which allows rapid prototyping and complex GPU computations with minimal code, unlike more heavyweight WebGL frameworks.
SwissGL is a minimalistic wrapper on top of WebGL2 JS API. It's designed to reduce the amount of boilerplate code required to manage GLSL shaders, textures and framebuffers when making procedural visualizations or simulations.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The single glsl() function abstracts away most WebGL2 boilerplate, as shown in the quickstart example where drawing an animated gradient requires minimal code compared to raw WebGL2.
Implemented in under 1000 lines of JavaScript, making it easy to integrate, audit, and modify without adding bloat to projects.
Designed for general-purpose GPU computations, with features like texture history (story parameter) for efficient simulations, as demonstrated in the Particle Life demo.
Supports multiple shader formats from expressions to full vertex-fragment pairs, allowing for expressive and concise GLSL code, such as in the particle update shader.
The README explicitly states it's an early-stage experiment, incomplete and unstable, making it risky for production use without guarantees of updates or bug fixes.
Only draws tessellated plane primitives, as admitted in the API explanation, which restricts rendering complex geometries without extensive custom shader work.
No fallback for WebGL1 or older browsers, limiting compatibility in environments without WebGL2 support, which can exclude some user bases.