Depth of field effect in GL ES 2.0

Hey guys !

I’m looking for a depth of field shader example for OpenGL ES 2.0 (iOS). I found few addons or example of DoF but none of them are GL ES compatible and they all use depthStencilAsTexture which is not implemented in openframeworks for iOS.

Any ideas ?

Thanks a lot for your help !


Hi there!

I haven’t worked in iOS, so there’re better qualified folks in this forum. But assuming there is no depthStencilAsTexture or similiar, you could do it yourself. Like this:

And here you can see why you need to linearize. Hope this helps.