Repository navigation
Releases: matiasLombo/neural-upstream
Release list
v0.3.0 — survives frame generation, and finally measures itself
Running this underneath DLSS Multi Frame Generation at 3x and 4x broke it in ways none of the image code explained. It does not any more.
Use Quality if frame generation is on
The network costs 4.8 ms of an 8.9 ms rendered frame — 54% of the budget. Above Quality it runs on one frame in two or three, so the rendered interval alternates 8.9 / 13.9 ms, and DLSS-G places its generated frames inside that interval. It cannot pace through a 56% swing, which is why the artefact grew with both the multiplier and the cadence.
It was never an image problem: with EffectStrength=0 — identical work, no visible effect — the artefact was unchanged. Quality costs the same in total, spread evenly, and paces cleanly at 4x.
Two real bugs
- The descriptor ring was eight slots. Three dispatches a frame with the CPU two or three frames ahead of the GPU left ~2.7 frames of headroom, so slots were recycled while their dispatches were still in flight. It had been that way since the first commit and is the likeliest cause of artefacts blamed on other things. Now 64.
- 43% of evaluates were handed the game's raw colour. The game issues more than one evaluate per frame and only the first claims it; the rest discarded the enhancement even though the enhanced frame was already sitting there.
Image fixes
Each closes a systematic difference between consecutive frames, which is what a flicker is made of.
- Every frame is now built the same way above cadence 1, instead of alternating between the network's output and a reconstruction.
CSApplyDeltaclamped its reconstruction andCSDecodedid not, so the two disagreed on highlights — on HDR content, a flicker on exactly the pixels the eye tracks.- A pixel whose history cannot be reprojected now reuses the delta stored at it, rather than dropping the effect for one frame.
The profiler never worked
prof_report() was defined and never called, and g_prof.freq was declared and never assigned, so it returned on its first line regardless. Every cost figure this project ever quoted came from nowhere. It works now, and reports mean and peak.
All diagnostics are off by default behind Diagnostics in ReShade.ini. Twice the instrument became the experiment: a ring dump wrote 1024 lines through a locking, flushing logger on the present thread, and the profiler Mapped a readback buffer every present. A stall there is visible on screen.
Not fixed
- A rare black flash that only appears with the add-on enabled. A 120 ms stall does not reproduce it and it does not correlate with the >100 ms frames Streamline reports.
- The 4.8 ms itself.
DLSSNR.ScalingRatiois inert; cutting it needs real downscaling or a second queue. Groundwork for the latter is in and validated — the network reads private copies of Color, Depth and MVec correctly, and those copies cost 0.07 ms.
FINDINGS.md has the full account, including the three experiments that measured null or negative.
v0.2.0 — hooks any NGX provider, and measures itself
Runs DLSS 5 Neural Rendering upstream of the upscaler: the network works on the game's render-resolution colour buffer, and its result becomes DLSS's colour input. The network is same-resolution only, so the smaller image is where the saving comes from.
Tested on GTA V Enhanced and the Bright Memory: Infinite benchmark.
What changed since v0.1.0
Works in games without native DLSS. The evaluate is hooked wherever it actually lives, not only in the driver's _nvngx.dll. An NGX proxy exports the same entry points and answers them itself, while the driver module stays loaded and idle — so every module that offers it gets hooked, and a re-entrancy guard keeps a proxy's forward to the driver from running the network twice on one frame.
A GPU profiler. Timestamps around each stage, written to the ReShade log. This is what established that the network is 99% of the cost and the colour pipeline is free.
Two more presets. Overdrive and AI slop push the network past what it intends — deliberately overcooked, and the clearest way to check whether the network acts on these parameters at all.
Install
Drop nvngx.dll.addon64 next to the game executable. Do not rename it — the NGX snippet only accepts feature creation from a module whose path contains nvngx.dll.
Needs ReShade with add-on support, and nvngx_dlssnr.dll in the game folder. Everything is configured from the ReShade overlay.
Cost, measured
RTX 4070 Ti, 1280x720 render resolution: the network is 3.27 ms, colour encode and decode are 0.031 ms between them. About a third of a 100 fps frame, and 99% of it is the network — cadence is the only lever that moves the number.
Worth knowing
The network's strength parameters are forwarded and exposed, but it has not been confirmed that the network acts on them. A sibling parameter, Hint.Render.Preset, turned out inert.
FINDINGS.md documents the rest: rebuilding the NR runtime for another architecture, which Hopper features have no Ada equivalent, and the optimisations that measured null or negative.
This software contains source code provided by NVIDIA Corporation. Not affiliated with or endorsed by NVIDIA or Rockstar Games.
v0.1.0 — Neural Rendering upstream of the upscaler
DLSS 5 Neural Rendering normally runs at output resolution, after the upscaler. This add-on moves it upstream: the network runs on the game's render-resolution colour buffer, and its result becomes DLSS's colour input. The network is same-resolution only — it enhances, it does not upscale — so the smaller image is where the saving comes from.
Built and tested against GTA V Enhanced.
Install
Drop nvngx.dll.addon64 next to the game executable. Do not rename it — the NGX snippet only accepts feature creation from a module whose path contains nvngx.dll, and under any other name it fails with 0xBAD00002.
Needs ReShade with add-on support, and nvngx_dlssnr.dll in the game folder. Everything is configured from the ReShade overlay.
In this build
- Colour. The game's scene-linear HDR buffer is developed into the bounded image the network expects and the range restored afterwards. The restore reads the network's contribution as a per-pixel luminance gain and applies it to the original, which keeps the full range and leaves hue and saturation exactly as the game rendered them. Reference white comes from the game's own exposure buffer, so it tracks day and night on its own.
- Cadence is anchored to the DLSS jitter rather than to a count of calls — the number of evaluates per frame is not something an add-on can assume, and a miscount silently puts the work on the wrong frame and survives until the next alt-tab.
- Skipped frames reconstruct rather than repeat. The network's effect is stored, followed along the motion vectors to where each pixel was, and dropped where the depth says the surface underneath has changed.
Worth knowing
The colour restore is newly rewritten in this build and has had little time in front of a screen. If it looks off, Chroma transfer under Advanced → Colour development brings back the network's own colour, which a luminance gain does not carry.
The network's strength parameters — intensity, local tone, local structure, skin structure — are forwarded and exposed, but it has not been confirmed that the network acts on them. A sibling parameter, Hint.Render.Preset, turned out inert. Compare Light against Reference and judge for yourself.
This software contains source code provided by NVIDIA Corporation. Not affiliated with or endorsed by NVIDIA or Rockstar Games.