Quantcast
Channel: Bugs Latest Topics
Viewing all articles
Browse latest Browse all 760

Particle System Shader Effect Errors and Warnings

$
0
0

I have noticed that when using a Particle System with a custom shader effect (which is working great like in playground: http://www.babylonjs-playground.com/#1ASENS)

but if you add a second particle system to the scene (even WITHOUT a custom effect... it reports several errors):

5971311ec01b2_ScreenShot2017-07-20at12_38_51PM.thumb.png.b48016711888676f399d26fbad846f04.png

I made a playground to show the problem: http://www.babylonjs-playground.com/#1ASENS#40

Basically just add another particle system after 5 seconds:

// Create second particle system
    window.setTimeout(()=>{
        var emitter1 = BABYLON.Mesh.CreateBox("emitter1", 0.1, scene);
        emitter1.isVisible = true;
        emitter1.position.x += 1;

        // More Particles
        var particleSystem1 = new BABYLON.ParticleSystem("particles", 4000, scene, null);
        particleSystem1.particleTexture = new BABYLON.Texture("textures/flare.png", scene);
        particleSystem1.minSize = 0.1;
        particleSystem1.maxSize = 1.0;
        particleSystem1.minLifeTime = 0.5;
        particleSystem1.maxLifeTime = 5.0;
        particleSystem1.minEmitPower = 0.5;
        particleSystem1.maxEmitPower = 3.0;
        particleSystem1.emitter = emitter1;
        particleSystem1.emitRate = 100;
        particleSystem1.blendMode = BABYLON.ParticleSystem.BLENDMODE_ONEONE;
        particleSystem1.direction1 = new BABYLON.Vector3(-1, 1, -1);
        particleSystem1.direction2 = new BABYLON.Vector3(1, 1, 1);
        particleSystem1.color1 = new BABYLON.Color4(1, 1, 0, 1);
        particleSystem1.color2 = new BABYLON.Color4(1, 0.5, 0, 1);
        particleSystem1.gravity = new BABYLON.Vector3(0, -1.0, 0);
        particleSystem1.start();

    }, 5000);

 

Yo @Deltakosh ... Can you check this out... Please :)

 

Note: If I don't use a custom effect at all... it works fine... Like in playground: http://www.babylonjs-playground.com/#1ASENS#42


Viewing all articles
Browse latest Browse all 760

Trending Articles