diff --git a/nx2navi.ini.example b/nx2navi.ini.example index d57fa19b..fe04570f 100644 --- a/nx2navi.ini.example +++ b/nx2navi.ini.example @@ -510,6 +510,13 @@ # camera's, so DLSS keeps their history instead of smearing or rejecting it. Costs some CPU time each frame (about 1-2 ms # on a laptop CPU); 0 leaves camera-only motion. Read at start. # dlaa_objmv = 1 +# Motion vectors of Link's own for DLSS, FSR 3.1 and frame generation (game 1.1.1): Link and the equipment attached to him are +# drawn a second time with last frame's pose, so fast turns, attacks and jumps move by their real motion instead of an +# estimate from colour and depth. 0, the default: the estimate, as before. 1: on, to try; it reads the player's +# equipment from the game's memory at every submission and has not been played on this version yet. Read at start. +# motion_guard_degrees (35, 45 or 60, the default): a part that turns more than this in one frame is checked against +# last frame's depth before its vector is written. +# selective_motion = 0 # Characters' trails: where a character, animal or held item moves without motion vectors of its own (all of them with # dlaa_objmv = 0), DLSS can drag a faint copy of it. The G-buffer marks those objects; on them and where they were the # frame before, DLSS is told to favour the current frame by this percentage (0, 35, 65 or 100; 0 off). Higher removes diff --git a/runtime/cfg.c b/runtime/cfg.c index a1057dd9..61ec856d 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -56,6 +56,7 @@ static const char *const known[] = { "HDR_TONEMAP", "HDR_TONE_SLOPE", "HIGHFPS_FIX", "INPUT", "INPUT_RECORD", "INPUT_SCRIPT", "LANG", "LIB_PREBUILD", "BIG_BUILD_FREE_MB", "BIG_BUILD_MAX_MB", "BUILD_FREE_MB", "BUILD_RESERVE_MB", "LIB_PREBUILD_BIG", "LIB_PREBUILD_BIG_BG", "LIB_PREBUILD_KEEP", "LIB_PREBUILD_THREADS", "LIB_WARM", "LINE_WIDTH", "POOL_SHOWN_FIRST", "TEX_REUSE_NAMED", "PIPE_LINK_MS", "FRAME_HOLD_MS", "PACE_SMOOTH", "OQ_BATCH", "GATE_WAIT_MS", "LOCALE", "LOD_GUARD", "LSTICK_DEADZONE", "MEMORY", "MEM_CENSUS", "MEM_NEED_MB", "MENU_LANG", "MENU_SOUND_VOLUME", "MENU_TEST", "MENU_CURSOR", "MENU_CURSOR_LOG", "MENU_TEST_CLICK", "MENU_TEST_DIR", "MENU_TEST_SET", "MINIMAL_LAYOUT", "MICROPHONE", "MIRROR_GAP", "MODS_DIR", "MODS_DISABLED", "MODS_ORDER", "MODS_REBUILD", "MONITOR", "MOTION", "MOUSE_MODE", "MOUSE_DIRECT_PATCH", "MOUSE_SENS", "MOUSE_TRACE", "MOVIE_HOST", "MOVIE_PACE", "MOVIE_CLOCK", "TEST_HITCH", + "MOTION_GUARD_DEGREES", "MOTION_POLICY_TRACE", "SELECTIVE_MOTION", "SELECTIVE_MOTION_RAW", // motion_owner.c, vk_fg_pose.inc "MVOBJ_ALL", "MVOBJ_BANKS", "MVOBJ_EQUAL", "MVOBJ_EXACT", "MVOBJ_EXEC", "MVOBJ_NOC4", "MVOBJ_ONLY", "MVOBJ_TIMES", "MVPREV_CHECK", "MVPREV_GROW", "MVPREV_SKIP", "MVPREV_TRUST", "MV_CHECK", "MV_SURVEY", "ONE_PER_CORE", "OPERATION_MODE", "OUTPUT_RES", "PAD_LAYOUT", "PACE_HZ", "PASS_CRUMBS", "PATCH_OUTPUT", "PATCH_RES_FIXED", "PATCH_SCENE", "PATCH_WIDE_ASPECT", "PATCH_WIDE_HUD", "PATCH_WIDE_MOVIE", "PATCH_WIDE_OUT", "PATCH_FREECAM", "PATCH_WIDE_SCENE", "PCSS", "PCSS_K", "PERF_OVERLAY", "PERF_SLOW_MS", "PIPELINE_CACHE", "PIPELINE_CACHE_MAX_MB", "PIPELINE_CACHE_PLAY", "PIPELINE_CACHE_PLAY_MB", "PIPE_BINARIES", "PIPE_BINARIES_MAX_MB", "PIPE_FEEDBACK", "PIPE_MEMO", "PIPE_PREBUILD", "PIPE_SEED", "PIPE_SKIP", "PIPE_SYNC", "PIPE_WAIT", "POWER_FULL", "TEX_SAME", "TEX_FLAT3D", "TEX_KEEP_TAKEN", "TEX_STALE_KEPT", "PRESENT_HELD", "HELD_SYNC", diff --git a/runtime/motion_owner.c b/runtime/motion_owner.c index 602bfd89..d3435f72 100644 --- a/runtime/motion_owner.c +++ b/runtime/motion_owner.c @@ -32,7 +32,11 @@ static int owner_on; static void owner_init(void *unused) { (void)unused; - owner_on = RT_V111 && rt_knob("SELECTIVE_MOTION", "1"); + // NX2NAVI_SELECTIVE_MOTION (selective_motion; default 0, 1 on): off until it has been played. On, every guest + // submission walks the player's actor, equipment and models in guest memory (motion_owner_capture), each scene + // draw is looked up in that list (vk_fg_pose.inc pose_owner), and the player's meshes are drawn a second time + // into the motion vectors DLSS, FSR 3.1 and frame generation read. + owner_on = RT_V111 && rt_knob("SELECTIVE_MOTION", "0"); } int motion_owner_enabled(void) { plat_once(&owner_once, owner_init, NULL); diff --git a/runtime/vk_fg_pose.inc b/runtime/vk_fg_pose.inc index a08f05ea..d68d331a 100644 --- a/runtime/vk_fg_pose.inc +++ b/runtime/vk_fg_pose.inc @@ -199,7 +199,7 @@ static float pose_rotation_trace_limit(void) { static int degrees; static float limit; if (!degrees) { - const char *setting = getenv("NX2NAVI_MOTION_GUARD_DEGREES"); + const char *setting = cfg_get("NX2NAVI_MOTION_GUARD_DEGREES"); // motion_guard_degrees in nx2navi.ini too degrees = setting && !strcmp(setting, "35") ? 35 : setting && !strcmp(setting, "45") ? 45 : 60; limit = degrees == 60 ? 2.0f : degrees == 45 ? 2.41421356f : 2.63830409f; rt_log("motion policy: rotation guard threshold %d degrees per rendered frame", degrees);