It's funny nobody asks these questions when Federer is still in tournaments. Every time he loses a match, out come the IS HE REALLY THE GOAT questions.
Federer's competition has legitimately been better than Sampras. You have to look at it logically. Since Roger started winning slams, he has won slams by defeating great players like Hewitt (one of the youngest #1's ever, has 2 slams), Agassi, Safin (possibly the most naturally talented player ever, the dude never practiced, 2 slams), Roddick (who without Federer around would have 5-6 slams), Nadal (everyone goes on about how he has his number, but Federer has beat him to win slams and since he came on the scene, 2005, Federer has still won 12 of his slams), Murray & Djokovic (who everyone considers the next big things in tennis), among other guys like Davydenko, Nalbandian, Berdych, Henman, Del Potro, Soderling, etc, etc. The opponents he has faced over the number of slams he has won is stunning. The list spans 3 different tennis "generations." From Agassi, to Hewitt/Safin/Roddick, to Nadal/Murray/Djoker/Soderling/Del Potro/etc.
Think of it this way, Pete had his Agassi, Roger has his Nadal. Pete had Ivanisevic on grass, Roger has his Roddick on grass. Pete had Courier. Roger had Hewitt. They both had Safin at one point. They both had Henman. But Roger still has Djokovic, Murray, Del Potro, Soderling, Nalbandian, Davydenko, and he even still played with Agassi and won a slam final against him.
Not to mention, he has more slams than Pete, has won a French Open (Pete never even made the FO finals), holds nearly every conceivable record (barring the last one Pete still holds, weeks at #1 by like 2 weeks). All of the statistics refute your claim that Roger is not the greatest ever. Both are great, but it's plain to see that Roger has done much more, against at least SIMILAR competition, and is still going.