Cross-bedding is formed by the downstream migration of bedforms such as ripples or dunes in a flowing fluid. The fluid flow causes sand grains to saltate up the upstream ("stoss") side of the bedform and collect at the peak until the angle of repose is reached.