UNPKG

pixi.js

Version:

<p align="center"> <a href="https://pixijs.com" target="_blank" rel="noopener noreferrer"> <img height="150" src="https://files.pixijs.download/branding/pixijs-logo-transparent-dark.svg?v=1" alt="PixiJS logo"> </a> </p> <br/> <p align="center">

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