Afterglow light curves are constructed analytically for realistic gamma-ray burst remnants decelerating in either a homogeneous interstellar medium or a stellar wind environment , taking into account the radiative loss of the blast wave , which affects the temporal behaviors significantly . Inverse Compton scattering , which plays an important role when the energy equipartition factor \epsilon _ { e } of electrons is much larger than that of the magnetic field ( \epsilon _ { B } ) , is considered . The inverse Compton effect prolongs the fast-cooling phase markedly , during which the relativistic shock is semi-radiative and the radiation efficiency is approximately constant , \epsilon = \epsilon _ { e } . It is further shown that the shock is still semi-radiative for quite a long time after it transits into the slow-cooling phase , because of a slow decreasing rate of the radiation efficiency of electrons . The temporal decaying index of the X-ray afterglow light curve in this semi-radiative phase is ( 3 p - 2 + 2 \epsilon ) / ( 4 - \epsilon ) in the interstellar medium case , and [ 3 p - 2 - ( p - 2 ) \epsilon ] / 2 ( 2 - \epsilon ) in the stellar wind case , where p is the distribution index of the shock-accelerated electrons . Taking p = 2.2 — 2.3 as implied from common shock acceleration mechanism , and assuming \epsilon _ { e } \sim 1 / 3 , the temporal index is more consistent with the observed \langle \alpha _ { X } \rangle \sim 1.3 than the commonly used adiabatic one . The observability of the inverse Compton component in soft X-ray afterglows is also investigated . To manifest as a bump or even dominant in the X-ray afterglows during the relativistic stage , it is required that the density should be larger than \sim 1 - 10 cm ^ { -3 } in the interstellar medium case , or the wind parameter A _ { \ast } should be larger than \sim 1 in the stellar wind case .