partial optimization of core pass loop : use linked lists instead of arrays for shader list, sort by shader in a given pass.