Spliting Pic on a Material for Optimization

I think you want to use material functions for that.

HTH