浏览代码

fix for lower fps when reflections are disabled

Adam Bowman 8 年之前
父节点
当前提交
480e83c55b
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/Materials/babylon.standardMaterial.ts

+ 2 - 2
src/Materials/babylon.standardMaterial.ts

@@ -303,11 +303,11 @@ module BABYLON {
             this.getRenderTargetTextures = (): SmartArray<RenderTargetTexture> => {
                 this._renderTargets.reset();
 
-                if (this._reflectionTexture && this._reflectionTexture.isRenderTarget) {
+                if (StandardMaterial.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) {
                     this._renderTargets.push(this._reflectionTexture);
                 }
 
-                if (this._refractionTexture && this._refractionTexture.isRenderTarget) {
+                if (StandardMaterial.RefractionTextureEnabled && this._refractionTexture && this._refractionTexture.isRenderTarget) {
                     this._renderTargets.push(this._refractionTexture);
                 }