Skip to content

Commit fe4a17c

Browse files
committed
fix(brain): edge mesh invisible — drop layer-1 assignment, bump base opacity
Camera renders default layer 0 only; edge mesh was on BRAIN_LAYERS.BLOOM (layer 1) so the camera never saw it. Three.js layers and the postprocessing SelectiveBloomEffect Selection are different mechanisms — the bloom mask is the Selection (markBloom + refreshBloomSelection), not three.js layers. Edges stay on layer 0 like everything else, and bloom emphasis is handled purely by Selection. Also raised PulseShader baseOpacity from 0.18 to 0.42 so static-rest edges read clearly against the near-black backdrop without depending on bloom contribution.
1 parent f1206c7 commit fe4a17c

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

desktop/cortex-control-center/src/BrainVisualizer.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,6 @@ function BrainVisualizerComponent({ api = null, cortexBase = "http://127.0.0.1:7
345345
});
346346

347347
if (mesh) {
348-
assignLayer(mesh, BRAIN_LAYERS.BLOOM);
349348
markBloom(mesh, true);
350349
scene.add(mesh);
351350
edgeMeshRef.current = mesh;

desktop/cortex-control-center/src/brain-visualizer.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@ describe("Brain visualizer", () => {
157157
expect(edgeMesh).toContain("brainEdgeMesh: true");
158158
});
159159

160-
it("BrainVisualizer mounts the merged edge mesh and ticks the pulse uniform each frame", () => {
160+
it("BrainVisualizer mounts the merged edge mesh on the default layer and ticks pulse each frame", () => {
161161
expect(source).toContain("import { buildEdgeMesh, disposeEdgeMesh, tickEdgeMaterialTime }");
162162
expect(source).toContain("buildEdgeMesh(graphData.links, nodesById,");
163-
expect(source).toContain("assignLayer(mesh, BRAIN_LAYERS.BLOOM)");
163+
expect(source).not.toContain("assignLayer(mesh, BRAIN_LAYERS.BLOOM)");
164164
expect(source).toContain("markBloom(mesh, true)");
165165
expect(source).toContain("tickEdgeMaterialTime(mesh, elapsedSec)");
166166
expect(source).toContain("disposeEdgeMesh(edgeMeshRef.current)");

desktop/cortex-control-center/src/brain/EdgeMesh.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export function buildEdgeMesh(links, nodesById, options = {}) {
7676
activationCount: edgeCount,
7777
baseColor: options.baseColor,
7878
pulseColor: options.pulseColor,
79+
baseOpacity: options.baseOpacity ?? 0.42,
7980
});
8081

8182
const mesh = new THREE.LineSegments(geometry, material);

0 commit comments

Comments
 (0)