RadianceLab · Native implementation document

Custom primitive combinations

Common-measure MIS within the kernel-free group and an explicit blend for finite-radius curves.

Strategy 31 exposes selected pairs and trios through PP quick settings and PP Estimator. Zero pp.misMask selects 136: UV + sphere. The checklist permits one member as a diagnostic control; the underlying mask can select larger sets.

Bit / standalone ID Member
3, 10, 11, 16 UV, UT, VT, fixed arbitrary plane
7, 8, 9 Sphere, disk, cone
18, 28, 29 First-segment beam, ring, arc

Presets: 136 = UV+sphere; 384 = sphere+disk; 66176 = arbitrary+sphere+cone; 805568512 = beam+ring+arc. Bit 18 is the direct single-scatter beam here, not standalone 18's complete traced path. The arbitrary-plane angle remains pp.arbPlaneAngle.

Estimator contract

UPBP section 6 gives the appropriate future framework for true cross-group MIS: conditional second moments over kernel offsets, with common-path/support bookkeeping and explicit bias bounds. Equal radii alone do not establish those weights. See https://cs.uwaterloo.ca/~thachisu/upbp.pdf.

Multiple quads: source identity is part of the sampling measure

Each plane member independently selects a quad with the existing entity-emitter CDF, using weight max(luminance(Le),1e-4) * area. It then generates its swept primitive from that source. A directional member continues to select its own source point. When either family evaluates competing densities, it reconstructs the actual selected quad; it does not substitute the brightest source.

For source ell with selection probability kappa_ell, the common measure is (ell,s,u,v) and every technique's joint density is P_i(ell,z) = kappa_ell * p_i(z | ell). The target on that source's chart remains f_ell = A_ell * g_ell. With one draw per selected member, the balance contribution is f_ell / (kappa_ell * sum_i p_i). A directional record already includes inverse source selection in its single-technique contribution and receives the matching balance ratio. Different lamps are different labels; their densities are not summed at this lamp's connection. The flat-average path also retains inverse selection probability.

The single-quad branch retains its former arithmetic and RNG order, as does legacy strategy 26. The new presets 80–82 exercise source size, emission profile, and all nine size/profile combinations. Their matched-position isolated probes separate emitter properties from source roster and spatial arrangement. See ../primitive-emitter-studies/README.md for the scene definition and equal-power convention, and ../emitter-study/analyze_study.py for the retained numerical analysis.

Auto emission evaluates the material's actual angular radiance profile in the payload. This does not make the geometric sampling proposal profile-adaptive. Likewise, the source CDF weights area times peak luminance and does not integrate the angular profile. These choices affect efficiency but must not be conflated with the light's integrated physical power.

Multi-source validation, 2026-09-13

Compact configurations, film/binary hashes, check counts, accepted comparisons and rejected-reference reasons are retained in ../emitter-study/validation/conformance.json, with an accompanying validation narrative. Raw float films remain in the local experiment artifacts, outside this source documentation folder. The study's performance analysis remains variance-only.

The extended first-use production check passes 1,074 checks, including the actual unequal-color/area source CDF, source geometry/profile identity, its low-luminance selection floor, mixed-emitter refusal, and independent angular flux integration. PrismShapeTest passes 31 classifier and 58 evaluator checks; 28 of the latter independently enumerate the labeled-source MIS measure and detect omitted source probabilities and unrelated-source density sums.

At preset 47, 217x140, 128 passes, six saved-baseline/current film pairs remain byte-identical: custom31 masks 136, 3080, 896 and 66176; legacy26 mask 3976; and legacy30. This checks historical single-source behavior alongside the new multi-source tests. These are conformance results, not performance timings.

Reference selection matters for angular emitters. The legacy strategy-2 continuation-to-light payload uses bare radiance, while its NEE payload applies the emitter profile. Consequently it is not a valid reference for the new laser-like/cone comparisons. Use strategy 1 (pure NEE) at one scattering bounce with the camera inside the medium, excluding directly seen source surfaces geometrically because custom31 renders only direct single scattering. The older strategy-2 implementation is unchanged.

An additional existing camera-walk limitation was exposed by the external nine-light camera: freeFlightStep probes just inside the boundary, but later reclassifies the unshifted boundary point with a strict inside test. Depending on roundoff, that rejects valid incoming-medium segments. Thus the outside-camera pure-NEE film is not an acceptance oracle either. Custom31 uses the inside probe for its entry distance and does not take this camera-walk branch. These limits are recorded rather than repaired as an unrelated change during the experiment.

Matched-position, inside-camera spot checks compare the six seeded 1,024-pass all-six films against a separately seeded 8,192-pass pure-NEE1 film, at 160x100. Conservative projected source bounds exclude directly seen lights, including subpixel emitters. Ratios of masked mean luminance are:

Probe Source All-six / pure NEE
0 0.5-edge, cosine-power-500 laser-like 1.01829
4 2.0-edge, 25-degree cone 0.99657
8 6.4-edge, diffuse 0.99989

These checks give an independent finite-budget normalization comparison. The sharpest source still differs by 1.83%; this result does not distinguish its reference sampling error from a smaller systematic discrepancy. Dispersion of the six all-six films alone is not the uncertainty of the independently sampled reference. The three-diffuse-light scene also agrees with inside-camera pure NEE to 0.042% at 1,024 passes. No exact-integral or blanket unbiasedness claim follows from these finite tests.

Initial single-quad validation, 2026-09-13

Start checkpoint: 8da3fb2. Release build and PrismShapeTest pass. The automatic first-use custom-mis-check passes 1,063 checks: all 1,023 nonempty masks, default selection, finite-difference arbitrary-plane change of variables, selected curve partitions, and adversarial source/medium/comp guards. Maximum arbitrary-PDF relative error: 1.66e-7.

At preset47, 217x140 film, 128 passes:

At 4,096 passes, the mean RGB of UV+sphere is 0.0108358413, beam is 0.0108448938, and their 2/3 + 1/3 hybrid is 0.0108387955. The predicted fixed-blend mean is 0.0108388588: 0.000584% relative difference. This is a normalization smoke test, not a variance/efficiency result. Standalone and hybrid reruns consume different RNG subsequences, so matching pixels is not a valid test of their mixture coefficient.

New31 is not expected to reproduce every legacy singleton image: old16 omits the light-visibility test applied by custom31; old30 samples the separately authored scene.lights roster, while new31 shares the emissive-entity source convention with the sheets. Compare supported path classes and radiometry, not just numeric strategy IDs.

validation.json records configs, image means and hashes. Launch-to-dump seconds include startup and must not be reported as native estimator benchmark timings.

To reproduce the small film suite, copy the saved old Prism.exe plus data/ and shaders/ into an isolated baseline/ folder, and the built new runtime into its sibling current/. Then run:

python docs/custom-combinations/check_films.py C:/path/to/isolated-check baseline
python docs/custom-combinations/check_films.py C:/path/to/isolated-check current

The harness writes only inside that supplied root; it never changes the working app's configuration. NumPy is needed to inspect float films. The browser diagnostic and derivation are integrated into the portfolio's Photon Primitives / Combination design and RadianceLab / Custom combinations chapters.