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.
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) andPhysicalMeshTSLMaterial 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 whatroughness=0.4oropacity=0.3does; 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.