Conditional Resampled Importance Sampling and ReSTIR

Recent work on generalized resampled importance sampling (GRIS) enables importance-sampled Monte Carlo integration with random variable weights replacing the usual division by probability density. This enables very flexible spatiotemporal sample reuse, even if neighboring samples (e.g., light paths) have intractable probability densities. Unlike typical Monte Carlo integration, which samples according to some PDF, GRIS instead resamples existing samples. But resampling with GRIS assumes samples have tractable marginal contribution weights, which is problematic if reusing, for example, light subpaths from unidirectionally-sampled paths. Reusing such subpaths requires conditioning by (non-reused) segments of the path prefixes. In this paper, we extend GRIS to conditional probability spaces, showing correctness given certain conditional independence between integration variables and their unbiased contribution weights. We show proper conditioning when using GRIS over randomized conditional domains and how to formulate a joint unbiased contribution weight for unbiased integration. To show our theory has practical impact, we prototype a modified ReSTIR PT with a final gather pass. This reuses subpaths, postponing reuse at least one bounce along each light path. As in photon mapping, such a final gather reduces blotchy artifacts from sample correlation and reduced correlation improves the behavior of modern denoisers on ReSTIR PT signals.

contribution weights, which is problematic if reusing, for example, light subpaths from unidirectionally-sampled paths.Reusing such subpaths requires conditioning by (non-reused) segments of the path prefixes.
In this paper, we extend GRIS to conditional probability spaces, showing correctness given certain conditional independence between integration variables and their unbiased contribution weights.We show proper conditioning when using GRIS over randomized conditional domains and how to formulate a joint unbiased contribution weight for unbiased integration.
To show our theory has practical impact, we prototype a modified ReSTIR PT with a final gather pass.This reuses subpaths, postponing reuse at least one bounce along each light path.As in photon mapping, such a final gather reduces blotchy artifacts from sample correlation and reduced correlation improves the behavior of modern denoisers on ReSTIR PT signals.

INTRODUCTION
Various recent theoretical advancements have improved the state of the art in Monte Carlo integration significantly, particularly for light transport in real-time rendering.Generalizations of resampled importance sampling (RIS) [Talbot et al. 2005] enable unbiased sample reuse between complicated integration domains, leading to reservoir-based spatiotemporal importance resampling (ReSTIR) [Bitterli et al. 2020], which promises to amortize path tracing costs over large numbers of pixels, both within and across frames.
A key aspect of ReSTIR's speed and unbiasedness is careful multiple importance sampling (MIS) weight computation [Veach and Guibas 1995b], as each spatiotemporal neighbor acts as a unique sampler.If reusing samples from differing domains, correct MIS weights are vital to harmonizing supports to avoid under-and over-counting different regions of the integration domain.West et al. [2022] extended MIS to marginal PDFs (MMIS), where probability densities are not pointwise evaluable.This seems vital in generalized resampled importance sampling (GRIS) [Lin et al. 2022], which replaces the notion of a PDF with unbiased contribution weights (UCW) that are, by definition, not pointwise evaluable.But GRIS theory does not handle conditional unbiased contribution weights, limiting the sample reuse available to ReSTIR.
In this paper, we extend the generalized resampled importance sampling theory to handle conditional probability spaces.This enables (iteratively) driving conditioning and conditioned variables using previous RIS-or ReSTIR-based samples.This was motivated by a practical problem: in ReSTIR PT [Lin et al. 2022], challenging light paths' next event estimation (NEE) queries are often occluded.We wondered if we could replace these single-segment NEE queries with important, multi-segment subpaths reused from neighbors.
To demonstrate our theory, we add a final gather to ReSTIR PT.We shoot paths unidirectionally from the camera, update them via ReSTIR, but only reuse a portion, discarding (at least) one segment from the start before reuse.This requires conditional ReSTIR; subpaths are conditioned by the (discarded) prefixes initially used to generate the paths.The algorithm remains unbiased.
Our specific theoretical contributions include: • Extending the definition of unbiased contribution weights to allow conditional and joint UCWs.• Demonstrating how to do conditional RIS and ReSTIR.
• A general MIS scheme for integrating by paths reused with conditional shift mappings-without knowing PDFs.• A framework for spatiotemporal improvement and reuse of unidirectionally sampled suffix paths.• Finding similarity between ReSTIR PT and photon mapping algorithms, allowing a final gather for reducing correlations.
This finishes the evolution begun by Lin et al. [2022] to allow replacing PDFs in Monte Carlo integration ( ( )/ ( )) with unbiased contribution weights ( ( )  ).Now, UCWs can exist in conditional probability spaces,   | , depend jointly on multiple variates, and be marginalized with respect to specific random variables.

KEY CHALLENGE IN RIS AND RESTIR
Before exploring prior work and our new theory, let's review the key difficulty for sample reuse in resampling (e.g., Talbot et al. [2005] and follow ups).In theory, sample reuse is great; the question is "can we?" Considering the high-dimensionality, it is not clear unrelated paths can help integrate over the same domain.Path dimensionality may vary and it is unclear if path measures match; arbitrary sample reuse can feel a bit like asking, "how many grams are in a meter?"Thus, the work designing ReSTIR [Bitterli et al. 2020;Lin et al. 2022] focused on a few key issues: • Knowing the sampling domains, • Matching domains between samples for reuse, • Shifting samples' domains to enable more reuse, • Ensuring we sample the full integration domain, and • Avoiding double counting parts of the domain.
Discarding sampling domain data is one reason why post-process denoising is fundamentally biased; how can one ensure unbiasedness when averaging final pixel colors that estimate different integrands?
We extend ReSTIR, asking "can we reuse part of a path?"This means readdressing these issues, as subpath reuse makes the domains conditional.For example, if reusing from the 4th path vertex, that subpath was picked relative to the now unused 3rd vertex.
A key difference between our work and prior methods for sampling conditional spaces (e.g., West et al. [2022]) is that we enable a streaming compute model, where reservoirs store individual samples representing aggregations of many (sub-)paths.

PREVIOUS WORK AND BACKGROUND
Prior research explores methods for both path reuse and path filtering.Here, we define path reuse as reusing entire samples.Simple methods copy all neighbor path vertices to the current pixel [Bekaert et al. 2002;Ouyang et al. 2021].Gradient domain rendering added shift mappings, allowing more complex sample reuse between integration domains [Bauszat et al. 2017;Hua et al. 2019].Similar reuse ideas arise in Metropolis techniques [Veach and Guibas 1997].
Path filtering usually suggests a biased smoothing, typically at path vertices, that connects one path's prefix to other path suffixes [Binder et al. 2019;Keller et al. 2014;West et al. 2020].West et al. [2022] noted path filtering can be unbiased, albeit cost prohibitive due to many connections needed in the filtering kernel.We show suffix resampling yields high quality while borrowing just one suffix.
Generally, our theory fits into this reuse and filtering space but allows conditional reuse of subpaths (similar to Tessari et al. [2017] or West et al. [2022]) in the context of resampled importance sampling [Lin et al. 2022], where reused subpaths come from large sample aggregations (reservoirs) from spatiotemporal neighbors.
To demonstrate practical benefits of our theory, we build a proofof-concept final gather to connect multiple path prefixes to one or more suffixes.Such gathering is not new, per se, being used in photon mapping [Jensen 2001] and path filtering [Binder et al. 2019].Deng et al. [2021] and West et al. [2022] also showed iterative gathering (or multi-vertex filtering) to be valuable; our theory may enable such ideas in the context of real-time GPU-accelerated ReSTIR variants.
Interestingly, conditional subpath reuse resembles bidirectional path tracing [Lafortune and Willems 1993;Veach and Guibas 1995a] without sampling from lights.Camera paths find key lights; subpaths hitting a light are reused for neighbor pixels as light subpaths.Another view of our prototype is as an unbiased radiance cache, in contrast to prior work that adds bias by estimating density of virtual point lights (traced from the camera) [Segovia et al. 2006] or applying ReSTIR to reuse biased light probes [Majercik et al. 2021].

