|
7 | 7 |
|
8 | 8 | var BaseCamera = require('../../cameras/2d/BaseCamera'); |
9 | 9 | var CameraEvents = require('../../cameras/2d/events'); |
| 10 | +var CheckShaderMax = require('./CheckShaderMax'); |
10 | 11 | var Class = require('../../utils/Class'); |
11 | 12 | var CONST = require('../../const'); |
12 | 13 | var GameEvents = require('../../core/events'); |
@@ -709,13 +710,19 @@ var WebGLRenderer = new Class({ |
709 | 710 | this.currentTextures[index] = null; |
710 | 711 | } |
711 | 712 |
|
| 713 | + // Check maximum shader if statements |
| 714 | + var maxGPUTextures = CheckShaderMax(gl, gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS)); |
| 715 | + |
| 716 | + console.log('maxGPUTextures', maxGPUTextures); |
| 717 | + |
712 | 718 | // Clear previous pipelines and reload default ones |
713 | 719 | this.pipelines = {}; |
714 | 720 |
|
715 | | - this.addPipeline('TextureTintPipeline', new TextureTintPipeline({ game: game, renderer: this })); |
716 | | - this.addPipeline('TextureTintStripPipeline', new TextureTintStripPipeline({ game: game, renderer: this })); |
717 | | - this.addPipeline('BitmapMaskPipeline', new BitmapMaskPipeline({ game: game, renderer: this })); |
718 | | - this.addPipeline('Light2D', new ForwardDiffuseLightPipeline({ game: game, renderer: this, maxLights: config.maxLights })); |
| 721 | + this.addPipeline('TextureTintPipeline', new TextureTintPipeline({ game: game, renderer: this, maxGPUTextures: maxGPUTextures })); |
| 722 | + |
| 723 | + // this.addPipeline('TextureTintStripPipeline', new TextureTintStripPipeline({ game: game, renderer: this })); |
| 724 | + // this.addPipeline('BitmapMaskPipeline', new BitmapMaskPipeline({ game: game, renderer: this })); |
| 725 | + // this.addPipeline('Light2D', new ForwardDiffuseLightPipeline({ game: game, renderer: this, maxLights: config.maxLights })); |
719 | 726 |
|
720 | 727 | this.setBlendMode(CONST.BlendModes.NORMAL); |
721 | 728 |
|
|
0 commit comments