The current version of all Luma mods (based on latest commit).
Installation instructions:
- Extract all the files directly in the game main executable folder (replace the previous ones if you are updating)
- If you already had a ReShade installation (dxgi.dll) overwrite it unless it's the same version. If you have other mods that used the dxgi.dll file, find a way to proxy them
- Boot the game
- Press home to bring out the ReShade and Luma menus (if they don't appear, ReShade or Luma failed to install or run)
- Customize the settings if you'd like, the defaults are already good and pick up on your display calibration
- (Linux only) install msvcrt40 and vcrun2022 using protontricks
Note that not all mods here are playable, some are work in progress. Consult the wiki mod list for their state, or ask in "HDR Den" discord for more information.
Note that some mods here might not be complete, like "Prey", which misses (optional) data for the rest of the mod, these should be downloaded from Nexus.
"Test" mods are made to be tested and have tools to investigate what's going on, and help the developers gather information.
The "Generic" mod will work in many games out of the box, especially if you pair it with a separate Auto HDR upgrade method.
Proton should be fully compatible out of the box.
Last commit: Batman Arkham Knight: engine motion vectors and jitter, DLSS/FSR upscaling, FSR 3 (#234)
- fix(Batman Arkham Knight): engine-driven velocities and jitter for DLSS
- Always compute the engine's velocities (camera and objects): remove the
motion blur setting gates and the "camera barely moved" early out of the
camera velocity pass, by signature, while the motion blur effect itself
still follows the user setting. - Replace the camera velocity compute shader: reproject with a single matrix
built on the CPU in double precision (inverse current translated view
projection, camera translation since last frame, previous translated view
projection). The original used different units than the object
velocities, no jitter and an approximated camera translation, which made
DLSS reject history (shimmering and aliasing while moving). - Jitter the main view projection in the engine's own view jitter function,
before all the derived view matrices, and read the jitter back from the
rendered view for DLSS (same frame, no game/render thread mismatch).
Views built from an already jittered view keep its jitter. - MVs are "previous UV - current UV": scale by the render resolution.
- Reset DLSS when the camera velocity pass was skipped (camera cuts) or has
no previous frame. - Find all patch sites by signature (no Steam/GOG offsets).
-
feat(Batman Arkham Knight): enable FSR 3 (tested at native resolution)
-
feat(Batman Arkham Knight): DLSS/FSR upscaling (quality modes)
- Render at a lower resolution through the engine's ScreenPercentage view
scaling, read from a mod owned value (the game setting is never touched,
so it can't be saved to the game config). Quality modes: Native (DLAA),
Quality, Balanced, Performance, Ultra Performance. - Fix the engine's broken ScreenPercentage path on PC: keep the scaled view
rect at the top left (it was centered for compute passes only), and
disable the engine upscale (it read black, the texture being still bound
as UAV). - After super resolution, switch the view to the output rect before the
first post process, so bloom, tonemapping, DOF and motion blur run at the
output resolution. Replace the two post shaders that still read the render
resolution depth/velocity (Gather<0>, RockOn preamble) to scale their
load coordinates. - Pick the screen percentages so that the HUD canvas unscales back to exactly
the output size (the engine truncates both ways). - More jitter phases when upscaling (8 * ratio^2), mip bias from the render
scale, plus a user mip bias offset.
- fix(Batman Arkham Knight): camera velocity pixel NDC from the view rect when upscaling
The camera velocity pass constants have the full buffer size, not the
(smaller) view rect, so camera motion vectors were scaled wrong when
upscaling (up to ~2 px off near the screen edges, making DLSS reject
history on the floor while moving). Measured in game: static pixels now
match the reprojected geometry within 0.02 px at Quality.
- feat(Batman Arkham Knight): game exposure for SR, single reset on camera cuts
- Feed DLSS/FSR the game's eye adaptation exposure (1 / the 1x1 divisor
written by TRockToneMap, converted by a 1x1 compute pass) instead of their
auto exposure (option, on by default; DLSS uses it with presets J and K). - Run the camera velocity pass on engine flagged camera cut frames too
(bPrevTransformsReset, bCameraCut, bInstantlySwitchPostProcessVolume): it
writes no motion and resets SR, but stores the camera so the next frame
has history again (it reset twice before). - Delete the game device data with its real type (its resources leaked).
-
style(Batman Arkham Knight): apply the repository clang-format rules
-
fix(Batman Arkham Knight): give super resolution unjittered motion vectors
All the game velocities (the replaced camera velocity and the materials'
object velocities) come from the jittered current and previous projections,
so they contain "previous jitter - current jitter". They were passed with
MVJittered. A small compute pass now removes that jitter change (the same for
every pixel) into a separate texture for DLSS/FSR, and mvs_jittered is false,
so the result doesn't depend on how each SR implementation cancels jitter.
The engine motion blur still reads the original velocities.
Verified with the DLSS debug overlay: the input motion vectors of a static
scene are now zero (they shook before). An in-game A/B against MVJittered
showed no visible difference in the DLSS output.
- fix(Batman Arkham Knight): remove the jitter from the decal position reconstruction
The decal pixel shaders (FRockDecalPixelShader, 1084 variants in the combined
shader cache) rebuild the view position as "ndc * (1 / projection scale) * depth",
which is only right for a centered projection. With the jittered projection it's
off by the jitter (up to half a pixel, different every frame).
FRockDecalVertexShader (0x52595883) is replaced: it passes the pixel shaders the
clip position with the jitter removed. The jitter is taken from the view
projection in cb1[0..3], so views without jitter are unaffected. SV_Position is
unchanged.
Checked statically only: same signatures as the original, and a float32
simulation of the vertex + pixel shader math (8-72 jitter phases, 360p-4K) gives
a position error below 0.001 px (0.44-0.49 px before) with the same depth pixel.
In game there was no visible difference before and after in the places tried.
- fix(Batman Arkham Knight): keep the game anti aliasing when the engine patches can't be applied
- The velocity and jitter patches are now all or nothing (like the upscaling
ones). Without them super resolution isn't used and SMAA stays, instead of
running with unusable velocities and a reset every frame. - The replaced camera velocity shader runs even without its hook: the
reprojection matrix and view rect now default to "no motion" instead of
zeroes (0 / 0 velocities). - The projection is only jittered after a frame where super resolution ran:
it doesn't run with the game anti aliasing off, and nothing else resolves
the jitter.
Only compiled: the unsupported executable path can't be reached on the Steam build.
- fix(Batman Arkham Knight): keep the render width even when upscaling
The engine lighting is checkerboarded: FTileShadingComputeShader shades every
other pixel (x = 2 * thread x + (y & 1)) and FRecomposeComputeShader fills in the
rest. The two packed outputs sit side by side, the second "int(view width * 0.5)"
columns to the right, so with an odd view width the last column of the first one
lands on the first column of the second one. Odd widths came up at e.g. 1920x1080
Balanced (1113) and 3440x1440 Quality (2293).
From the shader disassembly, the effect in game wasn't observed. The percentage
search was checked for 15 output resolutions x 4 modes: always an even width, at
most 0.53 percentage points above the nominal scale.
- fix(Batman Arkham Knight): make the depth position reconstruction jitter aware in all shaders
The game shaders that rebuild a position from the scene depth turn NDC into a
view ray with the projection scale only, which is only right for a centered
projection. With the jittered one the position is off by the jitter, differently
every frame, so decals, lighting, shadows and AO shimmer.
They are now live patched when the game creates them (jitter_patch.h), 2073
shaders in the shader caches:
- 1084 deferred decal pixel shaders and 741 material pixel shaders:
"ndc * scale" becomes "(ndc - jitter) * scale" - 248 compute shaders (tiled lighting, reflections, AO): "ndc / projection"
becomes "(ndc - jitter) / projection", and the opposite where a view position
is projected back to the screen
The jitter is derived in the shader from the view constants it already has
(cb1[0..2] and cb1[17]), so it's zero for views without jitter. Nothing is
patched if the engine jitter patch couldn't be applied.
This replaces the FRockDecalVertexShader replacement (0x52595883): the decals
are now fixed in their pixel shaders, which also keeps the depth pixel
coordinates untouched.
OnBindPatchedShader() returns false so the game's own (in place patched) shader
objects stay bound instead of Luma's later clones. 74 of the patched compute
shaders use NVIDIA shader extensions (NV_EXTN_OP_VOTE_BALLOT through the fake UAV
at u7), which only work in shaders created while the game has the extension
slot set: with the clones whole lighting tiles flickered.
These are the same rewrites as the "Dlss Anti Aliasing" mod on Nexus (3530) does:
the patcher output was compared with it for the 29936 pixel and compute shaders
of the game caches, the same 2073 are patched, with identical instructions.
In game (RTX 5070 Ti, 4K): the jitter derived from the constants matches the one
we set in 900 sampled dispatches and decal draws. The tile flicker is gone on the
spot it was found on (16x16 blocks changing between frames: 0.6%, 4-12% with the
clones, 0.2% unpatched). Whether distant lighting is visibly calmer wasn't
compared, and other GPU vendors weren't tried.