A Lisp to GLSL compiler that translates a Common Lisp-like dialect into shader code for graphics programming.
Varjo is a Lisp to GLSL compiler that translates the Vari dialect—a statically-typed subset of Common Lisp—into GLSL shader code. It solves the problem of writing complex GPU shaders by allowing developers to use Lisp's macro system, functions, and structures, making shader code more expressive and easier to maintain.
Graphics programmers and Lisp developers working on OpenGL or Vulkan projects who want to write shaders in a high-level, Lisp-based language instead of raw GLSL.
Developers choose Varjo because it integrates Lisp's metaprogramming capabilities with GLSL, offering type safety, cross-stage shader integration, and reduced boilerplate through shared structs and macros, all while remaining dependency-free from OpenGL for easy embedding in other tools.
Lisp to GLSL Language Translator
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports Common Lisp macros like defmacro and define-compiler-macro, allowing shader logic to be abstracted and reused, as highlighted in the features list for expressive GPU programming.
Enforces type checking both within and across shader stages, with rolling translation that automatically passes variables between stages, reducing errors in complex graphics pipelines.
Allows defstruct to be used across multiple shaders, minimizing code duplication and ensuring consistency in data structures, as noted in the README to reduce repeated code.
Designed without OpenGL dependencies for easy integration into projects like CEPL, and has an API for extension, though the README mentions it's still in progress.
The project is labeled BETA, with breaking changes noted in updates, such as the removal of ast and *draw-modes*, which can disrupt existing codebases and indicate instability.
First-class function support is restricted, requiring static resolution to avoid runtime conditionals, which limits dynamic shader programming and flexibility, as admitted in the features list.
Some features like declare support are WIP, and the validation code needs cleanup, showing immaturity; the API is also still in progress, making integration less straightforward.