changing pp to use texture arrays