|
@@ -55963,11 +55963,16 @@ var BABYLON;
|
|
}
|
|
}
|
|
engine.bindBuffers(this._vertexBuffers, this._indexBuffer, effect);
|
|
engine.bindBuffers(this._vertexBuffers, this._indexBuffer, effect);
|
|
// Draw order
|
|
// Draw order
|
|
- if (this.blendMode === ParticleSystem.BLENDMODE_ONEONE) {
|
|
|
|
- engine.setAlphaMode(BABYLON.Engine.ALPHA_ONEONE);
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- engine.setAlphaMode(BABYLON.Engine.ALPHA_COMBINE);
|
|
|
|
|
|
+ switch (this.blendMode) {
|
|
|
|
+ case ParticleSystem.BLENDMODE_ADD:
|
|
|
|
+ engine.setAlphaMode(BABYLON.Engine.ALPHA_ADD);
|
|
|
|
+ break;
|
|
|
|
+ case ParticleSystem.BLENDMODE_ONEONE:
|
|
|
|
+ engine.setAlphaMode(BABYLON.Engine.ALPHA_ONEONE);
|
|
|
|
+ break;
|
|
|
|
+ case ParticleSystem.BLENDMODE_STANDARD:
|
|
|
|
+ engine.setAlphaMode(BABYLON.Engine.ALPHA_COMBINE);
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
if (this.forceDepthWrite) {
|
|
if (this.forceDepthWrite) {
|
|
engine.setDepthWrite(true);
|
|
engine.setDepthWrite(true);
|
|
@@ -56259,6 +56264,10 @@ var BABYLON;
|
|
* Blend current color and particle color using particle’s alpha.
|
|
* Blend current color and particle color using particle’s alpha.
|
|
*/
|
|
*/
|
|
ParticleSystem.BLENDMODE_STANDARD = 1;
|
|
ParticleSystem.BLENDMODE_STANDARD = 1;
|
|
|
|
+ /**
|
|
|
|
+ * Add current color and particle color multiplied by particle’s alpha.
|
|
|
|
+ */
|
|
|
|
+ ParticleSystem.BLENDMODE_ADD = 2;
|
|
return ParticleSystem;
|
|
return ParticleSystem;
|
|
}());
|
|
}());
|
|
BABYLON.ParticleSystem = ParticleSystem;
|
|
BABYLON.ParticleSystem = ParticleSystem;
|
|
@@ -57311,11 +57320,16 @@ var BABYLON;
|
|
this._renderEffect.setFloat4("vClipPlane", clipPlane.normal.x, clipPlane.normal.y, clipPlane.normal.z, clipPlane.d);
|
|
this._renderEffect.setFloat4("vClipPlane", clipPlane.normal.x, clipPlane.normal.y, clipPlane.normal.z, clipPlane.d);
|
|
}
|
|
}
|
|
// Draw order
|
|
// Draw order
|
|
- if (this.blendMode === BABYLON.ParticleSystem.BLENDMODE_ONEONE) {
|
|
|
|
- this._engine.setAlphaMode(BABYLON.Engine.ALPHA_ONEONE);
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- this._engine.setAlphaMode(BABYLON.Engine.ALPHA_COMBINE);
|
|
|
|
|
|
+ switch (this.blendMode) {
|
|
|
|
+ case BABYLON.ParticleSystem.BLENDMODE_ADD:
|
|
|
|
+ this._engine.setAlphaMode(BABYLON.Engine.ALPHA_ADD);
|
|
|
|
+ break;
|
|
|
|
+ case BABYLON.ParticleSystem.BLENDMODE_ONEONE:
|
|
|
|
+ this._engine.setAlphaMode(BABYLON.Engine.ALPHA_ONEONE);
|
|
|
|
+ break;
|
|
|
|
+ case BABYLON.ParticleSystem.BLENDMODE_STANDARD:
|
|
|
|
+ this._engine.setAlphaMode(BABYLON.Engine.ALPHA_COMBINE);
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
if (this.forceDepthWrite) {
|
|
if (this.forceDepthWrite) {
|
|
this._engine.setDepthWrite(true);
|
|
this._engine.setDepthWrite(true);
|