Multiple Importance Sampling
Many learn multiple importance sampling (MIS) through the lens of Veach and Guibas's [1995b] example joining light and BSDF samples into an improved estimator.Crucially, MIS allows weighing samples reused across varying integrands and integration domains.Elvira et al. [2019] and Deng et al. [2019] pushed such reuse, ultimately expanding MIS [West et al. 2020] to enable randomly selected subsets of uncountable continuums of sampling techniques.
Many MIS methods require readily evaluable PDFs for each estimator used.Such PDFs are not available when resampling [Talbot et al. 2005]; Lin et al. [2022] showed MIS weights can be computed using RIS's target functions that only approximate estimator PDFs.West et al. [2022] introduced marginal MIS, allowing combining sampling methods whose probability distributions are known only conditionally, given some random variables.This enables MIS between conditional PDFs.In this paper we further allow combining and chaining such conditional distributions using RIS and ReSTIR.
Similar ideas appear elsewhere, e.g.Metropolis [Veach and Guibas 1997] or simpler path reuse methods [Bekaert et al. 2002], but ReSTIR dramatically accelerates this with streaming computation via weighted reservoir sampling [Chao 1982].Essentially, ReSTIR allows massive sample amortization, spreading cost over many pixels, without correspondingly higher storage costs.This builds on the RIS estimator [Talbot et al. 2005], where  is our integrand (typically the path contribution function): Here, each of the  samples   is resampled from  independent candidates    from some distribution with PDF .The    are reweighted by some target function p, and the   are drawn from the    proportional to their new weights.These  samples then estimate  via Monte Carlo importance sampling.Standard Monte Carlo estimators sum over samples of the form  (  )/ (  ), but the RIS estimator sums samples  (  )   , where . (2) Equation 2 includes another Monte Carlo estimator p (  )/ (  ).
Replacing it by RIS estimator p (  )   allows chaining RIS estimates, which is the key idea behind ReSTIR [Bitterli et al. 2020].
Sample reuse in RIS that leads to these weights  is one example of a more general idea, that of unbiased contribution weights introduced by Lin et al. [2022]: Definition 3.1.An unbiased contribution weight (or UCW) for random variable  , is any real-valued random variable   for which for any integrable function  : Ω → R.
Note that throughout the paper, we denote random variables with capitals  and ordinary variables with lower case .
Unlike traditional Monte Carlo sampling, where samples must be drawn from tractable PDFs , UCWs allow use of more complex distributions.Regular PDFs act as UCWs using   = 1/  ( ), but any random variable can be a UCW as long as E[  | ] = 1/  ( ).
While standard PDFs  can also come in conditional, marginal, or joint forms, prior ReSTIR work did not enable UCWs with such forms [Bitterli et al. 2020;Lin et al. 2022Lin et al. , 2021]].We extend UCWs to conditional probability spaces, allowing resampling in those domains.Such needs arise in complex rendering algorithms, e.g., if one wants to reuse only part of a previously sampled light path.

CONDITIONAL UCWS
A conditional PDF   | can be seen as the PDF of  in a conditional probability space where random variable  receives a specified value.Here  is constant, so  /  | estimates the conditional expectation But what if we only have an unbiased estimate of 1/  | , e.g., by conditional RIS (Section 5)?
The estimator  /  | has the conditional expectation where supp( | ) contains values  possible with positive PDF given  ,   | ( | ) > 0.Here  may depend on  , as  is fixed.This E [•| ] can be interpreted as a traditional expectation in the conditional probability space where  has fixed value.We observe that applying UCWs in such a conditional space naturally leads to a definition of conditional unbiased contribution weights.
Definition 4.1.A conditional unbiased contribution weight   | for random variable  , given  , is any real-valued random variable   | for which for any integrable function  : Ω → R.
Similar to traditional UCWs, an immediate follow-up is that

