Impact of variable-length loops on GPU shaders
- by Will
Its popular to render procedural content inside the GPU e.g. in the demoscene (drawing a single quad to fill the screen and letting the GPU compute the pixels).
Ray marching is popular:
This means the GPU is executing some unknown number of loop iterations per pixel (although you can have an upper bound like maxIterations).
How does having a…