Don't "optimize" conditional moves in shaders with mix()+step()
romes
iquilezles.org
409 points231 comments
Summary
by metafa.stThe article explores techniques for implementing conditional statements on the GPU, which can be challenging due to the parallel nature of GPU processing. It discusses various approaches, including the use of bit manipulation, texture lookups, and short-circuit evaluation, to achieve efficient conditional execution on the GPU.