The wavefront sensor is used in adaptive optics (AO) to detect the atmospheric distortion, which feeds back to the deformable mirror to compensate for this distortion. While the Shack–Hartmann sensor has been widely used, the plenoptic sensor was proposed in recent years. The two different wavefront sensing methods have different interpretations and numerical consequences, though they are both slope-based. The plenoptic sensor is compared with the Shack–Hartmann sensor in a closed-loop AO system. Simulations are performed to investigate their performances under closed-loop conditions. The plenoptic sensors both without and with modulation are discussed. The results show that the closed-loop performance of the plenoptic sensor without modulation is worse than that of the Shack–Hartmann sensor when the star for observation is brighter than magnitude 7, but better when the star is fainter. The closed-loop performance of the plenoptic sensor could be improved by modulation, except for the faint star. In summary, the limiting magnitude of the astronomical AO system may be improved by using the plenoptic sensor instead of the Shack–Hartmann sensor, and the modulation of the plenoptic sensor is more suitable for the bright star.