Rock formed by the weathering of substances; forming layers from accumulation of minerals and organic substances.