added nearest neighbor texture mapping