I’m trying to get BokehPass (webgl_postprocessing_dof) to work, but I’m seeing seams appear throughout the mesh. You can see the seam in the demo. As long as there is enough aperture length, the blurriness reverts to being in focus, then repeats itself. As the camera gets closer to a sphere, it appears that the distance interval for the seam gets shorter and shorter. As the camera approaches the object, the seams turns into a series of small ripples. The expected behavior for a depth of field would be that it is in focus wherever the focus is and the foreground and background blur grow in magnitude infinitely.
I anticipate that BokehFilter2 / dof2 might be recommended. The trouble is that the example is much more complicated and I haven’t been able to get it to work. With the original BokehPass, all I had to do was define the parameters and pass it to the EffectComposer (although I was quite frustrated before I realized how low I had to set the aperture value.) Looking under the hood of EffectComposer, it seems it takes care of defining a ‘quad’, which I figure is some sort of screen which fits somewhere into the camera frustum, but the coordinates and configuration of it seem to be tied up with the idiosyncratic dimensions, layout, camera animations etc., Then I understand that you are supposed to “render the depth into color”, and then “render the depth into texture”, and I think I understand the idea, but a bit overwhelming, so I’ve stuck with the original BokehFilter, at least for now.
PS Is this thread out of date? Is it now possible to read the depth buffer? Would I need to make another effect composer? https://github.com/mrdoob/three.js/issues/1116
PPS Do I need to add a texture like all of the examples I have seen, or can I just blur the textureless mesh? (It is postprocessing after all)
Thanks!