in this process minerals crystallize from watery solutions that percolate through the pores between grain of sediment. the cement that is produced may or may not have the same chemical composition as the sediment. in sandstones, framework grains are often cemented by silica or carbonate. the extent of cementation is dependent on the composition of the sediment. for example, in lithic sandstones, cementation is less extensive because pore space between framework grains is filled with a muddy matrix that leaves little space for precipitation to occur. this is often the case for mudrocks as well. as a result of compaction, the clayey sediments comprising mudrocks are relatively impermeable.