Sh is a programming language built on top of C++. It can be used to write shaders that run on top of modern graphics processing units (GPUs), or write stream programs that run on GPUs or CPUs. It is implemented as a C++ library, and allows programs to be generated at run-time using a number of metaprogramming techniques. Variants of programs for different cases can easily be generated, or programs can be generated entirely at run-time from some input data. The system is cleanly separated into a frontend and backend, and is hence portable.