Possible bug: Babylon 8 does not preserve alpha mode when cloning shader materials

I’ve found a behaviour change in Babylon 8 vs. Babylon 7. When a ShaderMaterial is cloned, in Babylon 7 the alphaMode property would be copied to the clone, in Babylon 8 it isn’t. Is this intentional? I found a section about material cloning in the breaking changes but it doesn’t mention this specifically.

Here’s a repro playground: https://playground.babylonjs.com/#ETL730#1

There sphere on the left is using a freshly-created material. The sphere on the right has a clone of the material. With Babylon 7 both spheres look the same; with Babylon 8 they’re different.

Looks like a bug :slight_smile:

Let me check that!

Here we are:

Fix shader material clone missing the alphaMode by deltakosh · Pull Request #16970 · BabylonJS/Babylon.js

Thanks for the repro!

Thanks very much for the speedy fix!

1 Like