Joint UCWs
Knowing a marginal PDF   and a conditional PDF   | allows unbiased integration with pairs (,  ): the product   ()   | ( |) yields the joint PDF   , (, ).Does knowing   and   | allow unbiased integration?Let us approach this with an example.
We integrate  (, ) over the unit square with points ( 1 ,  2 ), with  2 sampled conditionally on  1 .Multiplying  by   2 | 1 estimates the conditional expectation which integrates over  2 for the fixed  1 .The right-hand-side expression only depends on  1 , so now multiplying by   1 yields the integral over the full square: Is it then true that whenever we have random variables  1 and  2 with UCWs   1 and   2 | 1 , then  ( 1 ,  2 )   1   2 | 1 unbiasedly estimates the integral of  over the joint support of ( 1 ,  2 ), making The answer is no.Without care, this key subtlety can lead to bias (see the supplemental document Section S.1.2for an example).The expectation of estimator  ( 1 ,  2 )  1   2 | 1 can be written which differs from Equation 7. To yield the correct expectation,   1 must move to the outer expectation.This requires   1 be conditionally independent of  ( 1 ,  2 )  2 | 1 given  1 , i.e., the expressions must not depend on the same random variables, except for  1 .This can be achieved by the following rule: is a joint unbiased contribution weight for  = ( 1 ,  2 ).
If  2 and   2 | 1 share dependencies with   1 , besides  1 , then UCWs  1 and  2 | 1 must be conditional on them, i.e., integration must succeed if we treat shared random variables as constant.

CONDITIONAL RIS AND INTEGRATION
As in Talbot et al. [2005] and Lin et al. [2022], our new conditional unbiased contribution weights can be computed with RIS.In this case, reused samples' domains often will not cover the full support of integrand  .Consider random variable  1 and some dependent random variables arranged into a vector  , and  1 's conditional UCW   1 | (for example,  1 could be a path suffix and  could be its prefix).By definition, this UCW can integrate any function  , potentially dependant on Z, in the conditional support supp( 1 | ): to give the unbiased estimate The conditional notation   (•| ) has no deeper meaning: we could denote  , () as a parametrized function family (e.g., West et al. [2020West et al. [ , 2022]]).For future brevity, we occasionally implicitly drop this dependency on  .(In fact, we had already dropped it from  ).
In practice, samples   often arise via resampling, making an unmodified balance heuristic unusable as we use UCWs with unknown PDFs   .Lin et al. [2022] used ReSTIR target functions p as PDF proxies for MIS, enabling sample reuse between domains via shift mappings and their Jacobians.Below, we borrow and expand on Lin et al. [2022] by interpreting their expressions with an implicit  dependency and in a conditional probability space.

Resampling
Above, we enabled unbiased integration in conditional probability spaces via conditional UCWs.Next, we outline our conditional RIS (CRIS) that generalizes GRIS [Lin et al. 2022].
Take inputs   ∈ Ω  with conditional UCWs    | , where samples   and domains Ω  may both conditionally depend on  .We must shift   into integrand  's domain Ω with conditioned shift mappings, evaluating   =   (  | ), e.g., transforming a neighbor pixel's suffix path to start from a path prefix in the current pixel (see Section 6).
Then we resample a  by picking from   in proportion to resampling weights   =   (  ) p (  )   |  ′  , similarly to GRIS.This gives a (now conditional) unbiased contribution weight: , where   and p may (implicitly) depend on  .Together,  and   | integrate properly in  's conditional support: If seeking an unbiased estimate for the integral, we must ensure supp( | ) covers supp( ), e.g., using a canonical input sample.Then, regardless of  , we have E  ( )  | | = ∫ Ω  () d.We can also use  to resample iteratively, chaining multiple RIS passes to implement ReSTIR.We need to know supp( | ) to properly evaluate other samples' MIS weights.A canonical sample ensures supp( | ) = supp( p), with p implicitly depending on  .

