Eye infections caused by fungi are extremely rare, but they can be very serious. Fungal infections can affect different parts of the eye. Keratitis is an infection of the clear, front layer of the eye (the cornea). Endophthalmitis is an infection of the inside of the eye (the vitreous and/or aqueous humor).