I'm trying to identify a story that I first read in an anthology in the mid-1980s. Checked it out from a library in Indiana. I have a very vague idea that this story might have been credited to Gordon R. Dickson -- but don't bet the farm on that. Approximately 35 years later, I could easily be wrong, and I haven't noticed it in any of the collections of Dickson stories which I have purchased and read within the last twenty years or so.
The story is written in the third person, but with one person as the main viewpoint character from start to finish. Let's call him "Protagonist." I think he has been traveling alone, in a small spaceship, and somehow ends up stuck on a primitive planet which was populated by humans. Descendants of a "lost colony," perhaps? I don't remember that for a fact, but I know it was obvious that Protagonist had never heard of these people and their cultural peculiarities before, and they didn't seem to be familiar with any offworld cultures, either, so it seems likely that they were completely out of touch with the other human-inhabited worlds. I'm almost certain that these local humans did not have any form of space travel, and possibly they did not even remember that such things as spaceships had ever existed.
Protagonist walks into a nearby town and begins trying to make friends. There appear to be two categories of people in this town, wearing very different clothing styles. It takes him some time to realize he is seeing two separate cultures who are oblivious to one another's existence!
I don't recall the exact excuse that was finally established, but this was not just an affectation. All members of Culture A are somehow psychologically blind to Culture B's existence, and vice versa, even though they all live in or near the same small city. Protagonist probably wonders if everyone is pulling an elaborate practical joke on him at first, but finally realizes that he is literally the only person who can consciously perceive members of both cultures at once. Once he's convinced of that fact, he deduces that the typical native must still possess a subconscious awareness of the physical location of any nearby members of the other culture, because Protagonist notes he doesn't observe members of the two cultures frequently colliding with each other in doorways, or failing to squeeze past each other in the middle of a busy street, or anything along those lines. (Also, one presumes that this subconscious awareness prevents two people of different cultures from accidentally trying to sleep in the same single bed at the same time, or sharing the same bathtub? Although I doubt the author bothered to explicitly mention those scenarios.)
One of the cultures seems to be very authoritarian, with Protagonist being questioned by a character whom I vaguely think of as being "the head of the local Gestapo" -- although I'm pretty sure that was not the exact wording used by the author. Naturally, Protagonist's efforts to persuade this guy that there is another culture living right there in the same town with him are futile.
When Protagonist gets to know some members of the other culture, he finds that culture is more religious (or at least philosophical -- I don't remember if they explicitly worshipped a god or group of gods). Overall, however, they seemed to be more cheerful and easygoing in various ways than what I am calling "the Gestapo culture."
Protagonist figures out, somewhere along the line, that just by making certain superficial changes to his appearance -- such as what sort of clothing he is wearing, or changing his hat, or something along those lines -- he can swiftly become "invisible" to members of one culture, while suddenly becoming "visible" to all the people in the other group! Naturally, once he gets the hang of this little trick, he starts making deliberate use of it, switching back and forth at certain times, as part of his newly-formed Master Plan for getting out of this place. I don't remember just what the plan was, but I think there was something he needed to obtain which would make it possible for him to fix up his spaceship well enough to let him fly far away.
At the climax of the story, Protagonist does something which messes up the mental programming so that the two groups can suddenly perceive one another as numerous citizens of both cultures are standing in what I seem to recall as "the town square" -- a large open space meant for public gatherings. Perhaps spraying paint on them? Or damaging some sort of high-tech device which was constantly transmitting some sort of mind-altering signals to tamper with the local residents' perceptions? I still can't remember; I only know he deliberately did something which shattered the old status quo.
There's a happy ending. Protagonist is still alive and well as he makes his escape, although I don't know how happy the typical member of either of those two cultures would have ended up feeling after things settled down.
I'm certain that the town in question is not Ampridatvir, a community which operated along similar lines. Ampridatvir was the setting for a portion of Jack Vance's book The Dying Earth, but I only read that book many years after I first ran across this story I'm trying to identify.
Much more recently, China Miéville's award-winning novel The City & The City explored a similar situation with the "twin cities" of Besźel and Ul Qoma, but that novel was published in 2009, and thus has nothing to do with the story I had previously encountered in the 1980s.
Does anyone recognize this one?