declare const _default: "\n#include \"gsplatCommonVS\"\n\nvarying gaussianUV: vec2f;\nvarying gaussianColor: vec4f;\n\n#ifndef DITHER_NONE\n    varying id: f32;\n#endif\n\nconst discardVec: vec4f = vec4f(0.0, 0.0, 2.0, 1.0);\n\n#ifdef PREPASS_PASS\n    varying vLinearDepth: f32;\n#endif\n\n@vertex\nfn vertexMain(input: VertexInput) -> VertexOutput {\n    var output: VertexOutput;\n\n    // read gaussian details\n    var source: SplatSource;\n    if (!initSource(&source)) {\n        output.position = discardVec;\n        return output;\n    }\n\n    let modelCenter: vec3f = readCenter(&source);\n\n    var center: SplatCenter;\n    if (!initCenter(modelCenter, &center)) {\n        output.position = discardVec;\n        return output;\n    }\n\n    // project center to screen space\n    var corner: SplatCorner;\n    if (!initCorner(&source, &center, &corner)) {\n        output.position = discardVec;\n        return output;\n    }\n\n    // read color\n    var clr: vec4f = readColor(&source);\n\n    #if GSPLAT_AA\n        // apply AA compensation\n        clr.a = clr.a * corner.aaFactor;\n    #endif\n\n    // evaluate spherical harmonics\n    #if SH_BANDS > 0\n        // calculate the model-space view direction\n        let modelView3x3 = mat3x3f(center.modelView[0].xyz, center.modelView[1].xyz, center.modelView[2].xyz);\n        let dir = normalize(center.view * modelView3x3);\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        clr = vec4f(clr.xyz + evalSH(&sh, dir) * scale, clr.a);\n    #endif\n\n    clipCorner(&corner, clr.w);\n\n    // write output\n    output.position = center.proj + vec4f(corner.offset, 0.0, 0.0);\n    output.gaussianUV = corner.uv;\n    output.gaussianColor = vec4f(prepareOutputFromGamma(max(clr.xyz, vec3f(0.0))), clr.w);\n\n    #ifndef DITHER_NONE\n        output.id = f32(source.id);\n    #endif\n\n    #ifdef PREPASS_PASS\n        output.vLinearDepth = -center.view.z;\n    #endif\n\n    return output;\n}\n";
export default _default;
