GLSL Problem: Multiple shaders in one program
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 fragment shader, as an example: A crate texture rendered with a color modulation and refraction. But apparently this is not the case, as you can have only one main function per program. How can I work around the main function limit and allow for any dynamic combination of multiple fragment shaders which are in the same program and called after each other? You can have a set of entry points pre-defined. Suppose you have a limited number