optimization in texture creation