The effects of ParticleSystem and Shader are displayed differently on PC and mobile devices

createEngine example | Babylon.js Playground (babylonjs.com)

This is the PC effect:

This is the mobile effect:

As can be seen, the PC has a red color gradient, while the mobile only has one color (green).

1 Like

for me it happens on firefox vs chromium too : O

Firefox:

Chromium:

Yes, why is there such a difference? How should we solve it?

This is because you are binding information at the wrong time or even not at all :slight_smile:

something like this should work: https://playground.babylonjs.com/#NCWBUU#187

Basically, binding in executeWhenCompiled for the cube matrix and in onBind for the rest to be sure it exists.

2 Likes


Thank you for your answer; But it seems there is still a difference, the generated color position is incorrect.
It’s strange why the same code doesn’t appear consistent in browsers with different kernels.

The color is random therefore changing with every run.

It shouldn’t be random, colors should be obtained through texture mapping

First let s make it more visible:

As you can see, the color comes from the position in the PG.

But you will notice that the darker are sometimes on top or on the bottom and this is the random part.

Particles are not sorted so it will randomly display the color due to the overlapping properties.