diff --git a/changelog/3.90/CHANGELOG-v3.90.md b/changelog/3.90/CHANGELOG-v3.90.md index 41a8674db0..14c8b446f9 100644 --- a/changelog/3.90/CHANGELOG-v3.90.md +++ b/changelog/3.90/CHANGELOG-v3.90.md @@ -12,6 +12,7 @@ # Bug Fixes +* Fix `RenderTexture` crashing in the presence of a light. * Fix failure to restore compressed textures after WebGL context loss. * Fix a single WebGL error, with no visual side-effects, from occurring while calling `Shader.setRenderToTexture()` after the game has started running. Actually, the root cause was leaving new WebGL textures bound after creation. diff --git a/src/renderer/webgl/pipelines/LightPipeline.js b/src/renderer/webgl/pipelines/LightPipeline.js index cfa7e33d71..ab0b4bd5b5 100644 --- a/src/renderer/webgl/pipelines/LightPipeline.js +++ b/src/renderer/webgl/pipelines/LightPipeline.js @@ -375,7 +375,7 @@ var LightPipeline = new Class({ if (!gameObject) { - return this.renderer.normalMap; + return this.renderer.normalTexture; } else if (gameObject.displayTexture) { @@ -399,7 +399,7 @@ var LightPipeline = new Class({ if (!normalMap) { - return this.renderer.normalMap; + return this.renderer.normalTexture; } return normalMap.glTexture;