This prototype explores the manual translation of GLSL-like shaders from ShaderToy to C++. The goal is to define an empirical approach before considering a more automated solution (ie. GLSL -> SPIR-V -> JSON -> C++).
Beyond the technical challenge, this project is also an exercise in digital preservation.
Shaders from ShaderToy depend on WebGL, which itself relies on web browsers and GPU drivers. Given the commercial landscape as of year 2025, browsers are increasingly controlled by tech giants (well, Google actually), making WebGL's long-term survival uncertain. This approach also echoes early computer graphics history, as described in Pierre Hénon's work on French digital animation, when the rendering computer was separate from the display system.
- Broaden the manual GLSL -> C++ conversion (or even to C ?)
- Investigate automated conversion via SPIR-V
- Compile a collection of preserved shaders
Below is the result of a non-automated C++ translation of Flopine's Shadertoy titled Cubes are dancing
: