Last week, the University of North Carolina at Chapel Hill released the results of a new study examining how plants respond to one of the most fluctuating, fluid natural elements they have to contend with: shadows and light. It is, say the researchers, the first study to figure out a mechanism for how plants can survive and thrive as shadows block out their sunlight.

Most plants – we’ll get to the exceptions in a moment – don’t grow in environments where they have a simple “all sun during the day, all dark at night” setup. Instead, the movements of other plants or animals overhead routinely block the sun, causing shadows. This can be a major problem.

Plants have the ability to increase and decrease their rates of photosynthesis, but it’s not an especially fast transition. And that creates a problem: if that darkness is only temporary, and sunlight soon breaks through, that plant will be slow to turn its photosynthesis efficiency back down to normal levels. If a plant uses its cranked-up photosynthesis for too long during open sunlight, it’ll burn up. It’s sort of like someone removing sunscreen when it’s cloudy – if the sun comes back out, that person will be totally unprotected (we know it’s an imperfect analogy, but you get the gist).

This study discovered the method plants use to determine if darkness is night approaching or merely a temporary shadow. Plants can’t really see, of course, so they use a protein called RGS1 to detect changes in light and adjust its photosynthesis efficiency to an appropriate level. Without this protein, the plants can’t handle changes: the team used plants genetically modified to lack RGS1, and during shadowy periods those plants went haywire, eventually taking in too much sunlight and burning.

Because the researchers figured out the responsible protein, they could also time the plants to see exactly how long it takes a plant to adjust. What they discovered is pretty impressive: the plants tested had a firm four-minute window. If darkness stayed for longer than four minutes, the plants would assume that darkness is here to stay for at least a little while, and crank up their photosynthesis. Less than four minutes? No change.

One exception: grasses.

The plants in the grass family, which include widely grown crops like corn, wheat, and rice, don’t have RGS1 at all. That’s because grasslands don’t typically have any have any larger plants or trees that could cast shadows, so they operate at a consistent level of photosynthesis throughout the day.

This discovery could have significant relevance for agriculture. Understanding the way this protein works could be key to manipulating a crop’s photosynthesis efficiency, which could boost yield or even allow plants to survive in climates they normally wouldn’t.