The author addresses a misconception in computer graphics regarding the use of conditionals in GPUs. They provide code examples to demonstrate the issue and explain how some believe that replacing conditional branches with arithmetic operations can optimize the code, which is incorrect. They clarify that using ternary operators or if statements in GPU code does not result in conditional branching, but rather simple conditional moves. The article highlights that the supposedly optimized version of the code actually runs slower and explains the machine code generated by GPUs to further support their argument. The conclusion emphasizes correcting those who propose the incorrect optimization method.
https://iquilezles.org/articles/gpuconditionals/