shadow$provide.module$node_modules$pixi_DOT_js$lib$rendering$renderers$gl$shader$GenerateShaderSyncCode = function(global, require, module, exports) {
  var BufferResource = require("module$node_modules$pixi_DOT_js$lib$rendering$renderers$shared$buffer$BufferResource"), UniformGroup = require("module$node_modules$pixi_DOT_js$lib$rendering$renderers$shared$shader$UniformGroup"), TextureSource = require("module$node_modules$pixi_DOT_js$lib$rendering$renderers$shared$texture$sources$TextureSource");
  "use strict";
  exports.generateShaderSyncCode = function(shader, shaderSystem) {
    const funcFragments = [], headerFragments = ["\n        var g \x3d s.groups;\n        var sS \x3d r.shader;\n        var p \x3d s.glProgram;\n        var ugS \x3d r.uniformGroup;\n        var resources;\n    "];
    let addedTextreSystem = !1, textureCount = 0;
    const programData = shaderSystem._getProgramData(shader.glProgram);
    for (const i in shader.groups) {
      const group = shader.groups[i];
      funcFragments.push(`
            resources = g[${i}].resources;
        `);
      for (const j in group.resources) {
        var resource = group.resources[j];
        resource instanceof UniformGroup.UniformGroup ? resource.ubo ? (resource = shader._uniformBindMap[i][Number(j)], funcFragments.push(`
                        sS.bindUniformBlock(
                            resources[${j}],
                            '${resource}',
                            ${shader.glProgram._uniformBlockData[resource].index}
                        );
                    `)) : funcFragments.push(`
                        ugS.updateUniformGroup(resources[${j}], p, sD);
                    `) : resource instanceof BufferResource.BufferResource ? (resource = shader._uniformBindMap[i][Number(j)], funcFragments.push(`
                    sS.bindUniformBlock(
                        resources[${j}],
                        '${resource}',
                        ${shader.glProgram._uniformBlockData[resource].index}
                    );
                `)) : resource instanceof TextureSource.TextureSource && (resource = programData.uniformData[shader._uniformBindMap[i][j]]) && (addedTextreSystem || (addedTextreSystem = !0, headerFragments.push("\n                        var tS \x3d r.texture;\n                        ")), shaderSystem._gl.uniform1i(resource.location, textureCount), funcFragments.push(`
                        tS.bind(resources[${j}], ${textureCount});
                    `), textureCount++);
      }
    }
    shader = [...headerFragments, ...funcFragments].join("\n");
    return new Function("r", "s", "sD", shader);
  };
};

//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$rendering$renderers$gl$shader$GenerateShaderSyncCode.js.map
