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).
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).
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
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.
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.