  Interactions between the extragalactic background light (EBL) and very high
energy {\gamma} rays (VHE; E > 10 GeV) from cosmological sources alter their
{\gamma}-ray spectrum. The stronger absorption of harder {\gamma} rays causes a
steepening of the observed {\gamma}-ray spectrum at the high energy tail which
can be expressed by an increase of the power index. The effect provides a link
between high energy astrophysics and the evolution of galaxies. In this work we
develop a new hybrid EBL model by augmenting our previous analytic model with
information from semi-analytic galaxy catalogues. The model allows us to study
the {\gamma}-ray opacities of individual {\gamma}-ray paths through the
(simulated) universe and evaluate the effect of local fluctuations in the EBL
intensity along each path. We confirm an order of magnitude fluctuations in the
local EBL (based on the cumulative light from model galaxy distributions within
spheres of 50 $h^{-1}$Mpc). However, the effect of these fluctuations on the
VHE {\gamma}-ray opacity is insignificant due to the overall very small
contribution of the local EBL to the total EBL. We also investigate the effect
which a galaxy crossing the line of sight of the {\gamma}-ray source may have
on the VHE spectrum. We find that galaxies with stellar masses of M$ > 10^{11}$
M$_{\odot}$ could have significant effect on the {\gamma}-ray absorption. It is
unlikely that the observed variation in the spectral index is caused by the
proximity of single galaxies to the {\gamma}-ray paths as these are extremely
rare.
