Are there known issues with DoF and MultiMaterial?
I can get DoF to work with StandardMaterial and PBR, but when I try to use it on meshes that are using multimaterial, all the meshes seem to take on the same blur no matter what their distance to the camera.
I am cloning multimaterial for each mesh.
I’ll try to replicate the issue in a PG if there are no known issues.
Thanks for the repro! This is fascinating, and it definitely seems like a bug. From looking at the scenarios in Spector.js, it looks like when mesh.skeleton is set, the mesh isn’t being drawn to the depth buffer at all. Curiously, this doesn’t seem to affect the cubes at all. I did a little fishing in the source, but I haven’t found or thought of any obvious reason why this might matter. @Evgeni_Popov, do you know where/why this might be happening?
The transparent objects are not rendered into the depth buffer.
I have updated the PR to add a new forceDepthWriteTransparentMeshes property to force writing the transparent meshes to the depth buffer. You would use it like this: