auto resize for texture support