It's common knowledge that branching in a GPU program is costly because it may have to run both the if and else logic for every pixel being evaluated in the same wave, but only applying each result to the appropriate pixels.
I was curious if branching was still a performance issue if there is only an if statement and no else statement?
In this case, it seems like it has the ability to be faster compared to branchless logic, for the case when no pixels need to do the work inside the if statement, and can instead skip past it as a group.
Is this true? Are there any other downsides? like perhaps older video cards still doing the if logic anyways, even though no pixels evaluate to true?