Hi!
I found that with spine-threejs
runtime, when we declare logarithmicDepthBuffer: true
when creating the WebGL renderer (which is necessary in my case to solve some difficult z-fighting), spine animations are rendered under every other 3d object regardless of their 3d position.
It's easily reproducible on the official example by creating the renderer this way here:
renderer = new THREE.WebGLRenderer({ logarithmicDepthBuffer: true });
Here is the result:
I tried with latest npm version of spine-threejs
which is 4.2.18
and threejs version 0.143.0
.
When reading about logarithmicDepthBuffer
on threejs
documentation it says:
Note that this setting uses gl_FragDepth if available which disables the Early Fragment Test optimization and can cause a decrease in performance
I wonder if this is the source of the problem. Does anyone have an idea of how to fix/solve/workaround this problem?