Integration in the General Case
We now generalize Equation 12, borrowing samples from other domains by shift mapping.Our MIS weights use the different input domains' target functions p (e.g., suffix path radiances) as proxies for unknown conditional PDFs.
We derive the formula by a shortcut: GRIS provides estimate  ( )  | by selecting  randomly from the inputs, but we sum probability times contribution over the choices.Similarly to Lin et al.'s [2022] offline estimator, this reduces color noise, but is equivalent for scalar-valued  when choosing p =  .
We assume  inputs   in different domains, conditioned by  , and shift them into  's domain via   =   (  | ).The generalized conditional UCW estimator, given  , is then for MIS weights   , integrand  (e.g., suffix radiance), pre-shift conditional UCW    | , and shift Jacobian determinant | ′ |.Any MIS weights from Lin et al. [2022] can be used if we interpret the formulas with an implicit conditioning by  , which we do from now on.We specifically mention the generalized balance heuristic, where   are domain weights specifying the relative weight (confidence) given to the samples, and reads the (conditional) target function at 's corresponding path in pixel , i.e.,  −1  (), as a proxy for its conditional PDF, and the Jacobian determinant transforms this proxy the same way probability densities transform in shift mappings.
This ⟨  ⟩ integrates over the samples' supports in  's domain: If the union covers the integrand, e.g., by including a canonical sample, this estimator is unbiased.We use this estimator to integrate suffix radiance by defining  as the supporting prefixes, i.e., unused parts of our reused (sub)paths.
Next, we describe a framework using conditional RIS and ReSTIR in path tracing to reuse suffix paths between pixels and frames.

SUFFIX RESTIR
Applying conditional RIS theory to unidirectional path tracing, we build a proofof-concept prototype 1 that produces welldistributed suffix subpaths and reuses them spatiotemporally.We sample new prefixes at integration, connecting each such prefix to one or more conditionally-sampled suffixes.We update suffixes via ReSTIR, improving their distribution temporally.We summarize our prototype in Algorithm 1 (our supplemental document has more details).Note that reservoir sizes double, versus ReSTIR PT [Lin et al. 2022], as we must store both prefix and suffix data.Reused suffixes may not entirely cover the suffix domains for new integration prefixes, so we combine with a canonical suffix sample via MIS, to guarantee coverage.This ensures unbiasedness.
Our figures show reconnection shifts with one-bounce prefixes, but we actually use Lin et al.'s [2022] hybrid shift, postponing reconnection on low-roughness vertices.Prefixes end at the second consecutive high-roughness vertex; the remainder is the suffix.

Prefix and Suffix Distributions
Reservoirs can reside in many domains, including world space, but we describe the concept in screen space, where each pixel has a reservoir, storing a (yellow) prefix and (red) suffix path.We call the prefix a supporting prefix, as it conditions the suffix random variable, determining its support and path space coverage.The supporting prefix is needed for conditional MIS weights, shift mappings and target functions for reuse and integration.
Well-distributed supporting prefixes are vital if suffixes are to capture important light paths.This suggests regularly updating with new independent prefixes.But changing a prefix modifies its suffix's support and target function, worsening its distribution.We strike a balance by updating prefixes temporally with ReSTIR, without spatial reuse.At each frame (Alg. 1, lines 2-5), we sample a new (blue) supporting prefix candidate for each pixel.
We find the matching pixel in the prior frame, and GRISselect between this candidate and the old supporting prefix (yellow), shifted to the new pixel (dashed).We favor the old frame's supporting prefix in GRIS to let the distribution improve over time.
Next (lines 6-7) , we update suffixes to the current frame.With the supporting prefix (blue, left) already in the current frame, we take the (yellow) old prefix and its suffix (orange), and RIS between the shifted old suffix (orange, right) and a new canonical suffix (cyan).This uses conditional RIS between the reused suffix and new canonical suffix.We give old suffixes higher domain weight so the suffix distribution improves over time.
After updating suffixes temporally, we also reuse spatially (line 8).This is similar, but rather than using one projected pixel from last frame, we use conditional RIS to resample between the current suffix and numerous suffixes from the local pixel neighborhood.

