The incoherence of sunlight has long been suspected to have an impact on solar cell energy conversion efficiency, although the extent of this is unclear. Existing computational methods used to optimize solar cell efficiency under incoherent light are based on multiple time-consuming runs and statistical averaging. These indirect methods show limitations related to the complexity of the solar cell structure. As a consequence, complex corrugated cells, which exploit light trapping for enhancing the efficiency, have not yet been accessible for optimization under incoherent light. To overcome this bottleneck, we developed an original direct method which has the key advantage that the treatment of incoherence can be totally decoupled from the complexity of the cell. As an illustration, surface-corrugated GaAs and c-Si thin-films are considered. The spectrally integrated absorption in these devices is found to depend strongly on the degree of light coherence and, accordingly, the maximum achievable photocurrent can be higher under incoherent light than under coherent light. These results show the importance of taking into account sunlight incoherence in solar cell optimization and point out the ability of our direct method to deal with complex solar cell structures. © 2014 IOP Publishing and Deutsche Physikalische Gesellschaft.