They are the only organisms that can decompose lignin and are important in the decomposition of cellulose, thanks to a specific enzyme - cellulase.
Mushrooms can be a source of both inorganic matter, which are products of metabolism (CO2, H2O), and organic matter because they are food for many microorganisms. Fungi decompose branches and leaves - it is estimated that without this decomposition, 12 tons of cellulosic waste per hectare would be produced annually in tropical forests.