Target Functions and MIS Weights
Resampling always requires target functions and MIS weights.To define these, we decompose the path contribution function  () where   is path throughput over prefix   ,   is the reconnection term including two BSDFs and visibility, and   is the throughput over suffix   (after reconnection) times the emitted radiance.We resample supporting prefixes via ReSTIR with target function This is stable and gives better quality than including suffix data, e.g., p (  ) =  (  ,   ); adding a suffix dependency also makes avoiding bias tricky, as suffixes end up conditioned by themselves, invalidating their unbiased contribution weights (see Section S.1.1).We use the generalized balance heuristic (Equation 15) to MIS between the new canonical prefix and prior frame prefix.
For spatiotemporal suffix reuse we define pixel 's target function as the path contribution after supporting prefix  (20) Suffix   is conditioned on prefix    , so    is available as a constant.We leave   out, as all suffixes from    share this prefix and Figure 2: Given per-pixel paths (left), ReSTIR PT reuses by modifying nearby paths to use the current primary hit (middle).We delay reuse (at least) to secondary hits (right), reducing correlation but increasing noise.We address noise by a final gather, i.e., averaging reuse at multiple short prefixes.Reused suffixes are conditioned on the removed random prefixes that determined their secondary hit locations.
(   ) cancels out during resampling.For MIS weights, we again use the generalized balance heuristic (Equation 15), with all terms conditioned with the supporting prefixes.Dropping   also removes a source of imbalance in the MIS weights, reducing variance.

Integration with Borrowed Suffixes
At integration time, we sample an independent integration prefix   (blue) and search nearby for similar supporting prefixes (circled) in world-space by examining path geometry and borrow their suffixes.We sample a (cyan) canonical suffix to combine its contribution with the borrowed suffixes.Our proof-of-concept uses distance between the end of our integration prefix and supporting prefixes to select suffixes for reuse, as overlapping domains are more likely; exploring other heuristics remains an open question.
To integrate, we substitute suffix contribution   (  ,   )   (  ) into Equation 14( includes   and all supporting prefixes, which we keep implicit in the following).The estimator ⟨  ⟩ for suffix contributions integrates over   's suffix space Ω  (  ): We then multiply ⟨  ⟩ by prefix throughput estimate   (  )   to get the joint estimator for the full path integral: where    =   (   ) is the suffix    shifted to continue from prefix   ,  is the full path contribution function,   weights the different suffixes, and | is the joint UCW (Section 4.1) for the full path after shifting the suffix, as the Jacobian transforms One of the    is the canonical suffix that guarantees full coverage of the suffix space.

FINAL GATHER
In Section 6 we described a way to distribute reusable path suffixes, integrating with short prefixes (Figure 2, right), finding supporting prefixes with similar last vertex geometry, and connecting to their resampled suffixes (red).Shrinking supporting prefix length to one simplifies to ReSTIR PT (middle).Distracting resampling artifacts can arise if strong outliers get widely reused spatiotemporally.This impoverishes the sample pool, causing correlations.Combining a random prefix with reused subpaths increases path variety.But this adds noise, which we address with a final gather (Figure 2, right).
Photon mapping often uses a similar solution.Querying radiance at primary hits leads to blotchy artifacts.A final gather moves photon queries to the second diffuse hit.
Like radiance caching, suffix ReSTIR fills space with cache points (yellow), gathering by tracing integration prefixes (blue).Rather than shooting photons from lights, we sample supporting camera prefixes (yellow), concentrating them in high-throughput areas.Instead of interpolating radiances, we reuse resampled suffixes (red) by shift mapping them to the current integration prefix.
Estimates of pixel color are conditioned by the supporting prefixes chosen, and must individually be unbiased.As described in Section 6.3, we pick similar supporting prefixes to maximally match their covered path spaces with our integration prefix.Still, we cannot assume that borrowed suffixes alone cover the integration domain, so by default, each integration prefix must sample a canonical suffix.Suffix paths can be long, so this would be prohibitively expensive.We apply a form of Russian roulette to reap the benefits of ReSTIR suffixes without tracing more canonical suffixes.
Our final gather estimator builds on borrowed suffixes (Section 6.3) with the premise that integration prefixes are relatively cheap.We trace a number  of prefixes and average their estimators (Equation 22), each reusing the suffixes of its closest supporting prefixes.We conceptually include canonical suffixes for all  integration prefixes, specifically including them in our MIS weights-but, by Russian roulette, we replace canonical suffix contributions with zero except for one random prefix, whose contribution is multiplied by  .But, the multiplication cancels the mean, resulting in an unweighted contribution.As much of path space is likely covered by borrowed ReSTIR suffixes, this roulette greatly improves rendering efficiency.The canonical suffix is only needed for the non-covered minority.
Assuming symmetrically sampled prefixes with definitions analogous to Equation 22.The first line is the contribution from the canonical suffix   11 (lines 10-12 in Algorithm 1).The inner sum on the second line does the gather (lines 12-16).
ReSTIR-guided suffixes tend to be high quality, and the integration over the dimension freed by postponing reuse tends to be the variance bottleneck.We seek ReSTIR PT's low noise without its correlation and present a final gather as a candidate solution, but acknowledge our proof-of-concept approach leaves much yet to do.

