Synthesis of TiO2/g-C3N4 nanocomposites as efficient photocatalysts dependent on the enhanced photogenerated charge separation