ShaderParticleEngine icon indicating copy to clipboard operation
ShaderParticleEngine copied to clipboard

Change particle emitter render order?

Open grimdeathr opened this issue 2 years ago • 0 comments

rainEmitter = new SPE.Emitter({ maxAge: { value: 20 }, position: { value: new THREE.Vector3(0, 20, -70), spread: new THREE.Vector3( 50, 0, 50 ) },

  acceleration: {
          value: new THREE.Vector3(-10, -5, 0),
          spread: new THREE.Vector3( 0, 0, 20 )
      },

  velocity: {
          value: new THREE.Vector3(0, 0, 0),
          spread: new THREE.Vector3(0, 0, 0)
      },

      color: {
          value: [ new THREE.Color('white') ]
      },

      size: {
          value: 12.5
      },

  particleCount: 2000
});

particleGroup = new SPE.Group({
  texture: {
          value: new THREE.TextureLoader().load('./assets/rain.png')
      },
  // depthTest:true,
  // depthWrite:true,
  renderOrder:2,
});

RenderOrder doesnt do anything in the group, and cant see how to edit it in the emitter, and using particleGroup.mesh.renderOrder doesnt do anything either.

It seems to draw behind objects so need to bring it forward.

Is it possible to change the renderOrder of the particle emitter material?

grimdeathr avatar Apr 12 '22 13:04 grimdeathr