GPU branching if without else
Old Hardware
Some older cards didn't used to jump instructions in warps, so this was indeed an issue. If you have a conditional with these cards, the inside logic of the conditional would still be evaluated even if the block wasn't entered by any of the pixels, vertices, etc. There's little you can do in this case because every instruction will be executed. The worst case is also the best case here.
Modern Hardware
However, if you are working with relatively modern hardware though, this isn't an issue and &quot;if/else&quot; blocks will be skipped when necessary. There really shouldn't be a downside to using &quot;if/else&quot; blocks compared to not using them. You are still branching with an &quot;else&quot;-less statement. In fact, some post-processing effects/deferred rendering specifically benefit from this.
The worst case scenario is that some threads go through the &quot;if&quot; block and the rest go through the &quot;else&quot; block. The best case scenario is that all go through the &quot;if&quot; block or the &quot;else&quot; block. There isn't a downside to using &quot;if/else&quot; conditionals as they are needed (either on old hardware or newer hardware), but there's a possible upside with newer hardware.