Depth of Field GLSL Shader

Has anyone been able to get a depth of field GLSL shader to work? Or is there a better method I should be using than GLSL shaders?

I’ve found this shader and I’ve loaded it as a fragment shader, and I’ve set my camera.setNearClip(0.1); and camera.setFarClip(2000.0); and the same values in lines 67 and 68 of the shader for znear and zfar. Apparently the shader is successfully attached, but when my program runs, all I see is blackness. Any ideas?

one reason could be on how you had handled the depth texture or the other, maybe you need disable the arb texture with ofDisableArbTex(), but i can’t say more. if you put some pieces of your code maybe we can give a sight .