mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-19 04:15:57 +00:00
Merge pull request #1276: dlss_fixed_exposure creates DLSS without auto exposure, so distant fogged blocks in the Depths no longer change brightness for a frame (ipavlin98)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
b9f104ef6b
7 files changed
+46
-10
No files matched your search
@@ -30,6 +30,7 @@ GPU semantics behind the graphics rows: [maxwell.md](../maxwell.md). The method
|
||||
| puddles and still water flicker: the reflection turns on and off in patches from frame to frame while the camera stands still, more with DLAA | the game's water volume mask: a volume's top face lies on the water surface and is tested LEQUAL against a depth rebuilt at quarter size, so rounding and the camera's sub-millimetre motion decide it (fixed: `vk_pipeline.c` `vk_pipeline_volume_bias` gives such draws a depth bias toward the viewer) | a `--capture` run: the puddle's brightness swing (`capture.py` frames, a region's mean) with `TOTK_VOLUME_MASK_BIAS=0` and without; in a frame dump, the quarter-size mask after the volume draw changes from frame to frame |
|
||||
| with DLAA on, water seen at a low angle (ponds, streams) flickers in large patches with a period of about three frames, between the reflection of the trees and that of the sky; without DLAA it is still | the jitter moved the viewport of the scene's draws but not the game's camera, so its full-screen passes rebuilt positions half a pixel off the surface and its screen-space reflections flipped between hit and miss with the jitter's phase (fixed on 1.4.3: `vk_dlaa.c` puts the jitter into the camera blocks where the game copies its matrices, `vk_dlaa_camera_copied`) | `TOTK_DLAA_CAM_JITTER=0` brings the viewport jitter back; a `--capture` run: the region's brightness swing with DLAA, against `TOTK_DLAA_JITTER=0` |
|
||||
| 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 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 |
|
||||
|
||||
+3
-3
@@ -40,7 +40,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_JITTER", "DLAA_MV", "DLAA_MASKDEBUG", "DLAA_MVDEBUG", "DLAA_OBJMV", "DLAA_SURVEY", "DLAA_TIMES", "DLSS", "DLSS_CHAR_MASK", "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", "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_QUEUE",
|
||||
"FREEZE_IDLE", "FREE_CORES",
|
||||
@@ -84,7 +84,7 @@ static const struct { const char *key, *section; } sections[] = {
|
||||
{"COLOR_BRIGHTNESS", "display"}, {"COLOR_CONTRAST", "display"}, {"COLOR_SATURATION", "display"},
|
||||
{"COLOR_GAMMA", "display"}, {"HDR", "display"}, {"HDR_PEAK_NITS", "display"}, {"HDR_GAME_NITS", "display"},
|
||||
{"HDR_UI_NITS", "display"}, {"HDR_HUE", "display"}, {"SHADOW_RES", "display"},
|
||||
{"DLAA", "display"}, {"DLSS", "display"}, {"DLSS_PRESET", "display"}, {"DLSS_CHAR_MASK", "display"}, {"DLAA_EFFECTS_AFTER", "display"}, {"REFLEX", "display"}, {"FXAA", "display"},
|
||||
{"DLAA", "display"}, {"DLSS", "display"}, {"DLSS_PRESET", "display"}, {"DLSS_CHAR_MASK", "display"}, {"DLSS_FIXED_EXPOSURE", "display"}, {"DLAA_EFFECTS_AFTER", "display"}, {"REFLEX", "display"}, {"FXAA", "display"},
|
||||
{"DEVICE_PROFILE", "display"}, {"ASSUME_FOCUS", "display"},
|
||||
{"DISCORD_RPC", "discord"}, {"DISCORD_APP_ID", "discord"}, {"DISCORD_IMAGE", "discord"},
|
||||
{"SHADOW_SCALE", "display"}, {"SHADOW_RANGE", "display"}, {"GRASS_RANGE", "display"}, {"CONTACT_SHADOWS", "display"},
|
||||
@@ -141,7 +141,7 @@ static const CfgMeta metas[] = {
|
||||
{"DYNAMIC_RES", "1", "0|1", LIVE}, // resolution.c res_dynres_live
|
||||
{"UPSCALER", "fsr", "fsr|bilinear", LIVE}, {"SHARPNESS", "80", "0..100", LIVE},
|
||||
{"DLAA", "0", "0|1", RESTART}, {"DLSS", "dlaa", "dlaa|quality|balanced|performance|ultra_performance", LIVE},
|
||||
{"DLSS_PRESET", "default", "default|k|j", LIVE}, {"DLAA_EFFECTS_AFTER", "0", "0|1", LIVE},
|
||||
{"DLSS_PRESET", "default", "default|k|j", LIVE}, {"DLSS_FIXED_EXPOSURE", "0", "0|1", LIVE}, {"DLAA_EFFECTS_AFTER", "0", "0|1", LIVE},
|
||||
{"DLSS_CHAR_MASK", "65", "0|35|65|100", LIVE}, {"REFLEX", "off", "off|on|boost", RESTART}, {"FXAA", "1", "0|1", LIVE},
|
||||
{"LOD_STEADY", "0", "0|1", RESTART}, // sets steady
|
||||
{"ASPECT", "fit", "fit|stretch", LIVE}, {"MOVIE_ASPECT", "keep", "keep|stretch", LIVE}, {"FOV", "100", "70..140", LIVE},
|
||||
|
||||
@@ -750,6 +750,7 @@ static void tab_screen(float scale) {
|
||||
static const UiTextId chars[] = {UI_MENU_DLSS_CHARS_OFF, UI_MENU_DLSS_CHARS_LIGHT, UI_MENU_DLSS_CHARS_MEDIUM,
|
||||
UI_MENU_DLSS_CHARS_FULL};
|
||||
opt_choice("TOTK_DLSS_CHAR_MASK", UI_MENU_DLSS_CHARS, chars, 4, UI_MENU_DLSS_CHARS_DESC);
|
||||
opt_toggle("TOTK_DLSS_FIXED_EXPOSURE", UI_MENU_DLSS_FIXED_EXPOSURE, UI_MENU_DLSS_FIXED_EXPOSURE_DESC);
|
||||
opt_toggle("TOTK_DLAA_EFFECTS_AFTER", UI_MENU_DLAA_EFFECTS_AFTER, UI_MENU_DLAA_EFFECTS_AFTER_DESC);
|
||||
static const UiTextId reflex[] = {UI_MENU_REFLEX_OFF, UI_MENU_REFLEX_ON, UI_MENU_REFLEX_BOOST};
|
||||
opt_choice("TOTK_REFLEX", UI_MENU_REFLEX, reflex, 3, UI_MENU_REFLEX_DESC);
|
||||
|
||||
@@ -522,6 +522,11 @@ static const char *const text_en[UI_TEXT_COUNT] = {
|
||||
"fog (shrines) no longer vanish or leave trails. Off: DLSS also processes "
|
||||
"these effects, as before. DLAA mode only; the upscaling DLSS modes always "
|
||||
"process them. Applies at once.",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "Fixed DLSS exposure",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS takes the brightness of the game's picture as it is instead of "
|
||||
"estimating the exposure from each frame: in dark scenes (the Depths) large "
|
||||
"fogged areas no longer turn darker or lighter for a frame while the camera "
|
||||
"moves. Off: DLSS estimates the exposure itself, as before. Applies at once.",
|
||||
[UI_MENU_BIND_SKIP] = "Skip repeated binds",
|
||||
[UI_MENU_BIND_SKIP_DESC] = "Optimisation: skips bindings that did not change.",
|
||||
[UI_MENU_SHADER_MEMO] = "Shader memo", [UI_MENU_SHADER_MEMO_DESC] = "Optimisation: remembers shader lookups.",
|
||||
@@ -1128,6 +1133,11 @@ static const char *const text_ru[UI_TEXT_COUNT] = {
|
||||
"больше не пропадают и не оставляют шлейфов. Выкл.: DLSS обрабатывает и эти "
|
||||
"эффекты, как раньше. Только в режиме DLAA; режимы DLSS с повышением "
|
||||
"разрешения обрабатывают их всегда. Применяется сразу.",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "Фиксированная экспозиция DLSS",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS берёт яркость картинки игры как есть, а не оценивает экспозицию по "
|
||||
"каждому кадру: в тёмных сценах (Глубины) большие участки в тумане больше не "
|
||||
"темнеют и не светлеют на кадр при движении камеры. Выкл.: DLSS сам "
|
||||
"оценивает экспозицию, как раньше. Применяется сразу.",
|
||||
[UI_MENU_BIND_SKIP] = "Пропуск повторных привязок",
|
||||
[UI_MENU_BIND_SKIP_DESC] = "Оптимизация: пропускает неизменившиеся привязки.",
|
||||
[UI_MENU_SHADER_MEMO] = "Память шейдеров", [UI_MENU_SHADER_MEMO_DESC] = "Оптимизация: запоминает поиск шейдеров.",
|
||||
@@ -1572,6 +1582,12 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = {
|
||||
"pequenas na névoa (santuários) não somem mais nem deixam rastros. Desligado:"
|
||||
" o DLSS também processa esses efeitos, como antes. Só no modo DLAA; os modos"
|
||||
" de DLSS que aumentam a resolução sempre os processam. Aplica-se na hora.",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "Exposição fixa do DLSS",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "O DLSS usa o brilho da imagem do jogo como ele é, em vez de estimar a "
|
||||
"exposição a cada quadro: em cenas escuras (as Profundezas), grandes áreas com "
|
||||
"névoa não ficam mais escuras ou claras por um quadro enquanto a câmera se "
|
||||
"move. Desligado: o DLSS estima a exposição sozinho, como antes. Aplica-se na "
|
||||
"hora.",
|
||||
[UI_MENU_BIND_SKIP] = "Pular bindings repetidos",
|
||||
[UI_MENU_BIND_SKIP_DESC] = "Otimização: pula bindings que não mudaram.",
|
||||
[UI_MENU_SHADER_MEMO] = "Memória de shaders", [UI_MENU_SHADER_MEMO_DESC] = "Otimização: lembra as buscas de shaders.",
|
||||
@@ -2327,6 +2343,9 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "开启 DLAA 时,雾、灰尘和其他粒子绘制在 DLSS 已平滑的画面之上,与游戏不用 DLSS 时的"
|
||||
"绘制方式相同:雾中的细小粒子(神庙中)不再消失,也不再留下拖影。关闭:DLSS 也处理这些效果,与以"
|
||||
"前相同。仅用于 DLAA 模式;提升分辨率的 DLSS 模式始终处理它们。立即生效。",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "固定 DLSS 曝光",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS 直接使用游戏画面的亮度,而不是逐帧自行估算曝光:在暗场景(地底)中,"
|
||||
"镜头移动时大片雾中区域不再忽暗忽亮一帧。关闭:DLSS 自行估算曝光,与以前相同。立即生效。",
|
||||
[UI_MENU_BIND_SKIP] = "跳过重复绑定",
|
||||
[UI_MENU_BIND_SKIP_DESC] = "优化:跳过没有变化的绑定。",
|
||||
[UI_MENU_SHADER_MEMO] = "着色器查找缓存",
|
||||
|
||||
@@ -246,6 +246,7 @@ typedef enum {
|
||||
UI_MENU_LOD_GUARD, UI_MENU_LOD_GUARD_DESC,
|
||||
UI_MENU_FIX_C0, UI_MENU_FIX_C0_DESC,
|
||||
UI_MENU_FIX_ZERO, UI_MENU_FIX_ZERO_DESC, UI_MENU_DLAA_EFFECTS_AFTER, UI_MENU_DLAA_EFFECTS_AFTER_DESC,
|
||||
UI_MENU_DLSS_FIXED_EXPOSURE, UI_MENU_DLSS_FIXED_EXPOSURE_DESC,
|
||||
UI_MENU_BIND_SKIP, UI_MENU_BIND_SKIP_DESC,
|
||||
UI_MENU_SHADER_MEMO, UI_MENU_SHADER_MEMO_DESC,
|
||||
UI_MENU_PIPE_MEMO, UI_MENU_PIPE_MEMO_DESC,
|
||||
|
||||
+16
-7
@@ -296,6 +296,7 @@ static struct {
|
||||
uint64_t why[3]; // history resets: scene size changed, no camera, scene target changed
|
||||
int on; // the dlaa setting, read at each present (the menu switches it live)
|
||||
int preset, preset_dirty; // the DLSS model features are created with (preset_value); a change pending
|
||||
int fixed_exposure; // dlss_fixed_exposure the features are created with (preset_check)
|
||||
VkExecTarget ids; // this frame's G-buffer target 0 (object classes in green), valid with ids_ok
|
||||
int ids_ok;
|
||||
unsigned cfg_seen; // cfg_version when preset was read
|
||||
@@ -1223,8 +1224,13 @@ static void evaluate(VkExec *ex, const VkExecTarget *dst) {
|
||||
p_setu(p, "OutWidth", ow);
|
||||
p_setu(p, "OutHeight", oh);
|
||||
p_seti(p, "PerfQualityValue", perf_quality(w, ow));
|
||||
// IsHDR | MVLowRes | AutoExposure: linear scene light, motion vectors at the render size, no exposure texture
|
||||
p_seti(p, "DLSS.Feature.Create.Flags", (1 << 0) | (1 << 1) | (1 << 6));
|
||||
// IsHDR | MVLowRes: linear scene light, motion vectors at the render size, no exposure texture; AutoExposure
|
||||
// (1 << 6) unless dlss_fixed_exposure. With AutoExposure DLSS estimates the exposure from each frame itself, and
|
||||
// in the Depths, where the whole scene is dark, the estimate moved with the camera; distant blocks under uniform
|
||||
// fog came out up to 0.7 levels (of 255) darker or brighter for a frame, where the game's own picture held one
|
||||
// value (a 64x64 patch at 30.79 without DLAA read 30.09-30.79 frame to frame with AutoExposure and 30.4-30.7,
|
||||
// steady, without it). Without it DLSS takes the exposure as 1.
|
||||
p_seti(p, "DLSS.Feature.Create.Flags", (1 << 0) | (1 << 1) | (D.fixed_exposure ? 0 : 1 << 6));
|
||||
p_seti(p, "DLSS.Enable.Output.Subrects", 0);
|
||||
// The model per mode (NVSDK_NGX_DLSS_Hint_Render_Preset: 1 A ... 11 K, 12 L, 13 M), as NVIDIA recommends for
|
||||
// DLSS 4.5 (310.x): K (transformer) for DLAA, Quality and Balanced, M for Performance, L for Ultra Performance.
|
||||
@@ -1547,18 +1553,21 @@ static void dlss_mode(void) {
|
||||
}
|
||||
|
||||
|
||||
// The preset, read again when a setting changed (the menu); a different one recreates the features at the next DLAA run.
|
||||
// The preset and dlss_fixed_exposure, read again when a setting changed (the menu); a different one recreates the
|
||||
// features at the next DLAA run.
|
||||
static void preset_check(void) {
|
||||
unsigned v = cfg_version();
|
||||
if (v == D.cfg_seen) return;
|
||||
D.cfg_seen = v;
|
||||
int p = preset_value();
|
||||
if (p == D.preset) return;
|
||||
if (D.evals) {
|
||||
int p = preset_value(), x = cfg_bool("TOTK_DLSS_FIXED_EXPOSURE");
|
||||
if (p == D.preset && x == D.fixed_exposure) return;
|
||||
if (D.evals && p != D.preset) {
|
||||
if (p) rt_log("dlaa: DLSS preset %c in every mode; the features are created again", 'A' + p - 1);
|
||||
else rt_log("dlaa: DLSS presets per mode; the features are created again");
|
||||
}
|
||||
D.preset = p, D.preset_dirty = 1, D.reset = 1;
|
||||
if (D.evals && x != D.fixed_exposure)
|
||||
rt_log("dlaa: DLSS %s; the features are created again", x ? "exposure fixed at 1" : "auto exposure");
|
||||
D.preset = p, D.fixed_exposure = x, D.preset_dirty = 1, D.reset = 1;
|
||||
}
|
||||
|
||||
void vk_dlaa_frame(void) {
|
||||
|
||||
@@ -304,6 +304,11 @@
|
||||
# frame before, DLSS is told to favour the current frame by this percentage (0, 35, 65 or 100; 0 off). Higher removes
|
||||
# more of the trails and leaves those edges a little less smooth. Changes while the game runs take effect at once.
|
||||
# dlss_char_mask = 65
|
||||
# 1: DLSS takes the brightness of the game's picture as it is (exposure 1) instead of estimating the exposure from each
|
||||
# frame. In dark scenes (the Depths) the estimate moves with the camera, and large fogged areas turn darker or lighter
|
||||
# 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
|
||||
|
||||
Reference in new issue
Block a user