Skip to content

Commit 9ea4e93

Browse files
committed
[act.viz.sigma.D7~] the composite renderer is wired into the app end to end, and it still draws the wrong picture
Ivan asked to replace the field engine with the composite from the design study. The plumbing is done and proven; the image is not. Both halves stated, because a renderer that is installed and a renderer that works are different claims and only one of them is true here. WHAT STANDS - volume-overlay.ts: WebGL2 raymarcher over mol*'s own Volume, camera driven by canvas3d.didDraw + camera.state, placement from Grid.getGridToCartesianTransform so no unit or axis convention can drift. R16F, so the app renders real values and never re-opens the 8-bit clamp argument. - Four channels as switches in the panel (shape · steepness · direction · sign), a Style select (ink · wash · contour · blueprint), and a Renderer select whose `both` setting is the ALIGNMENT INSTRUMENT: the two renderers must trace the same level set, and drift is visible without instrumentation. - Every existing guard untouched: fetch, cache, refusals, budgets, producer identity, baked, meta, isovalue. - Compositing proven end to end: a flat probe fills 985,504 of 985,504 viewport pixels. WHAT DOES NOT WORK, MEASURED - The field renders as an unstructured mass over the volume's footprint. - The sign channel never produces a positive lobe: blue = 0 px in every shot. - All four styles come out pixel-indistinguishable in pairs. So the DEFAULT IS BACK TO THE LEGACY SHELLS. Not a retreat from the plan -- shipping a measured-broken default over a working renderer is the one outcome worse than not shipping. Composite is one dropdown away. THE DEBUGGING IS THE PART WORTH KEEPING, because five of the six failures were INSTRUMENTS, not the renderer, and each one produced a confident wrong reading: 1. z-index 2 put the overlay UNDER mol*'s canvas. Correct rect, correct parent, visible, drawing every frame, contributing exactly zero pixels. Everything I "fixed" for hours upstream of this was fixed blind. 2. elementFromPoint said mol*'s canvas was on top -- but pointer-events:none makes elementFromPoint SKIP the element. The instrument could not see the thing it was asked about, and answered anyway. 3. drawImage+getImageData read all zeros because preserveDrawingBuffer was off. A readback that cannot succeed is not evidence of an empty canvas. 4. The staging dir had a stale dirac.js: I overwrote index.html each round and never re-copied the bundle, so several rounds of diagnosis described code that was not running. Third stale-artifact bug today. 5. grep for "zIndex: '40'" found 0 in a minified bundle and I read it as "the change did not build". It had built, as zIndex:"40". 6. And the one real early bug: the miss path wrote OPAQUE WHITE, left over from the multiply-filter model where white is the identity. Under alpha compositing it painted the whole viewport, and the box-shaped hole showing mol* underneath was the "brown blob" I rewrote the shader three times to fix. It was never my renderer. Proven, not guessed: all-channels-ON and all-channels-OFF differed by exactly ZERO pixels. The pattern in all six: I kept adjusting the SUBJECT while the INSTRUMENT was lying, and every instrument failed toward a plausible reading rather than an obviously broken one. Harness fixes that outlive this: it now proves it is serving the current build via a per-run nonce and aborts otherwise (a server from an earlier SESSION held the port and two rounds of screenshots were of a stale app), it no longer leaks its server, and it reports which renderer drew, computed blend mode, and the overlay's own error. NEXT: the field content. Steepness still integrates where the field is negligible; sign is sampled at the first contour crossing and that crossing is negative on essentially every ray, which is a suspicious enough claim about retinoic acid that the sampling locus is the thing to attack first.
1 parent ad6d55f commit 9ea4e93

4 files changed

Lines changed: 513 additions & 285 deletions

File tree

‎scripts/shoot-fields.sh‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ SMILES=${SMILES:-}
5151
# of shipping them as switches is that a saturating channel can be ISOLATED
5252
# rather than guessed at; this makes that reachable from the harness.
5353
CHANNELS=${CHANNELS:-}
54+
QS=${QS:-}
5455

5556
mkdir -p "$OUT"
5657
rm -rf "$STAGE"; cp -r "$ROOT/build/dirac" "$STAGE"
@@ -132,6 +133,17 @@ cat > "$STAGE/index.html.driver" <<EOF
132133
}
133134
}
134135
}
136+
if (window.__diracFieldOverlay && location.search.indexOf('probe') >= 0) {
137+
window.__diracFieldOverlay.probe = true;
138+
await wait(1200);
139+
}
140+
var STY = new URLSearchParams(location.search).get('style');
141+
if (STY !== null && window.__diracFieldOverlay) {
142+
var ss = document.getElementById('field-style');
143+
if (ss) { ss.value = STY; ss.dispatchEvent(new Event('change', {bubbles:true})); }
144+
else window.__diracFieldOverlay.setStyle(+STY);
145+
await wait(1200);
146+
}
135147
if (CHANNELS) {
136148
var want = CHANNELS.split(',');
137149
document.querySelectorAll('.field-chan').forEach(function (b) {
@@ -163,7 +175,7 @@ cat > "$STAGE/index.html.driver" <<EOF
163175
var render = ov
164176
? ('overlay:' + (ov.active ? 'ON' : 'off')
165177
+ (ov.lastError ? '(' + ov.lastError + ')' : '')
166-
+ ' canvas:' + (ovc ? ovc.width + 'x' + ovc.height + '/' + (ovc.style.mixBlendMode || 'normal') : 'none')
178+
+ ' canvas:' + (ovc ? ovc.width + 'x' + ovc.height + '/' + getComputedStyle(ovc).mixBlendMode + '/' + (ovc.dataset.ground || '?') : 'none')
167179
+ ' chans:' + (chans && !chans.hidden ? 'shown' : 'hidden'))
168180
: 'overlay:NO-HANDLE';
169181
bar.textContent = FIELD + ' | ' + MOLECULE + ' | ' + txt('#fields-summary')
@@ -184,7 +196,7 @@ EOF
184196
--use-angle=swiftshader --window-size=1600,1000 \
185197
--virtual-time-budget=120000 \
186198
--screenshot="$OUT/field_$FIELD.png" \
187-
"http://127.0.0.1:$PORT/index.html" >/dev/null 2>&1
199+
"http://127.0.0.1:$PORT/index.html$QS" >/dev/null 2>&1
188200
kill "$(cat "$OUT/.srv")" 2>/dev/null
189201
sleep 1
190202
cleanup_chrome

0 commit comments

Comments
 (0)