Diagenesis encompasses all natural changes in sediments from deposition through lithification, stopping short of metamorphism. It determines reservoir quality by altering porosity and permeability. The depositional environment sets the stage by influencing sediment type and initial porosity. During early burial (eogenesis), near-surface processes like dissolution impact porosity. Deeper burial (mesogenesis) sees compaction and cementation as surface processes wane. Ultimately, uplift may reexpose rocks to surface-influenced diagenesis (telogenesis). Diagenesis is driven by water, organics, temperature, pressure, and chemical conditions changing over burial.