Set default render scale for VR to 0.8 on Quest and update related configurations

This commit is contained in:
iChris4 committed 2026-09-19 15:33:27 +02:00
1 parent e681294709
commit 7c981888d6
6 files changed
+23 -8

No files matched your search

+2 -1
View File
@@ -117,7 +117,8 @@ The old Eager Frame Heartbeat option has been removed and existing `eager_frame_
settings are ignored. Completed rendering wakes the XR thread immediately. A 50 ms keep-alive settings are ignored. Completed rendering wakes the XR thread immediately. A 50 ms keep-alive
still protects pauses and window dragging without eager repeats during rendering. still protects pauses and window dragging without eager repeats during rendering.
`render_scale` scales the per-eye size recommended by the OpenXR runtime. `render_scale` scales the per-eye size recommended by the OpenXR runtime. It defaults to 1.0 on PC
and 0.8 on the Quest, whose mobile GPU needs the headroom.
`world_units_per_meter` controls the scale of headset translation in the game world. `world_units_per_meter` controls the scale of headset translation in the game world.
`hud_distance_meters` and `hud_width_meters` place and size the virtual screen. They are read at `hud_distance_meters` and `hud_width_meters` place and size the virtual screen. They are read at
launch and govern both the menu screen and the in-race 2D screen, so 2D content keeps its place launch and govern both the menu screen and the in-race 2D screen, so 2D content keeps its place
@@ -20,6 +20,8 @@ object GameStorage {
const val DISC_DIRECTORY = "DATA" const val DISC_DIRECTORY = "DATA"
/** The Retro Rewind pack the modded product reads (`[paths] retro_rewind_root`). */ /** The Retro Rewind pack the modded product reads (`[paths] retro_rewind_root`). */
const val MOD_DIRECTORY = "RetroRewind6" const val MOD_DIRECTORY = "RetroRewind6"
/** `[vr] render_scale` until the player changes it; must match kVrRenderScaleDefault on Android. */
const val DEFAULT_RENDER_SCALE = 0.8
enum class DiscStatus { Missing, Incomplete, Ready } enum class DiscStatus { Missing, Incomplete, Ready }
@@ -91,7 +93,7 @@ object GameStorage {
"", "",
"[vr]", "[vr]",
"enabled = true", "enabled = true",
"render_scale = 1.0", "render_scale = $DEFAULT_RENDER_SCALE",
) )
config.writeText(lines.joinToString("\n", postfix = "\n")) config.writeText(lines.joinToString("\n", postfix = "\n"))
} else { } else {
@@ -161,7 +161,7 @@ class SettingsPage(
section(R.string.section_vr_headset) { section(R.string.section_vr_headset) {
slider( slider(
R.string.vr_render_scale, R.string.vr_render_scale_helper, 0.25, 2.0, 0.05, R.string.vr_render_scale, R.string.vr_render_scale_helper, 0.25, 2.0, 0.05,
read = { number(it, "vr", "render_scale", 0.25, 2.0, 1.0) }, read = { number(it, "vr", "render_scale", 0.25, 2.0, GameStorage.DEFAULT_RENDER_SCALE) },
format = { "%.2f×".format(it) }, format = { "%.2f×".format(it) },
write = { c, value -> c.setFloat("vr", "render_scale", value) }, write = { c, value -> c.setFloat("vr", "render_scale", value) },
) )
+3 -2
View File
@@ -670,8 +670,9 @@ or `EndAccess` errors); a black mirror too points at Aurora itself.
- **Performance.** The desktop product targets x86-64-v3; nothing has been - **Performance.** The desktop product targets x86-64-v3; nothing has been
profiled on the XR2. The first run compiles every bundled pipeline recipe profiled on the XR2. The first run compiles every bundled pipeline recipe
(about half a minute); later runs load Dawn's pipeline cache from `Cache/` (about half a minute); later runs load Dawn's pipeline cache from `Cache/`
next to `DATA`. Start with `render_scale` below 1.0 if the next to `DATA`. `render_scale` defaults to 0.8 here (1.0 on
compositor reports missed frames. `XR_FB_foveation` is not used yet. PC); lower it further if the compositor reports missed frames.
`XR_FB_foveation` is not used yet.
- **Lifecycle.** Backgrounding (the Quest menu, guardian) pauses the session - **Lifecycle.** Backgrounding (the Quest menu, guardian) pauses the session
through the ordinary `STOPPING`/`READY` events; SDL's Android surface loss is through the ordinary `STOPPING`/`READY` events; SDL's Android surface loss is
handled by Aurora's existing Android paths. Neither has been exercised. handled by Aurora's existing Android paths. Neither has been exercised.
+13 -2
View File
@@ -164,6 +164,17 @@ inline constexpr int kPortableSearchDepth = 4;
inline constexpr uint32_t kPostProcessingBloomPath = 0x10u; inline constexpr uint32_t kPostProcessingBloomPath = 0x10u;
inline constexpr uint32_t kDisabledPostProcessingPathsDefault = kPostProcessingBloomPath; inline constexpr uint32_t kDisabledPostProcessingPathsDefault = kPostProcessingBloomPath;
// Headset eye size as a fraction of what the OpenXR runtime recommends. A
// standalone headset renders on a mobile GPU, so the Quest starts below it;
// the launcher's first Config.toml (GameStorage.kt) writes the same value.
#if defined(__ANDROID__)
inline constexpr float kVrRenderScaleDefault = 0.8f;
#define MKW_VR_RENDER_SCALE_DEFAULT_TEXT "0.8"
#else
inline constexpr float kVrRenderScaleDefault = 1.0f;
#define MKW_VR_RENDER_SCALE_DEFAULT_TEXT "1.0"
#endif
// First-person camera defaults and the range its head offsets accept, in one // First-person camera defaults and the range its head offsets accept, in one
// place: the config getters, the on-disk template and the F10 bar's reset all // place: the config getters, the on-disk template and the F10 bar's reset all
// read them from here, so they cannot drift apart again. // read them from here, so they cannot drift apart again.
@@ -427,7 +438,7 @@ inline void EnsureConfigFile() {
"controller_mode = \"wii_remote\"\n" "controller_mode = \"wii_remote\"\n"
"# VR interpolation: 0 = Off, 1 = Auto, or 72/90/120 FPS. Live.\n" "# VR interpolation: 0 = Off, 1 = Auto, or 72/90/120 FPS. Live.\n"
"frame_interpolation_fps = 0\n" "frame_interpolation_fps = 0\n"
"render_scale = 1.0\n" "render_scale = " MKW_VR_RENDER_SCALE_DEFAULT_TEXT "\n"
"world_units_per_meter = 500.0\n" "world_units_per_meter = 500.0\n"
"hud_distance_meters = 2.0\n" "hud_distance_meters = 2.0\n"
"hud_width_meters = 2.4\n" "hud_width_meters = 2.4\n"
@@ -1307,7 +1318,7 @@ inline bool VrRequired(bool fallback = false) {
return Get().vrRequired.value_or(fallback); return Get().vrRequired.value_or(fallback);
} }
inline float VrRenderScale(float fallback = 1.0f) { inline float VrRenderScale(float fallback = kVrRenderScaleDefault) {
return std::clamp(Get().vrRenderScale.value_or(fallback), 0.25f, 2.0f); return std::clamp(Get().vrRenderScale.value_or(fallback), 0.25f, 2.0f);
} }
+1 -1
View File
@@ -365,7 +365,7 @@ public:
config.application_name = aurora_config.appName != nullptr ? aurora_config.appName config.application_name = aurora_config.appName != nullptr ? aurora_config.appName
: "WiiCompiled"; : "WiiCompiled";
config.engine_name = "Aurora"; config.engine_name = "Aurora";
config.resolution_scale = RuntimeConfigFile::VrRenderScale(1.0f); config.resolution_scale = RuntimeConfigFile::VrRenderScale();
#if defined(_WIN32) #if defined(_WIN32)
config.required_extensions = {"XR_KHR_D3D12_enable"}; config.required_extensions = {"XR_KHR_D3D12_enable"};
config.optional_extensions = {"XR_KHR_win32_convert_performance_counter_time", config.optional_extensions = {"XR_KHR_win32_convert_performance_counter_time",