added flat qualifier in visibility frag shader