Pictured above is the sensor portion of what [Frapedia] calls his visual rain sensor. Most rain gauges just use a graduated cylinder to capture water as it falls from the sky. That will give you a ...
Cars are packed to the gunwales these days with sensors, hand-holding driver-assist systems, and various arcane doodads that serve to isolate the driver from the actual physical act of driving.
Some Tesla vehicles can use their cameras to passively detect rain. Also, if you don’t need to sense the glass, it is pretty easy to measure the effect getting wet has on a PCB resistor.