We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5584dd1 commit 1a493a9Copy full SHA for 1a493a9
src/library_glemu.js
@@ -2881,7 +2881,7 @@ var LibraryGLEmulation = {
2881
// User can override the maximum number of texture units that we emulate. Using fewer texture units increases runtime performance
2882
// slightly, so it is advantageous to choose as small value as needed.
2883
// Limit to a maximum of 28 to not overflow the state bits used for renderer caching (31 bits = 3 attributes + 28 texture units).
2884
- GLImmediate.MAX_TEXTURES = Math.max(Module['GL_MAX_TEXTURE_IMAGE_UNITS'] || GLctx.getParameter(GLctx.MAX_TEXTURE_IMAGE_UNITS), 28);
+ GLImmediate.MAX_TEXTURES = Math.min(Module['GL_MAX_TEXTURE_IMAGE_UNITS'] || GLctx.getParameter(GLctx.MAX_TEXTURE_IMAGE_UNITS), 28);
2885
2886
GLImmediate.TexEnvJIT.init(GLctx, GLImmediate.MAX_TEXTURES);
2887
0 commit comments