The avalanche or carrier-multiplication effect has the potential to improve the performance of photodetectors and solar cells, but usually requires high threshold energies. Here, the authors report stepwise WSe2 homojunctions exhibiting threshold energies approaching the semiconductor bandgap at room temperature.