  We present results from the semi-analytic model of galaxy formation SAG
applied on the MultiDark simulation MDPL2. SAG features an updated supernova
(SN) feedback scheme and a robust modelling of the environmental effects on
satellite galaxies. This incorporates a gradual starvation of the hot gas halo
driven by the action of ram pressure stripping (RPS), that can affect the cold
gas disc, and tidal stripping (TS), which can act on all baryonic components.
Galaxy orbits of orphan satellites are integrated providing adequate positions
and velocities for the estimation of RPS and TS. The star formation history and
stellar mass assembly of galaxies are sensitive to the redshift dependence
implemented in the SN feedback model. We discuss a variant of our model that
allows to reconcile the predicted star formation rate density at $z \gtrsim 3$
with the observed one, at the expense of an excess in the faint end of the
stellar mass function at $z=2$. The fractions of passive galaxies as a function
of stellar mass, halo mass and the halo-centric distances are consistent with
observational measurements. The model also reproduces the evolution of the main
sequence of star forming central and satellite galaxies. The similarity between
them is a result of the gradual starvation of the hot gas halo suffered by
satellites, in which RPS plays a dominant role. RPS of the cold gas does not
affect the fraction of quenched satellites but it contributes to reach the
right atomic hydrogen gas content for more massive satellites
($M_{\star}\gtrsim 10^{10}\,{\rm M}_{\odot}$).
