Fixes non-glow rendering of first material rendered each frame.

Was previously incorrectly allowing per-frame render settings to
overwrite material settings if those materials were being cached from
one frame to another, in the shader render pipeline.

This fix invalidates the material cache after each render pass.  This
probably isn't the right behaviour -- better would be to stop mucking
with render settings between render calls, and leave the cache in place.
But this will do for the time being;  there are other, more pressing
matters to fix.