One of the most important factors that affects the performance of energy detection (ED) is the fading channel between the wireless nodes. This article investigates the performance of ED-based spectrum sensing, for cognitive radio (CR), over two-wave with diffuse power (TWDP) fading channels. The TWDP fading model characterizes a variety of fading channels, including well-known canonical fading distributions, such as Rayleigh and Rician, as well as worse than Rayleigh fading conditions modeled by the two-ray fading model. Novel analytic expressions for the average probability of detection over TWDP fading that account for single-user and cooperative spectrum sensing as well as square law selection diversity reception are derived. These expressions are used to analyze the behavior of ED-based spectrum sensing over moderate, severe and extreme fading conditions, and to investigate the use of cooperation and diversity as a means of mitigating the fading effects. Our results indicate that TWDP fading conditions can significantly degrade the sensing performance; however, it is shown that detection performance can be improved when cooperation and diversity are employed. The presented outcomes enable us to identify the limits of ED-based spectrum sensing and quantify the trade-offs between detection performance and energy efficiency for cognitive radio systems deployed within confined environments such as in-vehicular wireless networks.