Repository navigation
Conversation
added 30 commits
November 7, 2026 18:30
Rebuilds feat/idtech8-grid on top of the current renderer submodule split. The renderer keeps the 8-cascade typed grid, GPU builder, direct/indirect NEE and particle/glass sampling; the host keeps the rt_light_grid switch, grid stats/report commands and the view-origin publication. Renderer pointer advances to the port branch merge with current main. CPU LightGridTests pass 16/16.
The branch inherited the pre-submodule installer step, which hangs on the hosted runner. Use the same headers + checked-in import library + dxc + loader assembly as feature/linux-support, without changing the old build_win.ps1 path.
Ports the renderer QR_DXC hint order and the build_win.ps1 explicit -DQR_DXC so the GPU-test shader probes do not pick the Windows SDK dxc without SPIR-V codegen. Renderer pointer advances to 8254d3d.
Points the host at the renderer ReSTIR implementation (reservoir ABI, GPU reuse, set-6 binding) and records the design, approximations and validation status in docs/idtech8-restir.md. The Phase 0 next step now moves to the cascaded/local volumes.
Picks up the allocation-failure guard: a requested but unsized reservoir ring skips the direct trace instead of indexing the two-element stand-in.
Picks up the direct-pass G-buffer bindings for motion and history validation.
Picks up the disjoint reservoir salts.
The indirect ReSTIR GI path remains a later feature; this branch only replaces the direct-light selection.
Picks up the packed G-buffer addressing for the temporal and spatial history reads, the UAV state restore after the reservoir clear, and the doc clarification about the reflection-recording toolchain.
Points the host at the volume ABI/CPU-oracle commit and records the layout, schedule, lookup rules and test coverage in docs/idtech8-volumes.md.
SampleIrradiance returns false outside all cascades and local volumes; the final gather keeps the existing screen-space SH for that case.
Adds rt_light_volume and rt_light_volume_weight to the illumination params and bench report, points the host at the renderer volume atlas/update/final-gather commit, and documents the GPU path and its remaining limits.
Picks up the NVRHI buffer-state announcement that removes the runtime Unknown prior state errors.
Picks up the NVRHI reservoir state announcement.
Picks up the full-cell cluster/global fallback.
Picks up the grid full-cell fallback for the volume branch.
Picks up the grid full-cell fallback.
RT_LockCvar sets CVAR_ROM before the +commands execute, so +rt_restir 1 and +rt_light_volume 1 silently stayed at 0 and every Proton test exercised only the grid. These are runtime quality controls; the bench report already records them.
RT_LockCvar sets CVAR_ROM before the +commands execute, so +rt_restir 1 silently stayed at 0 and the Proton runs exercised only the grid. The bench report already records the values.
Picks up the grid-consistent ReSTIR target.
Picks up the grid-consistent ReSTIR target.
Records the Proton evidence, the runtime-settable cvar fix and the 0.25 default, and advances the renderer pointer.
Documents the cvar ROM-lock discovery, the NVRHI reservoir state fix, the grid full-cell fallback and the grid-consistent target, with the measured e1m1 means and release tags.
Picks up local-light NEE for probe hits and updates the volume limitations/next steps.
Adds rt_light_volume_rays (default 16, clamp 16..64), passes it through QrDrawFrameIlluminationParams and the global uniform, and records the tier in the volume docs.
Adds rt_light_volume_local_add/_clear/_list for up to eight 10^3 volumes at the view origin, passes the descriptors through QrDrawFrameIlluminationParams and records the runtime slice in the volume docs.
Picks up the full-slot list comparison in the volume atlas invalidation.
Updates the phase-0 next step with the volumes PR, the quality-tier and local-volume branches, and the world radiance cache / ReSTIR GI / transparency / AD order.
Adds the e1m1 means for 16/64 rays and local on/off, the run-to-run noise, and the debug-tint proof that the local lookup is selected.
Adds rt_radiance_cache and its cell/LOD/age cvars, fills the illumination parameters and records the first-slice design and limitations.
…ive-cells idtech8: count the radiance-cache active cells
volume: trace the probe rays without the primary front-face cull
volume: convert the probe cube from Quake units to the metric scene
idtech8: validate the ReSTIR GI history normal and age
docs: record the transparency blend A/B limitation
…-normal idtech8: validate ReSTIR GI history and taps with the receiver normal
…-box froxels: use a camera-centered metric world box
idtech8: static glass map and the froxel blend A/B
…umulation radiance: multi-frame reuse for revisited cache cells
docs: idtech8 final merged status and evidence
radiance: feed the cache from the indirect raygen and reuse it on the second bounce
docs: record the radiance-cache indirect feed
…al-gather radiance: feed the cache from the final gather
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
Correctness audit & fixes for the id Tech 8 GI stack on top of
master(14cd1788), updating therenderersubmodule (6dfe04a->b80703c, seeQuakeRaySDKPR #8), host metric unit adapters, anddocs/idtech8-*.md/docs/idtech8-handoff.md.Public ABI in
renderer/Include/qray/qray.his unchanged (RadianceCacheEntry == 32 B,RestirGiReservoir == 48 B,RestirReservoir == 16 B,LightVolumeProbe == 48 B).rendererslices (60b9044..b80703c) & host changes (092fc771,3c2398c0)renderercommit60b9044RtLightVolume.rgen.hlslusestraceVolumeRay(RAY_FLAG_NONE) instead of culledtraceIndirectRay; bothRtLightVolume.rgen.hlslandRtLightVolumeShade.rgen.hlslindexlightVolumeHitsbyinvocationinstead ofprobeIndex.965f027+ host092fc771QR_QUAKE_UNIT_IN_METERS = 0.025f): unifiedLightGrid(2.0 m/16.0 m/0.8 m/6.25e-4),LightVolume(32.0 m/16.0 m),TransparencyFroxels(32.0 m/1.6 m),RadianceCache(rt_radiance_cache_celldefault"10"->0.25 m,25.6 mLOD threshold, hostQR_QuakeDrawFrame&SpatialFrame.cppframe.Lengthscaling), andQuakePointToMetersforUploadClusterLightSourcesview origin (Quake/qr_spatial_adapter.cpp,Quake/gl_vidsdl.c).832573aRhiRtDirectPass::EnsureLightSetacceptspUniformBuffer(worldUniformBuffer.Get()fromNvrhiFrameSkeleton.cpp) and dispatchesPrepareUniformSet,BuildLightGrid, andDispatchTransparencyFroxelsbeforeReflRefrruns;RsParticle.frag.hlslreconstructs particle world position frominvProjection+inViewDepth+invView.2dba65aq2RestirTargetacross grid candidates, uniform initial, fallback, andq2RestirMergeHistoryinRestirSampling.hlsli, removing double luminance multiplication fromq2SampleGridLights::outMass; added tests inRestirReservoirTests.cpp.05870d0W, Validation & Counter Cleanup: addedRestirGiTarget/q2GiTarget, zeroedradiance.w, weighted current sample bycurrentTarget * max(oneOverSourcePdf, 0.0), shaded withshadingWeight = q2GiWeight(reservoir), gated reuse onframeId > 0, enforcedq2GiUsable && q2GiHistoryValid && q2GiSurfaceMatcheson history and all 4 spatial taps, resetskyBsdfWeight = 1.0on visible geometry reuse, and deleted 5 bogusrayStatsAddcalls + duplicateRAY_STATS_CATEGORY_INDIRECT.b80703c7bins/axis,+Zfallback) to hash key, 4-slot linear probing (kProbeSteps = 4), sharedq2InterpolateLightVolumeSh+q2EvaluateLightVolumeIrradiance,bounceBrdf+ volume irradiance miss fallback on second bounce, and removed second-bounce & final-gather cache puts.092fc771,3c2398c0docs/idtech8-{phase0,restir,volumes,radiance-cache,restir-gi,transparency-froxels,tuning}.mdand addeddocs/idtech8-handoff.md.Verification
Linux unit tests (
g++ -std=c++20 -DQR_STATIC/gcc)qray_light_grid_tests: 21 checks, 0 failuresqray_light_volume_tests: 85 checks, 0 failuresqray_radiance_cache_tests: 62 checks, 0 failuresqray_restir_reservoir_tests: 36 checks, 0 failuresqray_restir_gi_tests: 56 checks, 0 failuresqray_transparency_froxel_tests: 16 checks, 0 failuresqray_spatial_contract_tests: passedprof_window_tests: passedrt_light_admit_tests: 25 checks, 0 failuresg++ -fsyntax-only(Quake/qr_spatial_adapter.cpp+renderer/Source/SpatialFrame.cpp): exit 0CheckMatrixReads.py: exit 0Windows CI (
44174810055) & Proton 11.0 Runtime (ci-windows-44174810055, RX 9070 XT,radv Mesa 26.2.6,e1m1,rt_gi_level 2)Debug(4m45s, run job134363226985) andRelease(6m33s, run job134363227500) — success (build_win.ps1 Debug -Tests, fulldxcSPIR-V shader build,ctest -LE gpu).0NVRHI::ERROR;cvarlistconfirmsrt_radiance_cache_cell "10"(0.25m) andrt_radiance_cache_lod "1024"(25.6m).qperfdump.log)e1m1,rt_gi_level 2)gpu.framecache hitcache misscache activeindirectraysshadow dir3840x2160)screenshot0000.png)split 1,gi 1,cache 1,vol 124.41 ms3,368,78323,65423,0837,146,8182,356,487[54.52, 35.94, 28.33]screenshot0001.png)rt_light_volume_local_add 512(split 1)24.02 ms3,388,3257,64123,3577,161,7592,383,505[58.61, 35.06, 27.02]screenshot0002.png)split 0,gi 1,cache 1,vol 124.33 ms3,366,01927,81623,7777,143,9322,403,461[61.23, 35.52, 27.20]screenshot0003.png)split 0,gi 0,cache 1,vol 124.76 ms3,365,53724,61423,0107,143,9812,410,525[63.02, 35.94, 27.74]screenshot0004.png)split 0,gi 0,cache 0,vol 123.12 ms0007,142,9532,427,968[66.38, 39.24, 30.83]