Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Rename the Cycles lobe check so node --test does not run it

Nguyen Xuan An5e82a363b5bf
diff --git a/bench/cycles-parity/test-lobes.mjs b/bench/cycles-parity/check-lobes.mjs
similarity index 98%
rename from bench/cycles-parity/test-lobes.mjs
rename to bench/cycles-parity/check-lobes.mjs
index 8d017b92..7870121b 100644
--- a/bench/cycles-parity/test-lobes.mjs
+++ b/bench/cycles-parity/check-lobes.mjs
@@ -1,5 +1,5 @@
// Runs Cycles lobe white-furnace and PDF grid probes plus end-to-end uniform-sky sphere furnace renders.
-// node bench/cycles-parity/test-lobes.mjs <outputDirectory> [--samples-width 512] [--samples-height 512] [--grid-width 1024] [--grid-height 512]
+// node bench/cycles-parity/check-lobes.mjs <outputDirectory> [--samples-width 512] [--samples-height 512] [--grid-width 1024] [--grid-height 512]
import { mkdir, writeFile } from 'node:fs/promises';
import { constants, setPriority } from 'node:os';
import { join, resolve } from 'node:path';
@@ -493,7 +493,7 @@ function parseIntegerOption(argumentList, flagName, fallbackValue, minimumValue)
function parseCliArguments(argumentList) {
if (argumentList.length < 1 || argumentList[0].startsWith('--')) {
- throw new RangeError('Usage: node bench/cycles-parity/test-lobes.mjs <outputDirectory> [--samples-width 512] [--samples-height 512] [--grid-width 1024] [--grid-height 512] [--scene-samples 512] [--seed 1] [--filter <substring>] [--skip-scenes] [--skip-probes]');
+ throw new RangeError('Usage: node bench/cycles-parity/check-lobes.mjs <outputDirectory> [--samples-width 512] [--samples-height 512] [--grid-width 1024] [--grid-height 512] [--scene-samples 512] [--seed 1] [--filter <substring>] [--skip-scenes] [--skip-probes]');
}
return {
outputDirectory: resolve(argumentList[0]),
@@ -662,7 +662,7 @@ async function runCli() {
setPriority(0, constants.priority.PRIORITY_BELOW_NORMAL);
const options = parseCliArguments(process.argv.slice(2));
if (!renderNative.findNativeAddon()) {
- throw new Error('The render-native addon is missing. Build packages/render-native before running test-lobes.mjs.');
+ throw new Error('The render-native addon is missing. Build packages/render-native before running check-lobes.mjs.');
}
await mkdir(options.outputDirectory, { recursive: true });
const probeManifestEntries = [];
diff --git a/docs/cycles-parity.md b/docs/cycles-parity.md
index 3f526a61..6747b86b 100644
--- a/docs/cycles-parity.md
+++ b/docs/cycles-parity.md
@@ -214,7 +214,7 @@ Evaluated in [`bench/cycles-parity/compare.py`](../bench/cycles-parity/compare.p
1. **Global per-channel mean radiance**: `mean(Cook) / mean(Cycles_Seed1)` within **`1 ± 0.02`** (`[0.98, 1.02]`) on each of `(R, G, B)`.
2. **`8 × 8` tile grid radiance**: every tile with `mean(Cycles_Seed1) > 0.01` has `mean(Cook) / mean(Cycles_Seed1)` within **`1 ± 0.05`** (`[0.95, 1.05]`).
3. **Display-space FLIP (`LDR`)**: `FLIP_LDR(Cook, Cycles_Seed1) <= FLIP_LDR(Cycles_Seed1, Cycles_Seed2) + 0.02`, using the exact ACES-like tone map and `2.2` gamma curve from [`bench/reference/score.py`](../bench/reference/score.py) (`tone_map_like_67js`, float32 inputs to `flip_evaluator`). Scene-referred `FLIP_HDR` is recorded alongside `FLIP_LDR` as a diagnostic.
-4. **Closure white-furnace & sampling distribution gates**: evaluated in [`bench/cycles-parity/test-lobes.mjs`](../bench/cycles-parity/test-lobes.mjs) and [`bench/cycles-parity/verify-lobes.py`](../bench/cycles-parity/verify-lobes.py) across `20` `probeCyclesLobe` cases (`diffuse`, dielectric & conductor multiscatter `glossy_ggx`, F82-tint conductor, `anisotropic_ggx`, frontface/backface/TIR `glass_ggx`, `coat_ggx`, and `sheen`) plus `6` end-to-end uniform-sky sphere furnace scenes (`traceNative({ kernel: 'cycles' })`):
+4. **Closure white-furnace & sampling distribution gates**: evaluated in [`bench/cycles-parity/check-lobes.mjs`](../bench/cycles-parity/check-lobes.mjs) and [`bench/cycles-parity/verify-lobes.py`](../bench/cycles-parity/verify-lobes.py) across `20` `probeCyclesLobe` cases (`diffuse`, dielectric & conductor multiscatter `glossy_ggx`, F82-tint conductor, `anisotropic_ggx`, frontface/backface/TIR `glass_ggx`, `coat_ggx`, and `sheen`) plus `6` end-to-end uniform-sky sphere furnace scenes (`traceNative({ kernel: 'cycles' })`):
- Mode `0` Monte Carlo directional albedo `mean(samp.eval / samp.pdf)` within **`1 ± 0.01`** (`N = 262,144` samples per case) on white-albedo configurations (`1 ± 0.015` on the grazing limb of curved glass spheres), plus `closure_sample` vs `closure_eval` self-consistency (`<= 2 × 10⁻³`).
- Mode `0` vs Mode `1` (`1024 × 512` spherical `(cos_theta, phi)` quadrature aggregated into `32 × 32` directional bins, pooling `E_k < 5`) **Pearson $\chi^2$ goodness-of-fit `p >= 0.001`**.
@@ -383,7 +383,7 @@ uv run --no-project --with numpy --with flip-evaluator python bench/cycles-parit
uv run --no-project --with numpy --with pillow --with OpenEXR --with flip-evaluator --with psutil python bench/cycles-parity/run-m1-parity.py `
$OutDir --kernel cycles --samples 4096 --bounces 8 --seed 1 --reference-samples 4096 --json-out "$OutDir/harness/m1-cycles-s4096.json"
-bash $env:GPU_LOCK_SCRIPT node bench/cycles-parity/test-lobes.mjs "$OutDir/harness/lobes"
+bash $env:GPU_LOCK_SCRIPT node bench/cycles-parity/check-lobes.mjs "$OutDir/harness/lobes"
uv run --no-project --with numpy python bench/cycles-parity/verify-lobes.py "$OutDir/harness/lobes" --json-out "$OutDir/harness/lobes/summary.json"
uv run --no-project --with numpy python bench/cycles-parity/verify-lobes.py --self-test