Paint a brush of texels on a SceneMesh's heat-map colour texture,
keyed by a world-space point.
Pipeline:
Resolve the colour SceneTexture from sceneMesh.material.
The mesh must have a material with a colour texture whose
imageData is set (i.e. one painted by paintHeatMap or any
raw-pixel SceneTexture).
Invert sceneMesh.worldMatrix to map worldPos into the
geometry's local frame — the same frame the geometry's
aabb and positionsCompressed live in.
Pick the same planar UV axes the painter chose (worldUp +
smallest-extent heuristic), and convert the local point's
coordinates on those axes into a [0, 1]² UV.
Scale the UV to texel coordinates.
Walk a circular brush of radius radius centred on the texel,
computing a radial weight per pixel and alpha-blending the
brush colour over the existing texel.
Symmetry note: the projection here mirrors paintHeatMap's
algorithm exactly (factored into the same pickAxes shape). If
paintHeatMap's heuristic ever changes, this function must be
updated alongside.
Paint a brush of texels on a SceneMesh's heat-map colour texture, keyed by a world-space point.
Pipeline:
SceneTexturefromsceneMesh.material. The mesh must have a material with a colour texture whoseimageDatais set (i.e. one painted bypaintHeatMapor any raw-pixel SceneTexture).sceneMesh.worldMatrixto mapworldPosinto the geometry's local frame — the same frame the geometry'saabbandpositionsCompressedlive in.[0, 1]²UV.radiuscentred on the texel, computing a radial weight per pixel and alpha-blending the brush colour over the existing texel.Symmetry note: the projection here mirrors
paintHeatMap's algorithm exactly (factored into the samepickAxesshape). IfpaintHeatMap's heuristic ever changes, this function must be updated alongside.