PT-5 + PT-4: specular NEE, fight-perf protocol, ReSTIR DI (experimental)#93
Merged
Conversation
…perimental) - direct_light gains a GGX specular term (nee_spec) for the sun AND the sampled point light at every path vertex - the shadow ray is already paid, so specular NEE rides free. Closes the documented PT-2 gap; the primary-only sun specular block is deleted. - Progressive mode skips the dispatch when the tlas_version reset invalidated accumulation (every combat frame): it used to pay the full-res trace cost while displaying raster. Measured: PROG during a fight now costs raster +0.2ms GPU. - PT-4 ReSTIR DI behind BLOOM_PT_RESTIR=1: RIS (8 candidates) + temporal reservoir reuse through the shared SVGF reprojection basis, M-cap 20x, target re-evaluated at the current shading point, one shadow ray for the winner. Validated at parity vs plain NEE (delta inside the scene noise floor, no energy shift, no cost delta) - the architecture for future emissive-particle lights, as the roadmap scoped it. Reservoirs raise the kernel to 9 storage buffers; max_storage_buffers_per_shader_stage is now requested from the adapter on both platforms. - Fight-scene perf protocol run and recorded (760M, 4K, rs 0.75): raster 45/32-36 fps, RT 27.5/20-23 fps, PROG rides raster. Full matrix + verified fallback table in docs/pt/PT-5-integration-and-restir.md. Claude-Session: https://claude.ai/code/session_018574BdCfSjdpNK3WLgx1hP
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughAdds experimental PT-4 ReSTIR DI with reservoir buffers, reprojection, temporal reuse, and single-winner shadow testing. Unifies GGX specular NEE, skips progressive dispatch after TLAS resets, raises storage-buffer limits, and documents PT-5 integration and validation. ChangesPath tracing integration
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Renderer
participant PTKernel
participant ReSTIRReservoir
participant ShadowRay
Renderer->>PTKernel: dispatch realtime path-tracing pass
PTKernel->>PTKernel: compute reprojection state
PTKernel->>ReSTIRReservoir: read previous reservoir
PTKernel->>ReSTIRReservoir: write selected reservoir
PTKernel->>ShadowRay: test selected point light
ShadowRay-->>PTKernel: return visibility
PTKernel-->>Renderer: accumulate weighted lighting
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
Closes out the path-tracing roadmap (docs/pt/pt-roadmap.md).
Shooter-side settings row: Bloom-Engine/shooter PR.
https://claude.ai/code/session_018574BdCfSjdpNK3WLgx1hP
Summary by CodeRabbit