I read somewhere that gamma radiation interact with matter mostly via Compton scattering. I guess there are other type of interactions as well and probably a constant ratio between them. Does this ratio depend on factors like pressure, temperature, material composition, etc?
The gamma interacts with electromagnetic interactions, and depending on its energy in addition to compton scattering would also fission nuclei and pair produce particles in the the electromagnetic fields on its way.
Macroscopic variables like temperature and density affect the number of interactions it may have before the energy completely dissipates , not the type.