mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 20:53:39 +00:00
Merge pull request #6462 from EmilSV/particle-render-fix
fixed particle using a white texture if flush happened
This commit is contained in:
commit
1c6e0c81d1
1 changed files with 7 additions and 1 deletions
|
@ -53,7 +53,7 @@ var ParticleEmitterWebGLRenderer = function (renderer, emitter, camera, parentMa
|
|||
var getTint = Utils.getTintAppendFloatAlpha;
|
||||
var camerAlpha = camera.alpha;
|
||||
var emitterAlpha = emitter.alpha;
|
||||
var texture = emitter.texture.glTexture;
|
||||
var texture = emitter.frame.glTexture;
|
||||
|
||||
renderer.pipelines.preBatch(emitter);
|
||||
|
||||
|
@ -118,6 +118,12 @@ var ParticleEmitterWebGLRenderer = function (renderer, emitter, camera, parentMa
|
|||
var quad = calcMatrix.setQuad(x, y, x + frame.width, y + frame.height, roundPixels);
|
||||
|
||||
var tint = getTint(particle.tint, alpha);
|
||||
|
||||
if (pipeline.shouldFlush(6))
|
||||
{
|
||||
pipeline.flush();
|
||||
textureUnit = pipeline.setGameObject(emitter, emitter.frame);
|
||||
}
|
||||
|
||||
pipeline.batchQuad(emitter, quad[0], quad[1], quad[2], quad[3], quad[4], quad[5], quad[6], quad[7], frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, tintEffect, texture, textureUnit);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue