Don't forget to update the batch count

This commit is contained in:
Richard Davey 2022-10-09 17:30:27 +01:00
parent 70ef38c03c
commit 3c54c852dc

View file

@ -115,12 +115,19 @@ var PointLightPipeline = new Class({
this.flush(); this.flush();
} }
if (!this.currentBatch)
{
this.setTexture2D();
}
this.batchLightVert(x0, y0, lightX, lightY, radius, attenuation, r, g, b, a); this.batchLightVert(x0, y0, lightX, lightY, radius, attenuation, r, g, b, a);
this.batchLightVert(x1, y1, lightX, lightY, radius, attenuation, r, g, b, a); this.batchLightVert(x1, y1, lightX, lightY, radius, attenuation, r, g, b, a);
this.batchLightVert(x2, y2, lightX, lightY, radius, attenuation, r, g, b, a); this.batchLightVert(x2, y2, lightX, lightY, radius, attenuation, r, g, b, a);
this.batchLightVert(x0, y0, lightX, lightY, radius, attenuation, r, g, b, a); this.batchLightVert(x0, y0, lightX, lightY, radius, attenuation, r, g, b, a);
this.batchLightVert(x2, y2, lightX, lightY, radius, attenuation, r, g, b, a); this.batchLightVert(x2, y2, lightX, lightY, radius, attenuation, r, g, b, a);
this.batchLightVert(x3, y3, lightX, lightY, radius, attenuation, r, g, b, a); this.batchLightVert(x3, y3, lightX, lightY, radius, attenuation, r, g, b, a);
this.currentBatch.count = (this.vertexCount - this.currentBatch.start);
}, },
/** /**