Resolution limits achievable with CMOS front-end in X and gamma-ray analysis with semiconductor detectors