declare const _default: "\n\n#define GSPLAT_CENTER_NOPROJ\n\n// pre-computed model matrix decomposition (declared before includes, used by\n// gsplatWorkBufferGeometryPS)\nuniform model_scale: vec3f;\nuniform model_rotation: vec4f;  // (x,y,z,w) format\n\n#include \"gsplatHelpersVS\"\n#include \"gsplatFormatVS\"\n#include \"gsplatStructsVS\"\n#include \"gsplatDeclarationsVS\"\n#include \"gsplatCenterVS\"\n#include \"gsplatEvalSHVS\"\n#include \"gsplatQuatToMat3VS\"\n#include \"gsplatReadVS\"\n#include \"gsplatWorkBufferGeometryPS\"\n\n// Module-scope output for write functions to access\nvar<private> processOutput: FragmentOutput;\n\n// Work buffer output write functions (generated by GSplatFormat.getOutputDeclarations)\n#include \"gsplatWorkBufferOutputVS\"\n\n#include \"gsplatWriteVS\"\n#include \"gsplatModifyVS\"\n\n// Packed sub-draw params: (sourceBase, colStart, rowWidth, rowStart)\nvarying @interpolate(flat) vSubDraw: vec4i;\n\nuniform uColorMultiply: vec3f;\n\n#ifdef GSPLAT_ID\n    uniform uId: u32;\n#endif\n\n@fragment\nfn fragmentMain(input: FragmentInput) -> FragmentOutput {\n    // Compute source index from packed sub-draw varying: (sourceBase, colStart, rowWidth, rowStart)\n    let localRow = i32(input.position.y) - input.vSubDraw.w;\n    let localCol = i32(input.position.x) - input.vSubDraw.y;\n    let originalIndex = u32(input.vSubDraw.x + localRow * input.vSubDraw.z + localCol);\n\n    // Initialize global splat for format read functions\n    setSplat(originalIndex);\n\n    // World-space geometry to store. Rotation/scale default to identity and are only computed on\n    // the full-render path; under GSPLAT_COLOR_ONLY they are ignored by writeSplat (DCE'd).\n    var worldCenter: vec3f;\n    var worldRotation = vec4f(0.0, 0.0, 0.0, 1.0);\n    var worldScale = vec3f(1.0);\n    #if SH_BANDS > 0\n        var dir: vec3f;   // model-space view direction\n    #endif\n\n    #ifdef GSPLAT_WORKBUFFER_GEOMETRY\n\n        // Color-only update sourcing geometry from previously written work buffer data at this\n        // destination pixel. The stored center already includes the model transform and\n        // modifySplatCenter / modifySplatRotationScale, so neither is re-applied here.\n        initWorkBufferGeometry(vec2i(input.position.xy));\n        worldCenter = workBufferWorldCenter();\n\n        #if SH_BANDS > 0\n            // model-space view direction (matches the source path up to non-uniform model scale)\n            dir = normalize(quatRotateInv(uniform.model_rotation, worldCenter - uniform.uCameraPosition));\n        #endif\n\n    #else\n\n        // read center in local space\n        var modelCenter = getCenter();\n\n        // compute world-space center for storage\n        worldCenter = (uniform.matrix_model * vec4f(modelCenter, 1.0)).xyz;\n        var center: SplatCenter;\n        initCenter(modelCenter, &center);\n\n        // Get source rotation and scale\n        // getRotation() returns (w,x,y,z) format, convert to (x,y,z,w) for quatMul\n        let srcRotation = getRotation().yzwx;\n        let srcScale = getScale();\n\n        // Combine: world = model * source (both in x,y,z,w format)\n        worldRotation = vec4f(quatMul(half4(uniform.model_rotation), half4(srcRotation)));\n        // Ensure w is positive so sqrt() reconstruction works correctly\n        // (quaternions q and -q represent the same rotation)\n        if (worldRotation.w < 0.0) {\n            worldRotation = -worldRotation;\n        }\n        worldScale = uniform.model_scale * srcScale;\n\n        // Apply custom center modification\n        let originalCenter = worldCenter;\n        modifySplatCenter(&worldCenter);\n\n        // Apply custom rotation/scale modification\n        modifySplatRotationScale(originalCenter, worldCenter, &worldRotation, &worldScale);\n\n        #if SH_BANDS > 0\n            // calculate the model-space view direction\n            dir = normalize(center.view * mat3x3f(center.modelView[0].xyz, center.modelView[1].xyz, center.modelView[2].xyz));\n        #endif\n\n    #endif\n\n    // read color\n    var color = getColor();\n\n    // evaluate spherical harmonics\n    #if SH_BANDS > 0\n        // read sh coefficients\n        var sh: array<half3, SH_COEFFS>;\n        var scale: f32;\n        readSHData(&sh, &scale);\n\n        // evaluate\n        color = vec4f(color.xyz + vec3f(evalSH(&sh, dir) * half(scale)), color.w);\n    #endif\n\n    // Apply custom color modification\n    modifySplatColor(worldCenter, &color);\n\n    color = vec4f(color.xyz * uniform.uColorMultiply, color.w);\n\n    // write color + transform using format-specific encoding (rotation/scale ignored under\n    // GSPLAT_COLOR_ONLY)\n    writeSplat(worldCenter, worldRotation, worldScale, color);\n\n    #ifdef GSPLAT_ID\n        writePcId(vec4u(uniform.uId, 0u, 0u, 0u));\n    #endif\n\n    return processOutput;\n}\n";
export default _default;
