declare const _default: "struct MaxWeightVaryings {\n @builtin(position) position: vec4,\n @location(0) weights: vec4,\n};\n\nconst MAX_WEIGHT_REDUCTION_SIZE: u32 = 16u;\n\n@vertex\nfn vertexMain(@builtin(vertex_index) vertexIndex: u32) -> MaxWeightVaryings {\n var output: MaxWeightVaryings;\n let textureSize = u32(maxWeight.textureSize);\n let reducedTextureSize =\n (textureSize + MAX_WEIGHT_REDUCTION_SIZE - 1u) / MAX_WEIGHT_REDUCTION_SIZE;\n let blockCoordinates = vec2(\n vertexIndex % reducedTextureSize,\n vertexIndex / reducedTextureSize\n );\n var maximumWeights = vec4(0.0);\n\n for (var y = 0u; y < MAX_WEIGHT_REDUCTION_SIZE; y++) {\n for (var x = 0u; x < MAX_WEIGHT_REDUCTION_SIZE; x++) {\n let textureCoordinates = blockCoordinates * MAX_WEIGHT_REDUCTION_SIZE + vec2(x, y);\n\n if (textureCoordinates.x < textureSize && textureCoordinates.y < textureSize) {\n let weights = textureLoad(inTexture, vec2(textureCoordinates), 0);\n maximumWeights.r = max(maximumWeights.r, weights.r);\n maximumWeights.g = max(maximumWeights.g, weights.r / max(1.0, weights.a));\n maximumWeights.b = max(maximumWeights.b, weights.b);\n maximumWeights.a = max(maximumWeights.a, weights.a);\n }\n }\n }\n\n output.position = vec4(0.0, 0.0, 0.0, 1.0);\n output.weights = maximumWeights;\n return output;\n}\n\n@fragment\nfn fragmentMain(varyings: MaxWeightVaryings) -> @location(0) vec4 {\n return varyings.weights;\n}\n"; export default _default; //# sourceMappingURL=max.wgsl.d.ts.map