GPU Programming

Inigo Quilez :: computer graphics, mathematics, shaders, fractals, demoscene and more

A detailed explanation debunks the common misconception about GPU branching optimization, specifically addressing how ternary operations and if statements don't actually create conditional branches in modern GPUs. The article demonstrates through machine code examples that using step() and mix() as optimization alternatives actually leads to slower performance.