Babylon 5 loading inspector result in depth issues, where to look


I am attempting to update our codebase to use version 5 (alpha 16) so that we can take advantage of the morph target support. At the moment all i have done is change the npm verions to the later versions and got the project building.

The issue i have at the moment is depending on if this line is present import '@babylonjs/inspector' will depend on if the result has depth applied correctly as shown in the following image:

Whilst i’m sure this could be an issue with the new alpha versions - i’m not actually able to work out just what is going wrong to suggest it, or make a repro for it. I know i can change some settings in the Materials (mainly depth-prepass) to get the depth to work again, but when the inpsector code is not loaded i don’t need this for it to work correctly.

Any help on where to look, or how to resolve - or even what might be the issue in order to create a repro would be appreciated,


Oh, wow, she looks much nicer on the left! :slight_smile:

Quick question - have you upgraded the inspector package as well to the latest alpha, or just the core lib?

core, inspector and loader packages are upgraded to 5.0.0-alpha-16

And did I understand correctly that it only happens when you import the inspector?

It looks like the model on the right is considered having transparent materials, so does not write to the zbuffer…

1 Like

This is correct - the first image was taken in 5.0.0 as well, just with the import inspector code commented out.

i agree that it isn’t writing to the zbuffer correctly - however the only difference between the 2 images is the importing of the inspector script (and showing it, but that code isn’t removed as i check for existence before trying to show the inspector)

Can you repro in the pg?

not as yet, the issue doesn’t show up with the demo’s. tomorrow i am going to try opening the multiple GLB’s used in this image via playground and see if it shows up.

1 Like

I never did get around to testing this in the sandbox - however i am now running alpha 20 and the issue has resolved itself