Ad hoc way dealing with multi-pass rendering.

Need to refactor the material multi-pass system in a few months.