I was wondering if I could get a few suggestions of various algorithms that require multiple passes to complete their goal? By multiple passes, I mean the same geometry is sent down multiple times. Shadow mapping might be an example, or many refraction/reflection related techniques.

Also, are there any frameworks that actually abstract these multiple passes? I know frameworks like Stanford's RTSL or the Ashli framework break up multipasses for shaders with a large number of outputs, but I'm thinking more along the lines of "surface" shaders as the Frostbite engine supposedly does or the Unity "surface" shader by abstracting the vertex/fragment separation away from the artist. I don't think this covers multipass to a huge extent besides transparency, but just as an example of extracting part of the process.

As an example, there's a scene with a lambertian terrian of geometries and water-shader for a lake. The water shader might implement some kind of refraction that required depth/color/normals of what it was rendering over as a reference image that it couldn't write to. So this shader might have a "render separate" toggle that means to render other geometry first and might have "requiresNormals, requiresColors, requiresDepth" flags. I know a lot of languages have been written to abstract GLSL code specifically from vertex/shader generation, but I'm wondering how many frameworks actually support passes.