Instance Object Transparency Rendering Bug

Drawing on this discussion:

Examples are as follows:

https://playground.babylonjs.com/#WGZLGJ#6839

Implemented gltf object instance and set transparency. Then there is a classic transparency problem

hd4210

The building cannot see another building transparently.
@Blake @Evgeni_Popov

If you don’t set needDepthPrePass then you can see the instances through each other like below for example. I just commented out lines 39-41. IDK if there’s a way to do it and keep that enabled, but if anyone will know it’s @Evgeni_Popov. :slight_smile:

The reason why I use needDepthPrePass is that when visibility=0.9, there is a problem with rendering, so you need to set needDepthPrePass to solve it.

https://playground.babylonjs.com/#WGZLGJ#6841

Line 21 Test

3293jdd5