UNPKG

896 BTypeScriptView Raw
1import { Program } from '../shader/Program';
2import { Shader } from '../shader/Shader';
3import { UniformGroup } from '../shader/UniformGroup';
4/**
5 * Helper that generates batching multi-texture shader. Use it with your new BatchRenderer
6 * @memberof PIXI
7 */
8export declare class BatchShaderGenerator {
9 /** Reference to the vertex shader source. */
10 vertexSrc: string;
11 /** Reference to the fragment shader template. Must contain "%count%" and "%forloop%". */
12 fragTemplate: string;
13 programCache: {
14 [key: number]: Program;
15 };
16 defaultGroupCache: {
17 [key: number]: UniformGroup;
18 };
19 /**
20 * @param vertexSrc - Vertex shader
21 * @param fragTemplate - Fragment shader template
22 */
23 constructor(vertexSrc: string, fragTemplate: string);
24 generateShader(maxTextures: number): Shader;
25 generateSampleSrc(maxTextures: number): string;
26}