Here is a short, interesting article in National Geographic about a genus of algae, Volvox, and a particular species (V. carteri) with two sexes. With one gene, MID, being switched off in males or inserted in females there was a change in the gametes – males produced eggs, females produced sperm.
So in the case of this algae, sex was controlled by just one gene. But lest we think things are this simple, the article mentions that multi-celluarity evolved about a dozen times: so we can assume that there may be (at least) a dozen different ways that sex is determined and expressed – since multi-celluarity usually goes with sexual reproduction. I think I’ll try to find out the different times that multi-cellularity evolved.