Question regarding visibility check in RTXDI's spatial resampling pass

Hi,

I’m wondering about some calculations in RTXDI’s spatial resampling pass, in particular this check:

Let’s imagine we’ve got numSpatialSamples = 1, central pixel without any sample (i.e. totally occluded) and a randomly-picked useful neighbor that does provide a sample.

Under these circumstances, and assuming ray-traced bias correction mode, the code will shoot a shadow ray from the neighbor’s surface towards the neighbor’s sample - this doesn’t seem correct, because this single visibility information doesn’t allow us to determine whether that sample is useful at our central pixel (we’ve essentially just made sure that the neighbor doesn’t have stale visibility, which we know anyway).

Now, is there’s something I’m missing here? 😅

I’m implementing ReSTIR on my own and doing what this implementation does ends up creating a lightening bias (shadows get sort of “expanded” outside).

Thanks,
Patryk.

Hello @pwychowaniec and welcome to the NVIDIA developer forums.

I never looked at the RTXDI sources before so I am definitely no help here, but I reached out to some who might, so let me get back to you. In case you have the code checked out and you can figure out who added the piece of code above, you can share and I check if that is someone here at NVIDIA.

I don’t know how quickly the engineers react to open issues on Github, but that might also be an avenue to try.

But remember, it’s the week before Christmas, so no guarantees on ETA.

Thanks!

Hi, thanks!

Sure, this seems to be Alexey Panteleev :-)

Yes, that’s understandable - I’m in no hurry anyway, mostly curious!