Tell a dead shader apart from a boring scene in the gallery
A failed shader compile renders black, and black frames are identical to each other, so every block scores 0.000 and the row reads as the least varied scene in the library rather than as a broken one. That happened yesterday — the subject helpers were declared above the ink they call, GLSL has no forward declarations, the whole preamble failed to compile, and the gallery reported a variety of exactly 0.000 with no indication anything was wrong. It is a particularly bad failure mode for a tool whose entire job is ranking scenes by that number. A scene whose first frame has no luminance and no variance is now reported as broken, with both figures and a pointer to the console, and the row is coloured apart from the merely flat ones so it cannot be mistaken for a bad score. The summary counts them separately. Verified against both answers rather than only the happy one: a healthy Moiré Grid comes back 0.0365 with no error, and a deliberately broken copy of the same scene comes back with the diagnosis instead of a zero. Recorded in HOWTO-variety.md alongside the other instrument traps, since the general lesson outlives this instance — a broken render produces the most boring possible numbers rather than an error. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
.row.flat { border-color: #ef4444; }
|
||||
.row.thin { border-color: #eab308; }
|
||||
.row.good { border-color: #22c55e; }
|
||||
.row.broken { border-color: #a855f7; background: #150e1c; }
|
||||
.head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
|
||||
.name { font-size: 14px; color: #e6eaf2; }
|
||||
.fam { color: #6b7280; }
|
||||
@@ -112,7 +113,7 @@ let contexts = [];
|
||||
|
||||
// Graded against the bar rather than against taste: below it is a failure, and
|
||||
// the band just above it is where a scene is passing by too little to trust.
|
||||
const grade = (v) => (v < MIN_VARIETY ? 'flat' : v < MIN_VARIETY * 2 ? 'thin' : 'good');
|
||||
const grade = (v, err) => (err ? 'broken' : v < MIN_VARIETY ? 'flat' : v < MIN_VARIETY * 2 ? 'thin' : 'good');
|
||||
|
||||
function draw() {
|
||||
const mode = sortSel.value;
|
||||
@@ -134,7 +135,7 @@ function draw() {
|
||||
out.appendChild(cut);
|
||||
}
|
||||
const el = document.createElement('div');
|
||||
el.className = `row ${grade(row.variety)}`;
|
||||
el.className = `row ${grade(row.variety, row.error)}`;
|
||||
const blocks = Object.entries(row.byBlock || {})
|
||||
.map(([k, v]) => `${k} ${v.toFixed(3)}`).join(' · ');
|
||||
el.innerHTML = `
|
||||
@@ -169,8 +170,10 @@ function draw() {
|
||||
sortSel.addEventListener('change', draw);
|
||||
|
||||
function summarise(built) {
|
||||
const flat = rows.filter((r) => r.variety < MIN_VARIETY).length;
|
||||
const flat = rows.filter((r) => r.variety < MIN_VARIETY && !r.error).length;
|
||||
const broken = rows.filter((r) => r.error).length;
|
||||
return `${rows.length} scenes · ${flat} below the ${MIN_VARIETY} bar` +
|
||||
(broken ? ` · ${broken} BROKEN` : '') +
|
||||
(built ? ` · built ${new Date(built).toLocaleString()}` : '');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user