What I have so far
I am trying to implement annotations similar to those which can be seen at sketchfab.com. Currently I use CSS2DObjects and the CSS2DRenderer to display annotations. Every annotation-object is added to a Mesh (or a Bone of a SkinnedMesh) to guarantee the relative position of an annotation stays the same in case the parent Mesh is animated. This works as expected.
What I want
The annotations are always visible, even if they are occluded by other objects. I want to change the css opacity of the CSS2DObject element if an annotation is occluded (see e.g. https://sketchfab.com/3d-models/mercury-0930a4f0405243f6a9f93a4da79c66b6 or https://codepen.io/Lorti/pen/Vbppap/), but I do not know how to find that out.
I already tried the solution from https://codepen.io/Lorti/pen/Vbppap/, but the result is not accurate enough for complex models and does not work with animated Meshes.
I also tried to use the Raycaster but the performance gets too bad with multiple annotations or complex models. Besides that, this approach also does not work with animated Meshes.
I would appreciate any suggestion. Thanks in advance.