Skip to content

Commit

Permalink
Merge branch 'yaobin/refactorReSTIR' into 'main'
Browse files Browse the repository at this point in the history
Small Refactoring for ReSTIR
- Update the rtxdi submodule to accept standard initial sample reservoir weight
- Remove a hack on the app side, which adapts to the old weight

See merge request lightspeedrtx/dxvk-remix-nv!706
  • Loading branch information
Yaobin Ouyang committed Feb 9, 2024
2 parents 55c9ea6 + d08fb00 commit 4bdebfd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,6 @@ void main(int2 thread_id : SV_DispatchThreadID)

bool isGBufferSimilar;
bool isInitialSample;
// TODO: The temporal reuse function considers the average weight as pdf, instead of W.
// According to the GRIS paper: Generalized Resampled Importance Sampling: Foundations of ReSTIR, E[W] = 1 / pdf
// So a quick fix here is to use the reciprocal of average weight.
// Should fix the temporal reuse function in the future
inputReservoir.avgWeight = inputReservoir.avgWeight > 0 ? 1.0 / inputReservoir.avgWeight : 0.0;
ReSTIRGI_Reservoir resultReservoir = ReSTIRGI_TemporalResampling(inputReservoir, thread_id, surface, rng, tparams, isGBufferSimilar, isInitialSample);

// Update last frame's visibility mask when raytraced pairwise MIS is used.
Expand Down
2 changes: 1 addition & 1 deletion submodules/rtxdi
Submodule rtxdi updated from 88f953 to 97e7df

0 comments on commit 4bdebfd

Please sign in to comment.