small optimization
Merge pull request #3609 from ZappoMan/groupMaterialsRendering

small optimization to model rendering