If I shoot directly in to the (sun)light, I get a green reflection in my photos. Is this because of the UV filter? How should I solve this?
Camera: Sony A7ii Lens: Sony 55mm 1.8 UV filter: Hoya HMC UV (C) Lens (49mm filter) [Amazon link]
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It only takes a minute to sign up.Sign up to join this community
This is a type of lens flare called "ghosting". A UV filter can certainly cause it to be strongly visible, although it can happen without as well. A UV filter can be useful protection if you are in a dangerous environment (for example, somewhere with blowing sand), but otherwise it's really better to use a lens hood for protection.
As Michael Clark points out in a comment, his answer to What is the blue circle in this moon image? explains why the artifact shows up as green.
As you know, the camera lens is fabricated using numerous lens elements, each with two polished glass surfaces. Now polished glass reflects away about 5% of the light. This reflected light is lost so only about 95% of the image forming rays will be presented to the lens. It gets worse; each lens element does the same. The result is that only about 60% of image forming rays make it through.
Lens coating to the rescue. An English optician, Harold Dennis Taylor (1862 - 1943) observed that old shelved lenses of the same design as new ones passed more light. It seems the old lenses were coated with a film of muck and grime, ever present in London’s air pollution from coal burning at the turn of the last century. Taylor experimented using various methods to artificially age (bloom) lenses. He was granted the first patent for lens coating.
Coated lenses mitigate light reflection from the polished glass surfaces. What do you think happens when light rays are reflected from surfaces of internal lens elements? The answer is, these redirected rays bathe the film or sensor with stray light rays. The result is what we call flare. Now flare is devastating because it robs our images of their expected contrast. Additionally, misdirected light play on film or sensor making ghost images.
Optical engineers address this problem by coating each lens surfaces with a thin film of minerals. It is the thickness of the coat that does the trick. The coat must be ¼ of the wavelength of the light to be controlled. Since each color has a specific wavelength, opticians often apply multiple coats to the glass. The color cast you see in the ghost image is due to unchecked internal reelections.
Adding a UV filter makes these conditions worst because you are adding two additional polished glass surfaces. Besides, the UV filter only works to mitigate haze seen in distant landscapes and aerial photography. The UV is redundant in the digital camera as the protective cover over the sensor is also a UV filter. The bottom line for filters, is never mount a filter if the harm outweighs the good.