Dynamic branch has small static cost but if threads are coherant and cost of code that can be skipped is big enough then dynamic branching can be huge performance win. I just optimized mobile shadow performance by skipping all parts which are fully in static shadows, normal is pointing away of directional light(nDotL) or distance is bigger than max shadow distance. Only about 25% of pixels actually need shadows after these three conditionals. All conditionals are combined to get just one dynamic branch.