Spire is a shading language and compiler framework that facilitates modular shader authoring and rapid exploration of shader optimization choices (such as frequency reduction and algorithmic approximation) afforded by modern real-time graphics engines. The current implementation of the Spire compiler can generate either GLSL or SPIR-V output for use with OpenGL and Vulkan based engines.
Paper: http://graphics.cs.cmu.edu/projects/spire/
For an example of intergrating Spire into a game engine, head to this repository: https://github.com/csyonghe/GameEngine