Files
nothoughts/node_modules/pixi.js/lib/rendering/batcher/shared/DefaultShader.mjs
2025-08-04 18:57:35 +02:00

39 lines
1.3 KiB
JavaScript

import { compileHighShaderGlProgram, compileHighShaderGpuProgram } from '../../high-shader/compileHighShaderToProgram.mjs';
import { colorBitGl, colorBit } from '../../high-shader/shader-bits/colorBit.mjs';
import { generateTextureBatchBitGl, generateTextureBatchBit } from '../../high-shader/shader-bits/generateTextureBatchBit.mjs';
import { roundPixelsBitGl, roundPixelsBit } from '../../high-shader/shader-bits/roundPixelsBit.mjs';
import { getBatchSamplersUniformGroup } from '../../renderers/gl/shader/getBatchSamplersUniformGroup.mjs';
import { Shader } from '../../renderers/shared/shader/Shader.mjs';
"use strict";
class DefaultShader extends Shader {
constructor(maxTextures) {
const glProgram = compileHighShaderGlProgram({
name: "batch",
bits: [
colorBitGl,
generateTextureBatchBitGl(maxTextures),
roundPixelsBitGl
]
});
const gpuProgram = compileHighShaderGpuProgram({
name: "batch",
bits: [
colorBit,
generateTextureBatchBit(maxTextures),
roundPixelsBit
]
});
super({
glProgram,
gpuProgram,
resources: {
batchSamplers: getBatchSamplersUniformGroup(maxTextures)
}
});
}
}
export { DefaultShader };
//# sourceMappingURL=DefaultShader.mjs.map