  With the advent of high mobility encapsulated graphene devices, new
electronic components ruled by Dirac fermions optics have been envisioned and
realized. The main building blocks of electron-optics devices are gate-defined
p-n junctions, which guide, transmit and refract graphene charge carriers, just
like prisms and lenses in optics. The reflection and transmission are governed
by the p-n junction smoothness, a parameter difficult to tune in conventional
devices. Here we create p-n junctions in graphene, using the polarized tip of a
scanning gate microscope, yielding Fabry-P\'erot interference fringes in the
device resistance. We control the p-n junctions smoothness using the
tip-to-graphene distance, and show increased interference contrast using
smoother potential barriers. Extensive tight-binding simulation reveal that
smooth potential barriers induce a pronounced quasi-confinement of Dirac
fermions below the tip, yielding enhanced interference contrast. On the
opposite, sharp barriers are excellent Dirac fermions transmitters and lead to
poorly contrasted interferences. Our work emphasizes the importance of junction
smoothness for relativistic electron optics devices engineering.
