Pressure dependence of direct optical transitions in ReS2 and ReSe2