Repository navigation
rtx: Add Sobol surface sampling while retaining Halton camera jitter - #389
Merged
Merged
Conversation
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
approved these changes
Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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.
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.