subMeshes, MultiMaterial, and DOUBLESIDE rendering

I’m not seeing the back faces when using double-side rendering on sub-meshes.

Am I missing any setup required to make this work properly or is this a bug?

Setting .backFaceCulling = false on the materials does work.

It seems the BABYLON.Mesh.DOUBLESIDE parameter is used only when no material is applied on the sphere.

BABYLON.Mesh.DOUBLESIDE is a parameter used at construction time on some provided BJS meshes. It adds twice more indices and vertices (so facets or triangles) in the mesh geometry, whatever the material used then.

backFaceCulling = false is a material property. It forces a triangle to be rendered even if the camera is facing its back face, regarding its vertices drawing rotation order (clockwise or not).

Let’s try your example, with no multimaterials :

Now, the same with multimaterials AND double sided sphere (note that I changed the start/count of indices in the submeshes) :

The same, with no DOUBLESIDE, but with backFaceCulling disabled :

Depending on your need, it may be simpler to use the material backFaceCulling property then.