Skip to content

Commit

Permalink
Fix like 1000 problems and bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Erimelowo committed Dec 1, 2023
1 parent d4bbaa6 commit 881c684
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 151 deletions.
38 changes: 22 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

[![Windows build testing](https://github.com/Louka3000/OpenVR-Dynamic-Resolution/actions/workflows/vs17.yml/badge.svg)](https://github.com/Louka3000/OpenVR-Dynamic-Resolution/actions/workflows/vs17.yml)

OpenVR app that dynamically adjusts the HMD resolution to the GPU frametime.
OpenVR app that dynamically adjusts the HMD's resolution to the GPU frametime, CPU frametime and VRAM.

This allows you to always have the maximum resolution your GPU can handle while hitting your target FPS (without reprojecting). Good for games in which GPU requirement varies a lot (e.g. VRChat).
This allows you to always have the maximum resolution your GPU can handle while hitting your target FPS (without reprojecting). Useful for games in which GPU requirement varies a lot (e.g. VRChat).

This is **not** the same as SteamVR's Auto Resolution, which behaviour's is quite bizarre, but seems to be using some benchmarking approach that doesn't work for the same as OVRDR.
This is **not** the same as SteamVR's Auto Resolution, which seems to be using some benchmarking approach that does not work for the same as OVRDR.

This won't work in games that require a restart for resolution changes, or that use their own dynamic resolution. **For a list of working and non-working games, check out [WorkingGames.md](WorkingGames.md)**
**Check out [WorkingGames.md](WorkingGames.md) for the list of working and non-working games.**

## Installation/Using It

Expand All @@ -26,7 +26,7 @@ Settings are found in the `settings.ini` file. Do not rename that file. It shoul

- `minimizeOnStart`: (0 = show, 1 = minimize, 2 = hide) Will automatically minimize or hide the window on launch. If set to 2 (hide), you won't be able to exit the program manually, but it will automatically exit with SteamVR.

- `initialRes`: The resolution the program sets when starting.
- `initialRes`: The resolution the program sets your HMD's resolution when starting. Also the resolution that is targeted in vramOnlyMode.

- `minRes`: The minimum value the program will be allowed to set your HMD's resolution to.

Expand All @@ -36,31 +36,37 @@ Settings are found in the `settings.ini` file. Do not rename that file. It shoul

- `resChangeDelayMs`: The delay in milliseconds (1000ms = 1s) between each resolution change. Lowering it will make the resolution change more responsive, but will cause more stuttering from resolution changes.

- `minGpuTimeThreshold`: If GPU time in milliseconds is below this value, don't change resolution. Useful to avoid messing with resolution in the SteamVR void or during loading screens.
- `minCpuTimeThreshold`: Don't increase resolution when CPU time in milliseconds is below this value. Useful to avoid the resolution increasing in the SteamVR void or during loading screens. Also see resetOnThreshold.

- `resIncreaseMin`: How many static % to increase resolution when we have GPU or VRAM headroom.
- `resIncreaseMin`: How many static % to increase resolution when we have GPU or/and VRAM headroom.

- `resDecreaseMin`: How many static % to decrease resolution when GPU time or VRAM is too high.
- `resDecreaseMin`: How many static % to decrease resolution when GPU frametime or/and VRAM usage is too high.

- `resIncreaseScale`: How much to increase resolution depending on GPU frametime headroom available
- `resIncreaseScale`: How much to increase resolution depending on GPU frametime headroom.

- `resDecreaseScale`: How much to decrease resolution depending on GPU frametime difference needed.
- `resDecreaseScale`: How much to decrease resolution depending on GPU frametime excess.

- `resIncreaseThreshold`: Percentage of the target frametime at which the program will stop increase resolution

- `resDecreaseThreshold`: Percentage of the target frametime at which the program will stop decreasing resolution

- `dataAverageSamples`: Number of samples to use for the average GPU time. Depends on dataPullDelayMs.

- `resetOnThreshold`: (0 = disabled, 1 = enabled) Enabling will reset the resolution to initialRes whenever minGpuTimeThreshold is met. Useful if you wanna go from playing a supported game to an unsuported games without having to reset your resolution/the program/SteamVR.
- `resetOnThreshold`: (0 = disabled, 1 = enabled) Enabling will reset the resolution to initialRes whenever minCpuTimeThreshold is met. Useful if you wanna go from playing a supported game to an unsuported games without having to reset your resolution/the program/SteamVR.

- `alwaysReproject`: (0 = disabled, 1 = enabled) Enabling will double the target frametime, so if you're at a target FPS of 120, it'll target 60. Useful if you have a bad CPU but good GPU.
- `vramTarget`: Your target vram usage in percents. Once your vram usage exceeds this point, the resolution will stop increasing.
- `vramLimit`: Your maximum vram usage in percents. Once your vram usage exceeds this point, the resolution will start decreasing.

- `vramTarget`: The target VRAM usage in percents. Once your VRAM usage exceeds this amount, the resolution will stop increasing.

- `vramLimit`: The maximum VRAM usage in percents. Once your VRAM usage exceeds this amount, the resolution will start decreasing.

- `vramMonitorEnabled`: (0 = disabled, 1 = enabled) If enabled, vram specific features will be enabled, otherwise it is assumed that free vram is always available.
- `vramOnlyMode`: (0 = disabled, 1 = enabled) Only adjust resolution based off VRAM; ignore GPU and CPU frametimes.

- `vramOnlyMode`: (0 = disabled, 1 = enabled) Only adjust resolution based off VRAM; ignore GPU and CPU frametimes. Will always stay at initialRes or lower (if VRAM limit is reached).

- `preferReprojection`: (0 = disabled, 1 = enabled) If enabled, the GPU target frametime will double as soon as the CPU frametime is over the target frametime; else, the CPU frametime needs to be 2 times greater than the target frametime for the GPU target frametime to double.
- `ignoreCpuTime`: (0 = disabled, 1 = enabled) Don't use CPU frametime to adjust resolution.

- `ignoreCpuTime`: (0 = disabled, 1 = enabled) Don't use the CPU frametime to adjust resolution.

## Building from source

Expand All @@ -74,7 +80,7 @@ cmake -B build
cmake --build build --config Release
```

You can then execute the newly built binary:
You can then execute the newly built binary by running:

```
.\build\Release\OpenVR-Dynamic-Resolution.exe
Expand Down
6 changes: 3 additions & 3 deletions settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ minimizeOnStart=0
initialRes=100

[Resolution change]
minRes=80
minRes=85
maxRes=500
dataPullDelayMs=200
resChangeDelayMs=1600
minGpuTimeThreshold=1.3
resChangeDelayMs=1700
minCpuTimeThreshold=1.0
resIncreaseMin=3
resDecreaseMin=9
resIncreaseScale=60
Expand Down
Loading

0 comments on commit 881c684

Please sign in to comment.