What are the visors for on Rebel Pilot helmets? UV protection?

I'm imagining Darth Vader holding on to a Rebel X-Wing with his bare hands in the void of space during a space battle between the Empire and the Rebel Alliance, somewhere between Episodes III and IV. Because he really wants to kill this particular pilot. His suit allows him to survive the conditions of space. The Rebel pilot decides to take one for the team and crashes himself into a Star Destroyer. Vader is pushed by the explosion, his suit of armor slightly damaged. Not having something to hold onto anymore, he uses his comm suit in his armor. "Captain Needa, this is Lord Vader. I am in need of assistance. I am floating outside SD-453. Lock on to my coordinates and dispatch a TIE boarding shuttle to retrieve me." The battle between the two fleets continues to rage all around him. Several blaster shots from Imperial and Rebel fighters alike barely miss him. Vader spots an X-Wing coming straight for him. The pilot has noticed Vader and wants to kill him. Vader ignites his lightsaber and deflects the X-Wing's shots back to it, destroying it. A laser shot from another X-Wing destroys Vader's saber-holding hand and knocks the saber off his hand. Vader spots the X-Wing, which is also flying towards him. Vader calls upon the dark side and uses his leftover hand to Force crush the X-Wing until the Rebel craft explodes. He then uses the Force to pull his lightsaber back to him. The TIE boarding shuttle finally arrives to retrieve him and carry him back to safety.

/r/StarWars Thread Parent Link - i.redd.it