From 8fd14688b6cbd5fc7cfb8cb53feef1124fa0fec2 Mon Sep 17 00:00:00 2001 From: Felipe Alfonso Date: Mon, 14 Aug 2017 23:36:41 -0300 Subject: [PATCH] Fix when rendering more than the buffer limit --- v3/src/checksum.js | 2 +- v3/src/gameobjects/lightlayer/DeferredRenderer.js | 3 ++- v3/src/gameobjects/lightlayer/ForwardRenderer.js | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/v3/src/checksum.js b/v3/src/checksum.js index 7bc529840..e8745c399 100644 --- a/v3/src/checksum.js +++ b/v3/src/checksum.js @@ -1,4 +1,4 @@ var CHECKSUM = { -build: 'eb7dc200-8100-11e7-b353-1b576d4fdd2c' +build: '37876e10-8162-11e7-b191-e9a855a11647' }; module.exports = CHECKSUM; \ No newline at end of file diff --git a/v3/src/gameobjects/lightlayer/DeferredRenderer.js b/v3/src/gameobjects/lightlayer/DeferredRenderer.js index 77f1121e3..b529b77f0 100644 --- a/v3/src/gameobjects/lightlayer/DeferredRenderer.js +++ b/v3/src/gameobjects/lightlayer/DeferredRenderer.js @@ -97,7 +97,8 @@ var DeferredRenderer = function (renderer, lightLayer, interpolationPercentage, if (renderer.currentTexture[0] !== frame.texture.source[frame.sourceIndex].glTexture || - renderer.currentTexture[1] !== spriteNormalPair.normalTextureRef.source[spriteNormalPair.spriteRef.frame.sourceIndex].glTexture) + renderer.currentTexture[1] !== spriteNormalPair.normalTextureRef.source[spriteNormalPair.spriteRef.frame.sourceIndex].glTexture || + batch.shouldFlush()) { batch.flush(lightLayer.gBufferShaderPass, lightLayer.renderTarget); renderer.setTexture(frame.texture.source[frame.sourceIndex].glTexture, 0); diff --git a/v3/src/gameobjects/lightlayer/ForwardRenderer.js b/v3/src/gameobjects/lightlayer/ForwardRenderer.js index 305baa02f..daf0b2f91 100644 --- a/v3/src/gameobjects/lightlayer/ForwardRenderer.js +++ b/v3/src/gameobjects/lightlayer/ForwardRenderer.js @@ -93,7 +93,8 @@ var ForwardRenderer = function (renderer, lightLayer, interpolationPercentage, c if (renderer.currentTexture[0] !== frame.texture.source[frame.sourceIndex].glTexture || - renderer.currentTexture[1] !== spriteNormalPair.normalTextureRef.source[spriteNormalPair.spriteRef.frame.sourceIndex].glTexture) + renderer.currentTexture[1] !== spriteNormalPair.normalTextureRef.source[spriteNormalPair.spriteRef.frame.sourceIndex].glTexture || + batch.shouldFlush()) { batch.flush(lightLayer.passShader, lightLayer.renderTarget); renderer.setTexture(frame.texture.source[frame.sourceIndex].glTexture, 0);