Unique ParticleSystem Custom Effect

Hello, I am working on some particle system effects and am wondering how to generate a unique effect per system. Looking through the code for Engine.createEffectForParticles it looks like a new instance is being created, but the uniqueId appears to be the same for any I create (as in the following PG).

I found a similar thread discussing how to bind uniforms per mesh, but the solution will not work for this case (thread). There is also no clone function for Effects, which is how I would solve the same problem for NodeMaterials.

How can I assign unique values to uniforms for particle system effects?

Thanks for any help,
Robert

Correction: The compiled shader gets stored in a map as ‘particles’ (likely as an optimization). NodeMaterial instances will work for this purpose (with minimal editing).

1 Like