So I almost spent as much time setting up the repo as trying to solve the issue (almost entire day)
And unfortunately I can’t seem to get it to work in the online playground: https://playground.babylonjs.com/#SYQW69#364
Somehow the appended GLB doesn’t want to take my material.
So I included 2 screenshots of the issue as well. Please not that the playground example is more or less identical to my offline example.
You should normally call updateFacetData in scene.onBeforeRenderObservable so that the sorting is done each frame in case the camera moves / rotates but for some reason it does not work, so I have commented it. Maybe someone will know why only the first call to updateFacetData works…
You should normally call updateFacetDatainscene.onBeforeRenderObservableso that the sorting is done each frame in case the camera moves / rotates but for some reason it does not work, so I have commented it. Maybe someone will know why only the first call toupdateFacetData works…
You can solve this problem by transferring the camera position
Example:
I have a problem when applying this method to a character with animation. This method practically does not work. To solve this problem, I tried to use mesh.computeBonesUsingShaders. But in combining these two approaches, the light breaks.
A little later I will try to find a suitable model to make an example of this