Documentation
    Preparing search index...

    Variable PARTICLE_ID_SHADER_SOURCEConst

    PARTICLE_ID_SHADER_SOURCE: "struct ParticleIdUniforms {\n projection : mat4x4<f32>,\n view : mat4x4<f32>,\n model : mat4x4<f32>,\n pickId : vec4<f32>,\n};\n\n@group(0) @binding(0) var<uniform> id : ParticleIdUniforms;\n\n@vertex\nfn vertexMain(\n @location(0) corner : vec3<f32>,\n @location(1) instancePosition : vec3<f32>,\n @location(2) instanceSize : f32,\n @location(3) instanceColor : vec4<f32>,\n) -> @builtin(position) vec4<f32> {\n var center = id.view * id.model * vec4<f32>(instancePosition, 1.0);\n center.x = center.x + corner.x * instanceSize;\n center.y = center.y + corner.y * instanceSize;\n let clip = id.projection * center;\n // WebGL clip depth [-w, w] onto WebGPU's [0, w]; see wgpu-unlit.ts.\n return vec4<f32>(clip.x, clip.y, (clip.z + clip.w) * 0.5, clip.w);\n}\n\n@fragment\nfn fragmentMain() -> @location(0) vec4<f32> {\n return id.pickId;\n}\n"

    The particle id pass's WGSL — the §36 billboard vertex (PARTICLE_SHADER_SOURCE: view·model, then view-space corner offset, then projection, then the unlit clip-depth remap) with a flat pickId fragment. Compiled lazily on the service's first particle item, never at registration or construction. Kept private on the service (WebGL already exports ParticleIdProgram; this name must not collide).