Mirrors the GLSL wrapper one-for-one — same MeshMaterialConfig, same update
methods, same applyBlendingMode + clone semantics, same
CameraAwareMaterial / ColormapAwareMaterial surface — so
MaterialManager.getMeshMaterial is a drop-in swap and no caller sees the
divergence.
Uniform plumbing. This class owns one persistent UniformNode per shader
input in tslNodes, and the public uniforms record exposes each as an
IUniform-shaped getter/setter proxy, so material.uniforms.X.value = … lands
straight on node.value with no per-render callback bridge. Identical to the
three sibling TSL wrappers.
What needs a graph rebuild. The factory branches on JS-side conditionals for
the colormap path, the gamma/GOG fast paths, the flat-normal variant and the
emission shape, so each of those changes the shape of the graph and rebuilds.
Everything else — opacity, intensity, offset, the four lighting controls, alpha
cutoff, scalar range, and the near-fade start — is a plain runtime uniform and
never rebuilds. The near fade's ortho test in particular must NOT be a build
flag: the ortho-mode toggle would otherwise recompile every mesh graph in the
scene, which is why this graph takes perspectiveNearFadeTSL, fed from
cameraProjectionMatrix per draw, rather than the compile-time-ortho variant
the line graphs use.
TSL / NodeMaterial counterpart to
MeshMaterial.Mirrors the GLSL wrapper one-for-one — same
MeshMaterialConfig, same update methods, sameapplyBlendingMode+clonesemantics, sameCameraAwareMaterial/ColormapAwareMaterialsurface — soMaterialManager.getMeshMaterialis a drop-in swap and no caller sees the divergence.Uniform plumbing. This class owns one persistent
UniformNodeper shader input intslNodes, and the publicuniformsrecord exposes each as anIUniform-shaped getter/setter proxy, somaterial.uniforms.X.value = …lands straight onnode.valuewith no per-render callback bridge. Identical to the three sibling TSL wrappers.What needs a graph rebuild. The factory branches on JS-side conditionals for the colormap path, the gamma/GOG fast paths, the flat-normal variant and the emission shape, so each of those changes the shape of the graph and rebuilds. Everything else — opacity, intensity, offset, the four lighting controls, alpha cutoff, scalar range, and the near-fade start — is a plain runtime uniform and never rebuilds. The near fade's ortho test in particular must NOT be a build flag: the ortho-mode toggle would otherwise recompile every mesh graph in the scene, which is why this graph takes
perspectiveNearFadeTSL, fed fromcameraProjectionMatrixper draw, rather than the compile-time-ortho variant the line graphs use.