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

    Module rendering/materials/mesh-physical/config

    The physical mesh material's configuration, defaults and the ONE mapping from Luxar attrs onto three's material properties.

    Both wrappers — PhysicalMeshMaterial extends THREE.MeshPhysicalMaterial (WebGL) and PhysicalMeshTSLMaterial extends MeshPhysicalNodeMaterial (WebGPU) — call the functions in this file rather than carrying their own copies, because the two three classes share every property name this module writes. One mapping means the two backends cannot disagree about what roughness=0.4 or opacity=0.3 does; two copies would be a divergence waiting for the next knob.

    The knobs themselves are ONE table, PHYSICAL_MESH_KNOBS: the attr name, the three property it lands on, its domain and default, how a slider should present it, and whether crossing zero selects a shader variant. The construction mapping, the live Layers-panel sliders and the unit tests all read that table, so a knob added there exists everywhere at once.

    Nothing here imports three/webgpu: the TSL twin lives in the lazy cone and reaches these helpers, never the other way round.

    PhysicalKnobSpec
    PhysicalMeshMaterialConfig
    PhysicalMeshHost
    PhysicalCompositingInputs
    PhysicalCompositing
    PhysicalKnobProp
    PhysicalMeshKnobKey
    PhysicalColorProp
    PhysicalKnobLiveValues
    PHYSICAL_MESH_KNOBS
    PHYSICAL_MESH_KNOB_KEYS
    PHYSICAL_MESH_DEFAULTS
    TRANSMISSION_ALPHA_MIX_LINE
    TRANSMISSION_ALPHA_PIN_LINE
    PHYSICAL_PROGRAM_CACHE_KEY
    derivePhysicalCompositing
    applyPhysicalCompositing
    pinTransmittedAlphaGlsl
    physicalUpdateRefractData
    physicalGetRefractData
    clampPhysicalKnob
    physicalKnobToSlider
    physicalKnobFromSlider
    setPhysicalKnob
    setPhysicalColor
    applyPhysicalMeshConfig
    physicalUpdateOpacity
    physicalGetOpacity
    physicalSetVertexAlpha
    physicalUpdateIntensity
    physicalUpdateOffset
    physicalUpdateGamma
    physicalKnobInertReason
    physicalRefractDataInertReason
    isPhysicalMeshMaterial