Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    A pick material that tracks the visual material's whole per-epoch appearance state, not just a single boolean. Implemented by both mesh pick wrappers, and by nothing else — the two members below are the two things a mesh pick pass must copy from its visual twin that the sibling pick materials do not.

    Hierarchy

    • ShaderMaterial
      • MeshPickingMaterial

    Implements

    Index
    • Update the camera-dependent uniforms.

      _resolution / _isOrtho are accepted and IGNORED — a mesh has no screen-space footprint to size, and the near fade's ortho test reads three's isOrthographic. Only nearCull is consumed, and it must be kept identical to the visual material's or pick coverage would stop matching visible coverage near the camera. Mirrors MeshMaterial.updateCameraParams.

      Parameters

      • _resolution: Vector2
      • _isOrtho: boolean = false
      • OptionalnearCull: number
      • Optional_pixelRatio: number

      Returns void

    • Install the real base-colour texture once the data has arrived.

      A plain uniform write here, unlike the TSL twin: the sampler is declared by the constructor's define, so only the bound image changes and no recompile is needed. Present under the same NAME as the TSL method so applyMeshTexture has one call site rather than a backend branch.

      A no-op when the node has no texture — the uniform only exists in that variant.

      Parameters

      • tex: Texture<unknown, TextureEventMap> | null

      Returns void

    • Match the visual material's face culling.

      Load-bearing rather than cosmetic: side is a property of the current displayDims epoch (an undecidable frame forces DoubleSide, an odd-parity reflection stays single-sided — see applyMeshSide), so it changes at runtime. If the pick pass kept DoubleSide while the visual culls back faces, the interior faces of a sliced closed isosurface would rasterize into the pick buffer at true surface depth: pickable where nothing is drawn, AND occluding picks of the nodes actually visible through the opening.

      Guarded on change — a side write is a program-invalidating event on the GLSL backend and a pipeline rebuild on WebGPU, so it must not fire per frame.

      Parameters

      • side: Side

      Returns void

    • Clone this picking material. The inherited Material.clone() calls the constructor with no config (so config.nodeId would be undefined), so — mirroring the sibling pick wrappers — construct with the same nodeId and copy the runtime-tuned values across explicitly.

      Returns this