Say your three output signals are Out1, Out2 and Out3
Generate another pair of PWM signals (call them Out4 and Out5) running at the same frequency as your 3 phase output and synchronised to the starting time of Out1
Set Out4 at a fixed duty cycle of 33.3% and Out5 at a fixed duty cycle of 66.6%
Now take Out4 and Out5 and use them as a new pair of inputs, In4 and In5
Look at the trailing edges of In4 and in5 and use these trailing edges to trigger the start points of Out2 and Out3 so generating the required phase lags on these pair of outputs.
OK I don't know much about programming but hopefully the above is a method.