We compute the effect of the galactic absorption on AGN emission in a cosmological context by including a physical model for AGN feeding and feedback in a semi-analytic model of galaxy formation . This is based on galaxy interactions as triggers for AGN accretion , and on expanding blast waves as a mechanism to propagate outwards the AGN energy injected into the interstellar medium at the center of galaxies . We first test our model against the observed number density of AGNs with different intrinsic luminosity as a function of redshift . The model yields a ” downsizing ” behavior in close agreement with the observed one for z \lesssim 2 . At higher redshifts , the model predicts an overall abundance of AGNs ( including Compton-thick sources ) larger than the observed Compton-thin sources by a factor \approx 2 for z \gtrsim 2 and L _ { X } \leq 10 ^ { 44 } erg/s . Thus , we expect that at such luminosities and redshifts about 1 / 2 of the total AGN population is contributed by Compton-thick sources . We then investigate the dependence of the absorbing column density N _ { H } associated to cold galactic gas ( and responsible for the Compton-thin component of the overall obscuration ) on the AGN luminosity and redshift . We find that the absorbed fraction of AGNs with N _ { H } \geq 10 ^ { 22 } cm ^ { -2 } decreases with luminosity for z \leq 1 ; in addition , the total ( integrated over luminosity ) absorbed fraction increases with redshift up to z \approx 2 , and saturates to the value \approx 0.8 at higher redshifts . Finally , we predict the luminosity dependence of the absorbed fraction of AGNs with L _ { X } \leq 3 10 ^ { 44 } erg/s to weaken with increasing redshift . We compare our results with recent observations , and discuss their implications in the context of cosmological models of galaxy formation .