UNPKG

pixi.js

Version:

PixiJS — The HTML5 Creation Engine =============

23 lines (19 loc) 833 B
'use strict'; var UniformGroup = require('../../shared/shader/UniformGroup.js'); "use strict"; const batchSamplersUniformGroupHash = {}; function getBatchSamplersUniformGroup(maxTextures) { let batchSamplersUniformGroup = batchSamplersUniformGroupHash[maxTextures]; if (batchSamplersUniformGroup) return batchSamplersUniformGroup; const sampleValues = new Int32Array(maxTextures); for (let i = 0; i < maxTextures; i++) { sampleValues[i] = i; } batchSamplersUniformGroup = batchSamplersUniformGroupHash[maxTextures] = new UniformGroup.UniformGroup({ uTextures: { value: sampleValues, type: `i32`, size: maxTextures } }, { isStatic: true }); return batchSamplersUniformGroup; } exports.getBatchSamplersUniformGroup = getBatchSamplersUniformGroup; //# sourceMappingURL=getBatchSamplersUniformGroup.js.map