A Tool for the Procedural Generation of Shaders using Interactive Evolutionary Algorithms
Elio Sasso, Daniele Loiacono, Pier Luca Lanzi
TL;DR
This work tackles the barrier designers face when crafting shaders by marrying Unity Shader Graph with an interactive evolutionary algorithm that seeds from existing shaders. The method uses a graph-based chromosome to evolve shader graphs through mutation and crossover, guided by user feedback via previews within the Unity editor. Key contributions include a native-graph representation for end-to-end evolution, domain-aware operators (e.g., Swap Noise Map), and a user-driven workflow offering both automated and manual control. Preliminary evaluation with design students suggests promising usability and diversity of generated shaders, with future work focusing on broader evaluation and open-sourcing to adapt to Unity updates.
Abstract
We present a tool for exploring the design space of shaders using an interactive evolutionary algorithm integrated with the Unity editor, a well-known commercial tool for video game development. Our framework leverages the underlying graph-based representation of recent shader editors and interactive evolution to allow designers to explore several visual options starting from an existing shader. Our framework encodes the graph representation of a current shader as a chromosome used to seed the evolution of a shader population. It applies graph-based recombination and mutation with a set of heuristics to create feasible shaders. The framework is an extension of the Unity editor; thus, designers with little knowledge of evolutionary computation (and shader programming) can interact with the underlying evolutionary engine using the same visual interface used for working on game scenes.
