I'm experimenting with full screen terrain rendering on the iPad, using a cel shader that goes something like this:
1) render the terrain unto screen with cel lighting
2) render the depth only into a texture
3) render this texture unto the screen using a sobel filter
The performance of step 1 alone is currently adequate (although I haven't started optimize it yet). But I'm having a little trouble getting good performance when all passes are combined. The depth buffer is apparently rendered twice, which seems unnecessary. Is there any way to combine these passes, or otherwise optimize this approach?