Counterilluminating animals use ventral photogenic organs (photophores) to mimic the residual downwelling light and cloak their silhouette from upward-looking predators. To cope with variable conditions of pelagic light environments they typically adjust their luminescence intensity. Here, we found evidence that bioluminescent sharks instead emit a constant light output and move up and down in the water column to remain cryptic at iso-luminance depth. We observed, across 21 globally distributed shark species, a correlation between capture depth and the proportion of a ventral area occupied by photophores. This information further allowed us, using visual modelling, to provide an adaptive explanation for shark photophore pattern diversity: in species facing moderate predation risk from below, counterilluminating photophores were partially co-opted for bioluminescent signalling, leading to complex patterns. In addition to increase our understanding of pelagic ecosystems our study emphasizes the importance of bioluminescence as a speciation driver.