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

    Module rendering/materials/mesh/material-glsl

    Mesh material (GLSL3 / THREE.ShaderMaterial).

    The fourth member of the visual-material family, and the first one that shades. Structurally simpler than its three siblings — no element texture, no sorted-index slot — because a mesh needs none of the instanced-quad machinery: its size is its geometry, so there is nothing to project a sprite extent for and no per-element storage to index into.

    It is a CameraAwareMaterial, but for only half of the contract's reason. The fov/resolution half is genuinely inapplicable (there is no screen-space size to recompute), so both are ignored; what mesh does need is the projection mode and the near-cull distance, because the shared perspectiveNearFade applies to a surface exactly as it does to a sprite — a triangle that clipped hard against the near plane while every other type faded would be the only popping geometry in the scene (#1431).

    It does implement ColormapAwareMaterial, which mesh needs in full: scalars + colormap is a first-class authoring path for a surface (curvature, thickness, expression level painted on an isosurface).

    MeshMaterial
    MeshMaterialConfig