Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    interface MeshTSLConfig {
        useColormap?: boolean;
        gammaOne?: boolean;
        noGOG?: boolean;
        shading?: MeshShadingMode;
        useBaseColorTexture?: boolean;
        baseColorTextureLuminance?: boolean;
        blendingMode?: BlendingModeName;
        useMaxRGBContribution?: boolean;
    }
    Index
    useColormap?: boolean

    Read aScalar + the LUT instead of the color attribute.

    gammaOne?: boolean

    When true (gamma == 1.0), the gamma pow() is skipped — pow(x, 1) == x. Mirrors the GLSL3 LUXAR_GAMMA_ONE define.

    noGOG?: boolean

    Skip the vColor * uIntensity + uOffset GOG chain when the wrapper knows intensity == 1 && offset == 0. Mirrors LUXAR_NO_GOG.

    shading?: MeshShadingMode

    How normals are obtained: stored ('smooth'), screen-space derivatives ('flat'), or not at all ('none', unlit).

    Mirrors LUXAR_MESH_FLAT_NORMAL / LUXAR_MESH_NO_SHADING, and like them this is a BUILD-time choice, not a runtime branch: a declared-but-unbound normal reads (0, 0, 0, 1) rather than "absent", so there is no runtime value meaning "no normals". createMeshNode computes it once per node from the authored shading plus the stored normals' validity for the active displayDims, and hands the same answer to both backends (§6.2).

    ONE enum rather than two booleans, because flatNormal && noShading has no meaning and an enum keeps it from existing.

    useBaseColorTexture?: boolean

    Sample the base colour from uBaseColorTex through the uv attribute. Mirrors LUXAR_MESH_BASE_COLOR_TEX.

    Build-time for the same reason useColormap is: it decides whether the uv attribute and the vUv varying exist in the vertex layout at all. WebGPU bakes attribute identity into the pipeline, so this cannot become a runtime branch.

    baseColorTextureLuminance?: boolean

    Whether the base-colour texture is single-channel, so red is replicated to RGB. Mirrors LUXAR_MESH_TEX_LUMINANCE.

    blendingMode?: BlendingModeName

    Luxar blending mode. Drives the fragment's emission shape (cutout / premultiplied / alpha-weighted) and the THREE framebuffer state. Defaults to 'opaque' — the MESH default, unlike the siblings' 'additive' (§6.3).

    useMaxRGBContribution?: boolean

    Explicit override for the max-mode RGB premultiply. When undefined it is derived from the blending mode, exactly as in the sibling factories.