diff --git a/docs/agents/symptoms.md b/docs/agents/symptoms.md index 2b4ef322..20fa3ab0 100644 --- a/docs/agents/symptoms.md +++ b/docs/agents/symptoms.md @@ -32,8 +32,8 @@ GPU semantics behind the graphics rows: [maxwell.md](../maxwell.md). The method | with DLAA on, the world behind the inventory smears into horizontal streaks on the right half, from the second time the inventory is opened (when Link's model is drawn there) | the camera jitter's read-back took the inventory camera's own off-centre projection (P[0][2] about -0.6) for a jitter and gave DLSS an offset of about 1152 pixels (fixed: `vk_dlaa.c` `cam_offset` takes only an offset it gave that block) | `TOTK_DLAA_CAM_JITTER=0` makes it go; a `--capture` run over the opened inventory: the background's horizontal gradient against its vertical one | | with DLAA/DLSS on, large distant blocks behind the fog (the Depths) turn darker or lighter for a frame while the camera moves | DLSS created with AutoExposure estimated the exposure of the dark scene itself, and the estimate moved from frame to frame (fixed with `dlss_fixed_exposure = 1`: `vk_dlaa.c` evaluate creates the feature without it) | a flat fogged patch in `capture.py` frames: one value without DLAA, jumps with it | | flicker or a texture swapped with a similar one | the newest texture picked at shared storage instead of the one with the matching view | texture lookup by id in the dump | -| with DLAA on, dust and small particles in fog (shrines) vanish, smear or behave oddly; the fog looks processed | DLSS ran at the bloom, after the fog and the particles, which have no motion vectors or jitter of their own (fixed: `vk_dlaa.c` effects_point runs DLSS at the first pass into the light target after the lighting, and the effects go over its picture) | `dlaa_effects_after = 0` (Screen tab) brings the old point back; the count "before the effects" in the `dlaa:` log line against the frames anti-aliased | -| with FSR on and "Fog and particles after DLAA" on (`dlaa_effects_after = 1`), a white or bright dotted outline along distant mountains and other silhouettes against the sky, most visible at night and at dawn against clouds; gone with that option off; `TOTK_DEMOTE` makes no difference | the upscaler ran at the first pass after the lighting, and the fog layer and the half-size clouds' composite that follow it decide per pixel from the scene depth, still jittered, whether it is sky: over the upscaler's steady picture a sky pixel on a ridge took the mountain's side in some frames and got no clouds (fixed for FSR: `vk_dlaa.c` `effects_point` waits for the first composite without depth, `dlaa_fx_composite`) | `TOTK_DLAA_FX_COMPOSITE=0` brings it back; `TOTK_DLAA_JITTER=0` or `dlaa_effects_after = 0` make it go; frame dump: ridge pixels brighter than the sky and the mountain in the composite pass into the light target | +| with DLAA on, dust and small particles in fog (shrines) vanish, smear or behave oddly; the fog looks processed | DLSS ran at the bloom, after the fog and the particles, which have no motion vectors or jitter of their own (fixed: `vk_dlaa.c` effects_point runs DLSS after the lighting, before the particles, and they go over its picture) | `dlaa_effects_after = 0` (Screen tab) brings the old point back; the count "before the effects" in the `dlaa:` log line against the frames anti-aliased | +| with FSR or DLSS on and "Fog and particles after DLAA" on (`dlaa_effects_after = 1`), a white or bright dotted outline along distant mountains and other silhouettes against the sky, most visible at night and at dawn against clouds; gone with that option off; `TOTK_DEMOTE` makes no difference | the upscaler ran at the first pass after the lighting, and the fog layer and the half-size clouds' composite that follow it decide per pixel from the scene depth, still jittered, whether it is sky: over the upscaler's steady picture a sky pixel on a ridge took the mountain's side in some frames and got no clouds (fixed: `vk_dlaa.c` `effects_point` waits for the first composite without depth and runs the upscaler before the particles) | `TOTK_DLAA_JITTER=0` or `dlaa_effects_after = 0` make it go; frame dump: ridge pixels brighter than the sky and the mountain in the composite pass into the light target | | with DLAA on, the picture flickers from frame to frame: a little outdoors; the whole scene in a fogged shrine with an ability's targeting view (Ultrahand) open, where the fog also goes back under DLSS | DLSS ran before some effects in one frame and after them in the next: their order changes from frame to frame (the yard's half-size effects pass is in some frames only; the ability highlight, drawn into the light target with a D16 depth of its own, comes before or after the fog layer), and a rule that waited for one of them or took any D16 pass for the lighting followed it (fixed: `vk_dlaa.c` effects_point knows the lighting by its depth and runs DLSS right after it) | the `dlaa:` log line: "before the effects" must equal the frames anti-aliased in the world; a log of the passes into the light target per frame | ## Timing and frame pacing diff --git a/docs/settings.md b/docs/settings.md index 081331fd..83b774b5 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -189,7 +189,6 @@ Many rows below are developer tools that only act together with another setting | Setting | What it does | Effect of changing it | Safety | | --- | --- | --- | --- | | `dlaa_cam_jitter` (default `1`) | Game 1.4.3: `1` puts the jitter fed to DLSS into the game's camera (the projection's centre terms and the view-projection, where the game copies them into its camera blocks); `0` moves the viewport of the scene's draws instead, as on the other game versions. Needs `ubo_snapshot`. | With `0`, water seen at a low angle flickers with DLAA: the game's full-screen passes rebuild positions with a camera the scene was not drawn with; a test setting. | Caution | -| `dlaa_fx_composite` (default `1` with FSR, `0` with DLSS) | Where the upscaler runs among the effects drawn after the lighting: `1` waits for the first full-size composite without depth into the light target (the clouds outdoors, the volumetric fog in shrines) and runs before the next pass with a depth (the particles), so the fog layer and the clouds go through the upscaler; `0` runs it at the first pass after the lighting (`runtime/vk_dlaa.c` `effects_point`). Only with `dlaa_effects_after = 1`. | With `0` and FSR, distant ridges against clouds or fog get a flickering bright outline at night and at dawn: the fog and the clouds are tested against the jittered depth over the upscaler's steady picture. With `1` on DLSS: not measured on NVIDIA hardware. | Caution | | `dlaa_jitter` (default `1`) | `0` turns off the camera jitter fed to DLSS. | DLSS gets no jitter between frames; a test setting. | Caution | | `dlaa_maskdebug` (default `0`) | `1` shows the reactive mask in place of the picture. | The frame shows a debug image while it is set. | Caution | | `dlaa_mv` (default `1`) | `0` sends zero motion vectors to DLSS. | DLSS sees no motion, so moving content can smear; a test setting. | Caution | diff --git a/runtime/cfg.c b/runtime/cfg.c index 7732dc14..e6722ae8 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -41,7 +41,7 @@ static const char *const known[] = { "BIND_INC", "BIND_SKIP", "BIND_STATS", "BIND_UP", "BIND_X", "BIND_Y", "BIND_ZL", "BIND_ZR", "BARRIER_MERGE", "BLOCK_VIEWS_3D", "CLIMB_FIX", "CLOTH_REALTIME", "COLOR_BRIGHTNESS", "COLOR_CONTRAST", "COLOR_GAMMA", "COLOR_PRESET", "COLOR_SATURATION", "CONTACT_DEBUG", "CONTACT_SHADOWS", "CORE_DIAG", "CRIT", "CRIT_OUT", - "DESC_TEMPLATE", "DESWIZZLE", "DEVICE_PROFILE", "DIALOGUE_CLICK", "DISCORD_APP_ID", "DISCORD_IMAGE", "DISCORD_RPC", "DLAA", "DLAA_CAM_JITTER", "DLAA_EFFECTS_AFTER", "DLAA_FX_COMPOSITE", "DLAA_JITTER", "DLAA_MV", "DLAA_MASKDEBUG", "DLAA_MVDEBUG", "DLAA_OBJMV", "DLAA_SURVEY", "DLAA_TIMES", "DLSS", "DLSS_CHAR_MASK", "DLSS_FIXED_EXPOSURE", "DLSS_PRESET", "DLSS_REACTIVE", "DUMP", "DUMP_BUF", "DUMP_DIR", + "DESC_TEMPLATE", "DESWIZZLE", "DEVICE_PROFILE", "DIALOGUE_CLICK", "DISCORD_APP_ID", "DISCORD_IMAGE", "DISCORD_RPC", "DLAA", "DLAA_CAM_JITTER", "DLAA_EFFECTS_AFTER", "DLAA_JITTER", "DLAA_MV", "DLAA_MASKDEBUG", "DLAA_MVDEBUG", "DLAA_OBJMV", "DLAA_SURVEY", "DLAA_TIMES", "DLSS", "DLSS_CHAR_MASK", "DLSS_FIXED_EXPOSURE", "DLSS_PRESET", "DLSS_REACTIVE", "DUMP", "DUMP_BUF", "DUMP_DIR", "DUMP_LOG", "DYNAMIC_RES", "DYN_DELTA", "EXEFS", "FEEDBACK", "FG_DEBUG", "FG_OBJECTS", "FG_SHOT", "FG_SHOT_DIR", "FG_TEST", "FG_TIMES", "FIXED_RES_PATCH", "FIX_C0", "FIX_ZERO", "FLIGHT", "FLIGHT_AT", "FLIGHT_DIR", "FLIGHT_FRAMES", "FLIGHT_SPIKE_MS", "FLIGHT_THUMBS", "FLUSH_SPAN", "FOV", "FOV_PATCH", "FPS60", "FPS_LIMIT", "FRAME_GEN", "FRAME_QUEUE", "FREECAM_KEY", "FREECAM_PAD", "FREECAM_PATCH", "FREEZE_IDLE", "FREE_CORES", "FSR3_DEBUG", "FSR3_VIEW", "FSR4_DEBUG", "FSR_SHARPNESS", diff --git a/runtime/vk_dlaa.c b/runtime/vk_dlaa.c index 30832bc9..5a6fb5f4 100644 --- a/runtime/vk_dlaa.c +++ b/runtime/vk_dlaa.c @@ -1618,25 +1618,22 @@ static void gbuf_light(const VkExec *ex) { // breaks it puts DLSS back at the bloom until it holds again, so a frame the rule does not fit changes the picture at // most once a second instead of from frame to frame. // dlaa_effects_after = 0 (the Screen tab, read each frame): DLSS at the bloom, effects included. -// With FSR the point waits for the first full-size pass into the light target without depth (the composite of the -// half-size clouds outdoors, of the volumetric fog in shrines, of the field's effects in the yard) and runs before the -// next pass with a depth, the particles or the dust. The fog layer and those composites are drawn over the whole -// picture and decide per pixel from the scene depth whether a pixel is sky or a surface; over the upscaler's picture -// that depth is still this frame's jittered one while the picture is not, so on a silhouette against clouds or fog a -// pixel the picture shows as sky took the surface's side of the test in some frames: no clouds or fog there that -// frame, a brighter dot along distant ridges at night and at dawn, flickering with the jitter's phase and never -// resolved, since it came after the upscaler. Measured at 2560x1440 with FSR 4 (frame dumps, a ridge against the -// night sky): a ridge pixel brighter than the sky and the mountain beside it in 34 % of the columns with the point -// before the fog layer, 6-7 % (as with the upscaler off) with it after the composite. These layers are smooth and -// follow the scene, so the upscaler takes them with the scene's motion; the particles still go over its picture. -// A frame without such a composite before the bloom runs the upscaler at the bloom, and the FX_STEADY count holds the -// point back as for any frame the rule does not fit. TOTK_DLAA_FX_COMPOSITE=0 (test) puts the point back at the first -// pass after the lighting; =1 also moves it with DLSS, where it is off by default until measured on NVIDIA hardware. +// The point waits for the first full-size pass into the light target without depth after the lighting (the composite +// of the half-size clouds outdoors, of the volumetric fog in shrines, of the field's effects in the yard) and runs DLSS +// before the next pass with a depth, the particles or the dust. Run at the first pass after the lighting, it left the +// fog layer and those composites over its picture: they decide per pixel from the scene depth whether a pixel is sky +// or a surface, and that depth is still this frame's jittered one while DLSS's picture is not, so on a silhouette +// against clouds or fog a pixel the picture shows as sky took the surface's side of the test in some frames. No clouds +// or fog there that frame: a brighter dot along distant ridges at night and at dawn, flickering with the jitter's +// phase and never resolved, since it came after DLSS. Measured at 2560x1440 with FSR 4 (frame dumps, a ridge against +// the night sky): a ridge pixel brighter than the sky and the mountain beside it in 34 % of the columns with the point +// before the fog layer, 15 % with it after the composite (6 % with the upscaler off). These layers are smooth and +// follow the scene, so DLSS takes them with the scene's motion; the particles and the dust still go over its picture. +// A frame without such a composite before the bloom runs DLSS at the bloom, and the FX_STEADY count holds the point +// back as for any frame the rule does not fit. #define FX_STEADY 60u static int effects_point(const VkExec *ex) { - static int after_comp = -1; - if (after_comp < 0) after_comp = rt_knob("DLAA_FX_COMPOSITE", D.fsr ? "1" : "0"); const VkExecTarget *c = &ex->color[0], *z = &ex->depth; if (!D.fx_on || D.fx_bad || !D.glight || D.ended || ex->pass_ncolor != 1 || c->image != D.glight || c->level) return 0; if (!D.light_z) { @@ -1647,8 +1644,8 @@ static int effects_point(const VkExec *ex) { unsigned o[2], s[2]; res_sizes(o, s); if (c->width < o[0] || !scene_shaped(c) || !scene_large(c)) return 0; - if (after_comp && !z->image) D.fx_comp = 1; // asked again at the same pass: the same answer - if (after_comp && (!D.fx_comp || !z->image)) return 0; + if (!z->image) D.fx_comp = 1; // asked again at the same pass: the same answer + if (!D.fx_comp || !z->image) return 0; D.fx_seen = D.fx_open = 1; return D.fx_steady >= FX_STEADY; } diff --git a/totk.ini.example b/totk.ini.example index b967fb2d..4813bde8 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -344,16 +344,13 @@ # for a frame. 0, the default: DLSS estimates the exposure itself, as before. Every DLSS mode. Changes while the game # runs take effect at once. # dlss_fixed_exposure = 0 -# With DLAA (dlaa = 1, dlss = dlaa), fog, dust and other particles are drawn over the picture DLSS has already smoothed, -# as the game draws them without DLSS, so small particles in fog (shrines) no longer vanish or leave trails. 0: DLSS -# processes these effects too, as before (the default until the inventory preview, the scope and water edges are -# checked on NVIDIA). The upscaling DLSS modes always process them. Changes while the game runs take effect at once. +# With DLAA (dlaa = 1, dlss = dlaa), dust and other particles are drawn over the picture DLSS has already smoothed, as +# the game draws them without DLSS, so small particles in fog (shrines) no longer vanish or leave trails. The fog layer +# and the clouds still go through DLSS: drawn over its picture they left a flickering bright outline on distant ridges +# at night and at dawn. 0: DLSS processes all these effects too, as before (the default until the inventory preview, +# the scope and water edges are checked on NVIDIA). The upscaling DLSS modes always process them. Changes while the +# game runs take effect at once. # dlaa_effects_after = 0 -# With dlaa_effects_after = 1: 1 runs the upscaler after the fog layer and the clouds (or a shrine's volumetric fog) and -# before the particles, so distant ridges against clouds or fog get no flickering bright outline at night and at dawn; -# 0 runs it right after the lighting, before the fog. The default is 1 with FSR and 0 with DLSS, not yet checked on -# NVIDIA. Read at start. -# dlaa_fx_composite = 1 # Low latency: off, auto, on or boost. Reduces system input latency. on and boost enable NVIDIA Reflex # (VK_NV_low_latency2); boost also keeps NVIDIA GPU clocks high in CPU-bound scenes. auto enables Reflex, or AMD # Anti-Lag 2 (VK_AMD_anti_lag: Mesa RADV, AMD's Windows driver) on a GPU without Reflex. On a GPU with neither the