that works faster if you just project the texture in view space upon the model instead of first coloring it and later on replacing the color. then you can have the texture stored in the model file and don't need to store it in your script.