implemented first pass texture mapping on the rects