UNPKG

647 BTypeScriptView Raw
1/**
2 * The maximum recommended texture units to use.
3 * In theory the bigger the better, and for desktop we'll use as many as we can.
4 * But some mobile devices slow down if there is to many branches in the shader.
5 * So in practice there seems to be a sweet spot size that varies depending on the device.
6 *
7 * In v4, all mobile devices were limited to 4 texture units because for this.
8 * In v5, we allow all texture units to be used on modern Apple or Android devices.
9 * @private
10 * @param {number} max
11 * @returns {number} The maximum recommended texture units to use.
12 */
13export declare function maxRecommendedTextures(max: number): number;