I must have misunderstood something with shaders:
I thought that as you can attach multiple shaders to one program, you\'d be able to simply attach more than one fra
You can have multiple programs in a shader, but not the other way around.
To make multiple combinations, the easiest way is to store each major chunk as a fragment with a named entry point, then include them from another program or combine them at runtime into a single program, calling them in the order you need. That can get messy though, when handling input and outputs.
You can use multiple passes, with different effects and programs in each pass. That has some additional overhead, but can be easier to set up.