Legislators have reached agreement on a bill that would require South Carolina voters to show photo ID at the polls and allow early voting.