I have no connection to Rain-X. I just want to clarify about Rain-X. Do NOT apply the same (exterior) Rain-X water-repellent to the inside of your visor. The most common type of Rain-X (when people refer to "Rain-X") has hydrophobic property (resists to water). The water would beads up and rolls off the exterior surface with the assistance of the wind. When you apply the same Rain-X water-repellent type to the inside of your visor, the moisture beads up to tiny droplets and clings to the inner surface of your visor (which we call "fog"), which would make the condition worse. Make sure you use the "Interior Glass Anti-fog Rain-X" type. This type has hydrophilic property (attract to water) and spreads the water to the surface, preventing droplets. Here is the link to the product: Interior Glass Anti-Fog - Rain-X"... use Rain-X for plastics on both the inside as well as the outside - helps prevent fogging ..."
There are videos in YouTube which use different materials to apply to the inside of the visor like toothpaste, or baby shampoo to prevent fogging. I do not like using toothpaste as toothpaste has abrasive material. I tried baby shampoo but had to give up because it gave me haze and halos at night. YMMV.