Begin implementing a new shader program generator system
ProgramBuilder is good enough when working within its standard features,
but it's difficult to expand. Custom variables are overly sensitive to
declration order. Adding loops or conditionals (other than the operator
flavor) requires using an additional shader. It's not possible to modify
a variable's expression without replicating it in its entirety.
All of the internal processing with coordinate spaces, interfaces and
indices can also be difficult to understand. Not to mention the reverse
processing order which starts from the goal variables and works backwards
to figure out how they can be computed.
The new ProgramCompiler system, as its name implies, works more like a
compiler. It's designed to take GLSL as input, apply transformations to
it and produce different GLSL as output. Storing the progrem as an
abstract syntax tree allows much more comprehensive processing than the
old system which barely understood what an identifier is.
At the moment it doesn't do much yet. The only transformation is to
split a single source file into vertex, geometry and fragment parts and
add a common section at the beginning of each of them. More will be
added soon.