Episode 1 is almost entirely linear... in the end you get a different mission depending on the ship you choose to fly and a different ending cutscene depending on a choice you make in the cockpit. This choice also affects the inflight dialogue and the cutscenes for most of the rest of the game.
Episode 2 is also almost entirely linear. Near the end there's a different mission you might get depending on your performance. This affects your *entire* episode 3 (all missions, the story, all dialogues, etc).
All subsequent episodes work the same way... Meaning there's basically two different episodes 3, two different episodes 4, and two different episodes 5. The path you will get depends on your performance in each episode.
Then, in episode 5, your performance will affect the ending scenes. Some (all?) endings are shared between the two versions of episode 5, so that there's no such thing as a dead-end losing path.