PROOF-OF-CONCEPT EXPERIMENTS
To study our theory's potential to improve quality without tracing many more independent paths, we built a proof-of-concept algorithm using conditional RIS and ReSTIR, per Sections 6 and 7. We started from Lin et al.'s [2022] ReSTIR PT code and Falcor's path tracer [Kallweit et al. 2022].We use RTXDI [NVIDIA 2021] for direct lighting and apply NEE at prefix vertices to account for lighting not covered by suffixes.Results use an NVIDIA RTX 4090 at 1920×1080 with max path length of 12.Our supplemental material contains more implementation and performance details, plus full images and a video studying temporal behavior.
We deem our work mostly theoretical.Experiments focus on uncovering insights on the benefits of conditional RIS theory for subpath reuse.Thus, we have not yet searched for optimally-performing algorithms or implementations.We show some equal-time tests, but our goal is not showing our prototype somehow faster or better, but understanding challenges and identifying promising future work.
All in all, our experiments suggest relatively high potential, with some high-reward research directions such as improving importance sampling of integration prefixes, e.g., with ReSTIR or path guiding.
Driving suffixes with ReSTIR helps greatly.In Figure 3 we compare our suffix reuse ("Ours") to using independent suffixes ("MMIS"), with a form of marginal MIS [West et al. 2022].We show an inset from Veach Ajar; all light comes indirectly through a barely-open door.Spatiotemporal suffix reuse greatly improves image quality.
One reused suffix may be enough.Figure 3 also ablates over use of multiple path suffixes during integration.For MMIS, adding more suffixes greatly improves quality; our suffix reservoirs already aggregate multiple suffixes, so adding more provides diminishing returns (similar to Wyman and Panteleev [2021]).
Final gather is important.We postpone reuse by one path vertex (vs.ReSTIR PT) and use Monte Carlo integration on the freed dimensions.This increases noise; our prototype lowers this with a final gather.Figure 4 compares various integration prefix counts.Despite Veach Ajar's indirect lighting, increasing path prefixes may suffice!In some sense, we convert path tracing into one-bounce integration, as if using an unbiased radiance cache-except we reuse full paths.Integration prefix count gives a natural quality slider for our prototype, but in the future, we hope to approach the quality of many prefixes while using fewer, via better importance sampling.
Russian roulette in the final gather improves efficiency.Figure 4 also compares canonical suffix count.We test one canonical suffix per prefix (right column) versus just one per pixel via Russian roulette (other columns); roulette reduces ray count by 80% with often limited quality impact.Sometimes tracing more canonical suffixes could be worthwhile, especially for offline rendering.See the supplemental document for a study of convergence behavior.
Suffix ReSTIR helps with disocclusion and movement.Figure 5 compares our prototype to ReSTIR PT with camera motion in Veach Ajar.Screen space ReSTIR suffers "variance lag" around disocclusions as reservoirs get reset where temporal reuse fails.Our prototype does not suffer this lag.Disocclusions still invalidate reservoirs, but when integrating, we find valid reuse candidates from farther away by world-space matching.In some sense, we move ReSTIR to object space but still concentrate computation in visible pixels.
We largely fix ReSTIR spatiotemporal correlations.Figure 1 explores correlations in the Tower Bridge.We render a static video, copying horizontal slices of consecutive frames to rows in the (, ) plots.This shows temporal and spatial correlations as vertical and horizontal blobs, respectively.ReSTIR PT's strong spatiotemporal correlations [Sawhney et al. 2022] are not present in our result.
Removing correlations helps with denoising.In Figure 6 we apply a pre-release version of DLSS-RR [NVIDIA 2023] to both ReSTIR PT and our prototype.Despite more raw noise at equal time, the lack of correlations often allows the denoiser to produce better quality with our subpath reuse.
High potential with improved final gather.In Figure 6 we compare our current prototype to ReSTIR PT at equal-time (8 prefixes) and also with higher prefix counts.Figure 7 further studies future potential, assuming a high-quality final gather.ReSTIR suffixes often contain enough information to produce clearer images than ReSTIR PT, showing less coloration, noise, and edge artifacts.This highlights the importance of making final gather cheaper.

