NRDSample icon indicating copy to clipboard operation
NRDSample copied to clipboard

Checkerboard Mode and NRD

Open Ganaboy2k opened this issue 2 months ago • 4 comments

Hello Dzhdan,

Hope you been keeping well. I am implementing Checkerboard for GI (gDiffCheckerboard =1, gSpecCheckerboard = 0). The total combined is 1 path per pixel or 0.5 rpp (Not sure of right terminology) as I am not well versed. However this gives me slightly worse noise if I just do 1 combined path per pixel but probabilistic, Is that expected ?

Again huge thanks for your work, I have included your reprojection trick as well, this is awesome because I only store vertex colors and interpolate on Rayhit. So having high resolution color data is amazing and it the discontinuities are not so obvious, given I do full lighting. Earlier I was only reprojecting directlighting, but this is much better way to reuse previous frame data, The only thing I cant do is include Sun specular in composed diffuse as well, as it is required for me to keep them seperate

Also there is an optimization opportunity with checkboard mode in NRD Sample only, dispatch left half of screen for diffuse and right half of the screen for specular , this way reduces branch divergence on GPU it save me around 0.5ms on my 3060ti (DLSS Quality - 1440p). So it makes me feel better to use Checkerboard as ok less quality but more performance

Ofc you need to expand the dispatch to right pixel coordinates so the NRD Prepass resolves it correctly, Note : All this info is in context of Reblur as usual:).

For checkerboard to pixel coordinates expansion, this is what I use uint frameIndex = PostProcess_GetFrameIndex(); uint checkerboardOffset = Sequence::CheckerBoard(uint2(0, dispatch_thread_id.y), frameIndex) == GI_gCheckerBoardMode; pixel_position = dispatch_thread_id * uint2(2, 1) + uint2(checkerboardOffset, 0);

Regards, Ganesh

Ganaboy2k avatar Dec 07 '25 06:12 Ganaboy2k