declare const _default: "\n\n#define GSPLAT_CENTER_NOPROJ\n\n#include \"gsplatStructsVS\"\n#include \"gsplatCenterVS\"\n#include \"gsplatEvalSHVS\"\n#include \"gsplatQuatToMat3VS\"\n#include \"gsplatSourceFormatVS\"\n\nuniform uTransform: mat4x4f;\n\nuniform uStartLine: i32;      // Start row in destination texture\nuniform uViewportWidth: i32;  // Width of the destination viewport in pixels\n\n#ifdef GSPLAT_LOD\n    // LOD intervals texture\n    var uIntervalsTexture: texture_2d<u32>;\n#endif\n\n#ifdef GSPLAT_COLORIZE\n    uniform uLodColor: vec3f;\n#endif\n\n// number of splats\nuniform uActiveSplats: i32;\n\n@fragment\nfn fragmentMain(input: FragmentInput) -> FragmentOutput {\n    var output: FragmentOutput;\n    \n    // local fragment coordinates (within the viewport)\n    let localFragCoords = vec2i(i32(input.position.x), i32(input.position.y) - uniform.uStartLine);\n\n    // linear index of the splat\n    let targetIndex = localFragCoords.y * uniform.uViewportWidth + localFragCoords.x;\n    \n    if (targetIndex >= uniform.uActiveSplats) {\n\n        // Out of bounds: write zeros\n        output.color = vec4f(0.0);\n        output.color1 = vec4f(0.0);\n        output.color2 = vec4f(0.0);\n        output.color3 = vec4f(0.0);\n\n    } else {\n\n        #ifdef GSPLAT_LOD\n            // Use intervals texture to remap target index to source index\n            let intervalsSize = i32(textureDimensions(uIntervalsTexture, 0).x);\n            let intervalUV = vec2i(targetIndex % intervalsSize, targetIndex / intervalsSize);\n            let originalIndex = textureLoad(uIntervalsTexture, intervalUV, 0).r;\n        #else\n            let originalIndex = targetIndex;\n        #endif\n        \n        // source texture size\n        var srcSize: u32;\n        #if defined(GSPLAT_SOGS_DATA) || defined(GSPLAT_COMPRESSED_DATA)\n            srcSize = u32(textureDimensions(packedTexture, 0).x);\n        #else\n            srcSize = u32(textureDimensions(splatColor, 0).x);\n        #endif\n        \n        // Create SplatSource used to sample splat data textures\n        var source: SplatSource;\n        source.id = u32(originalIndex);\n        source.uv = vec2i(i32(source.id % srcSize), i32(source.id / srcSize));\n\n        // read and transform center\n        var modelCenter = readCenter(&source);\n        modelCenter = (uniform.uTransform * vec4f(modelCenter, 1.0)).xyz;\n        var center: SplatCenter;\n        initCenter(modelCenter, &center);\n\n        // read and transform covariance\n        var covA: vec3f;\n        var covB: vec3f;\n        readCovariance(&source, &covA, &covB);\n\n        let C = mat3x3f(\n            vec3f(covA.x, covA.y, covA.z),\n            vec3f(covA.y, covB.x, covB.y),\n            vec3f(covA.z, covB.y, covB.z)\n        );\n        let linear = mat3x3f(uniform.uTransform[0].xyz, uniform.uTransform[1].xyz, uniform.uTransform[2].xyz);\n        let Ct = linear * C * transpose(linear);\n        covA = Ct[0];\n        covB = vec3f(Ct[1][1], Ct[1][2], Ct[2][2]);\n\n        // read color\n        var color = readColor(&source);\n\n        // evaluate spherical harmonics\n        #if SH_BANDS > 0\n            // calculate the model-space view direction\n            let dir = normalize(center.view * mat3x3f(center.modelView[0].xyz, center.modelView[1].xyz, center.modelView[2].xyz));\n\n            // read sh coefficients\n            var sh: array<vec3f, SH_COEFFS>;\n            var scale: f32;\n            readSHData(&source, &sh, &scale);\n\n            // evaluate\n            color = vec4f(color.xyz + evalSH(&sh, dir) * scale, color.w);\n        #endif\n\n        #ifdef GSPLAT_COLORIZE\n            color = vec4f(color.xyz * uniform.uLodColor, color.w);\n        #endif\n\n        // write out results\n        output.color = color;\n        output.color1 = vec4f(modelCenter, 1.0);\n        output.color2 = vec4f(covA, 1.0);\n        output.color3 = vec4f(covB, 1.0);\n    }\n    \n    return output;\n}\n";
export default _default;
