I’m just going to point out that even indoors it may not be rude; there may be a medical condition involved.
There was a young woman I shared a class in college with. She always sat near the front and always seemed to be sleeping. Her head was down, her eyes squinted, and she never participated.
One day, the teacher paused mid-lecture and asked her “You always look like you’re about to fall asleep. Do you have a problem?”
The student explained that she was awake and listening, but she had a medical condition that rendered her extremely sensitive to light.
So the teacher asked if there was anything that could be done to improve her learning experience, and she said she’d like to wear sunglasses but was afraid that it would be considered rude. He told her to feel free to do so.
She wore the sunglasses everyday after that. Without the pain from the light, she was actively participating in discussion and no longer appeared to be asleep. She went from barely there to a top student.
I’m not saying that this is usually the case - I imagine what she had is rare. It’s just that you never know what’s really going on with people.