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">
21 lines (18 loc) • 780 B
JavaScript
import { UniformGroup } from '../../shared/shader/UniformGroup.mjs';
;
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({
uTextures: { value: sampleValues, type: `i32`, size: maxTextures }
}, { isStatic: true });
return batchSamplersUniformGroup;
}
export { getBatchSamplersUniformGroup };
//# sourceMappingURL=getBatchSamplersUniformGroup.mjs.map