This approach only works if the other person realizes they're being rude/obnoxious. If they're not self-aware enough to know that, they're just going to interpret your friendliness as a sign that you enjoy being around them...
Almost every time, after enough repeated interactions like this, it's as though these regulars forgot that they didn't like me. They would see me and light up, or they would eventually thaw out and start putting more consideration into the way they interacted with me.
Whatever their inclinations for acting unpleasant may have been, I rarely, if ever, had anyone not come around and act more personable after enough friendly encounters with me.