CMOS-based Integrated Wavefront Sensor