Metaprogramming
- Stack language intentionally simple
- Easy to verify implementation
- Easy to implement ``compiler backend''
- Suitable for metaprogramming
- No name/scope complications
- Subexpressions are composable
- Modularity constructs of host language can
be ``lifted'' into shader
- Can change shader programs dynamically
- Add-on toolkits can support syntactic sugar
- Extensible
- Vendor Q wants to add new feature to hardware
- Writes shader macro to simulate new feature
- Packages macro in function call in public library
- Detect Q's hardware: do something special
- Otherwise: Default shader program for compatibility