After meshes got waterMaterial.addToRenderList, they get y inverted

After my meshes got waterMaterial.addToRenderList,
the more far away / later created meshes get rendered like y inverted (as visible in the water).

(I will try to reproduce it in a PG)

Yes please :smiley:

Last night I got the idea to delay waterMaterial.addToRenderList.
And it seemed to work, but was not.

If the mesh is in the focus, it is ok, outside the error happends.
I still intent to make a PG. But this is rawly my code:

let mesh = new BABYLON.Mesh(name, scene);
vertexData.applyToMesh(mesh); // lot of vertexi!
mesh.material = multiMaterial; // a lot of materials (with textures)
for (const subMesh of mySubMeshes) { new BABYLON.SubMesh(-cut-); };
waterMaterial.addToRenderList(mesh);

After quite some time, reducing my code for a PG, I discovered:
It was only if waterMaterial.addToRenderList is used with testMaterial.freeze()
Still with BJS 5.0 alpha 22, but not with alpha 61
I did have a PG (not saved). I had to switch to 4.2 to get the error.

2 Likes