After utilizing the three.js library, I successfully displayed occluded edges of a 3D object as dashed lines.
Now, my goal is to make edges occluded by other objects behave in the same manner.
Although the solution provided here is functioning well, there are some unusual cases where it fails to work properly.
Below is an example of such a case (I am using an orthographic camera so the distance between objects is not clearly visible, hence the text in the image):
Has anyone else encountered a similar issue before?
Can anyone pinpoint why this particular scenario is causing problems?
Perhaps the section
polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 1
in my code is being misused.
Or could it be that side: THREE.DoubleSide
in my material is creating the issue? I have noticed it behaving strangely with transparency in the past.
Here is my code: http://jsfiddle.net/car3v/4/