make texture loading more intelligent