Is the effect when two planets passing each other different, when they pass in the same or opposite direction? So is the effect between the passing planets different whether they encounter in the same or opposite direction in their orbits with the same relative speed difference?
From the any of the planet's point of view, the encounter is exactly the same regardless of direction if the relative speed and force is equal. This should be pretty clear for symmetry reasons. For any encounter, the law is $v_{in} = v_{out}$. However, if the encounter takes a long time, you would also have to consider the influence of the central body of the system. The problem then becomes a three-body problem and this case is not restricted enough for an analytical solutions. We can make a few observations though: As the velocity vectors of both objects before the encounter have no radial component, both orbits are going to get a higher eccentricity. Any other information depends on knowing the distance of the encounter and the relative masses.