optimize gradient textures