FUTURE WORK
We believe our new conditional RIS theory offers a promising path to extend real-time rendering to harder light paths.Below we list some interesting future research enabled by our theory: More efficient final gather.Postponing reuse via a final gather largely eliminates ReSTIR correlations.But we need an efficient final gather for cheap, high-quality prefixes.Better importance sampling may be key: path guiding, more resampling steps, low-discrepancy samples, or better stratification might all offer improvements.
Choosing the right supporting prefixes.For quick prototyping, we used a BVH range search [Evangelou et al. 2021] to find supporting prefixes near our integration prefix.Faster ways to find candidates likely exist; better selection heuristics might also improve quality.
Other theoretical applications.Our prototype shows potential theoretical benefits in the context of a simple final gather.Conditional RIS may also have other uses, e.g., spectral rendering [Weidlich et al. 2022] or volume rendering.Improving specific algorithmic details may yield more practical variants, e.g., better shift maps, variable prefix lengths, multi-vertex reuse, mid-prefix direct lighting, etc.

CONCLUSION
We present a new conditional RIS theory, generalizing unbiased contribution weights to allow Monte Carlo integration and resampling even with unknown conditional and joint PDFs.This works for chained RIS, enabling resampling with conditional MIS weights and shift mappings, extending Lin et al. [2022].
We apply our theory to spatiotemporally aggregate suffix paths, driving the conditioning prefixes and reused suffixes by ReSTIR.This allows bidirectional-like path reuse with unidirectional paths, focusing computation in visible regions.
Our proof-of-concept, unbiased final gather combines cheap path prefixes with suffixes reused via conditional RIS.This fills path space with unbiased cached suffixes analogous to photons, but sampled from the camera.Debiasing normally requires many canonical paths; Russian roulette allows skipping all but one.All together, this turns the renderer into a low-dimensional integration over short prefixes.But our prototype remains expensive; we need further algorithmic development for practical applications of conditional resampling.
Figure 4: Effect of increasing integration prefixes.Here, each final gather prefix connects to one ReSTIR-driven suffix found via nearest-neighbor search.Image quality improves steadily with increased integration prefix count.We produce a canonical suffix for only one prefix, using Russian roulette, reducing ray count up to 80%.Quality loss from roulette is typically minor (compare the right two columns), except on some glossy surfaces.

Figure 5 :
Figure5: Comparing disocclusion artifacts in our prototype and ReSTIR PT using fast camera motion.Because our final gather searches nearby candidates for suffix reuse based on vertices later in the path (not the primary hit point), it avoids ReSTIR PT's discarded history near screen-space disocclusions.Both methods take one full path sample per pixel per frame, but feature additional rays for reuse.

Figure 7 :
Figure7: Comparing path tracing, MMIS, ReSTIR PT, and our proof-of-concept with one full path per frame, assuming high-quality final gather.Our prototype and MMIS are here configured roughly equal time, which is much longer than ReSTIR PT's cost; this figure estimates the potential opened by subpath reuse like a final gather.See Figure6for an equal-time comparison.We use 128 prefix samples connecting to one ReSTIR suffix per prefix; MMIS uses 64 prefixes connecting to three suffixes for an improved balance.With subpath reuse, we avoid color shift or correlation artifacts common in ReSTIR PT.All scenes feature a moderately-fast animated camera to prevent over-relying on temporal accumulation.See the supplemental document for the timings.