Skip to content

rtx: Add Sobol surface sampling while retaining Halton camera jitter - #389

Merged
jeffamstutz merged 6 commits into
NVIDIA:next_releasefrom
tarcila:sobol
Nov 11, 2026
Merged

jeffamstutz merged 6 commits into
NVIDIA:next_releasefrom
tarcila:sobol

Conversation

@tarcila

@tarcila tarcila commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  Camera → Halton
  ├── Pixel jitter: bases 2, 3
  └── Aperture: bases 5, 7

  Quality surface transport → FastOwen-scrambled Sobol
  ├── Hemisphere and environment sampling
  ├── Analytic-light coordinates and light selection
  └── First four material draws → PCG fallback

  Variable-length volume work, geometry-light coordinates, roulette and coverage decisions remain on PCG.

Why retain Halton for the camera?

Retaining Halton preserves the existing camera sampling policy while keeping camera and transport sampling independent.

It also provides a reusable low-dimensional sequence generator for a future frame-global jitter mode, such as an integration with DLSS or other upscaler. That mode would generate one offset per temporal frame, without the current per-pixel hash, apply it consistently across the image, and report it to the upscaler.

This PR does not implement that mode or the required motion-vector, depth and history-reset integration. Keeping Halton makes future reuse straightforward; it does not by itself establish upscaler compatibility.

Why use Sobol for surface transport?

Surface transport needs multiple sampling coordinates. Sobol provides explicit multidimensional low-discrepancy points for those decisions, using a reference-backed direction table and pbrt-style FastOwen scrambling.

Sobol dimensions Sampling role
0–1 Ambient hemisphere and HDRI cosine strategy
2–3 Analytic-light coordinates or HDRI CDF row/column
4–5 HDRI within-texel jitter
6–7 Light category and instance selection
8–11 First four sequential material requests

Surface vertices reuse these roles with pixel, bounce and transparency-depth scrambling. Material consumption remains branch-dependent; additional draws use PCG. Variable-length work stays on PCG rather than exhausting or silently aliasing Sobol dimensions.

The PR also fixes contiguous sample addressing across spp batches, makes native/MDL draw ordering explicit, and shares sampling implementations between production and tests.

Evidence

  • Before: Two samples per launch select ordinals 0,1; 4,5; 8,9 because the completed-sample counter is multiplied by spp again.
    After: Both progressive raygens select 0,1; 2,3; 4,5, with reset, checkerboard and camera regression coverage.

  • Before: Surface sampling uses PCG without an explicit low-discrepancy dimension allocation.
    After: Independent reference tests cover direction columns, sample vectors, output range and host/CUDA agreement.

  • Verification: All 20 selected checks passed in both native-PBR and MDL-backed-PBR configurations, including callable integration, ordered draws, fallback consumption and isolated
    misuse tests.

  • Regression sensitivity: Swapping native sampling coordinates fails the draw-order test. Pinned-source regeneration reproduces all seven generated artifacts byte-for-byte.

These checks establish correctness and integration coverage, not a universal convergence improvement or rendering speedup.

Keep camera addressing independent of transport sampling and preserve
Halton aperture, centering, reset and checkerboard behavior.
Introduce the immutable attributed table and packed transport roles
without reserving camera dimensions or replacing Halton camera sampling.
Validate reference outputs before publication and preserve the complete
generated header with offline regressions.
Keep surface transport at the contiguous camera ordinal while retaining
PCG for unsupported paths and explicitly sequencing fallback draws.
Bound the ordered material overlay to four draws while preserving branch
consumption and PCG fallback across native and MDL callables. Share the
native continuation and fixed MDL draw implementation with host tests;
keep light sampling coverage on the real CUDA path.
Allow reproducible transport scrambles without changing renderer defaults
or coupling the transport key to Halton camera addressing.
Describe the Halton camera, bounded Sobol surface transport and PCG
fallback roles, their contracts, reference provenance and test commands.
Keep development logs and historical audit records out of shipped docs.
@jeffamstutz
jeffamstutz merged commit 12f8ef8 into NVIDIA:next_release Nov 11, 2026
8 checks passed
@tarcila
tarcila deleted the sobol branch November 11, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants