Skip to content

Commit

Permalink
added VR Performance Toolkit v0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
tappi287 committed Mar 22, 2022
1 parent 3c82bd9 commit 63abc71
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 9 deletions.
3 changes: 2 additions & 1 deletion app/app_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ class AppSettings(JsonRepr):
'v0.2': '017212ff2fabff1178462bf32923a6ce',
'v0.2.1': '2baca682f41b5046f3245d200b4e3c02',
'v0.2.2': '30531b66aa251f7ee7cfbc9b005d10b3',
'v0.3.0': '8bd81654a1a8cf77e7f7a54bb137c7ac',
}
current_fsr_version = 'v2.1.1'
current_foveated_version = 'v0.2'
current_vrperfkit_version = 'v0.2.2'
current_vrperfkit_version = 'v0.3.0'

# Default plugin paths
mod_data_dirs = dict()
Expand Down
18 changes: 18 additions & 0 deletions app/cfg/vrperfkit_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,15 @@ def __init__(self):
value=1.00,
settings=[{'settingType': 'range', 'min': 0.20, 'max': 2.00, 'step': 0.01}]
)
self.ffrFavorHorizontal = BaseModCfgSetting(
key='favorHorizontal',
name='Favor Horizontal',
category=self.ffr.category,
parent=self.ffr.key,
desc="When reducing resolution, prefer to keep horizontal or vertical resolution",
value=True,
settings=[{'value': True, 'name': 'Horizontal'}, {'value': False, 'name': 'Vertical'}]
)

# --
# HotKeys
Expand Down Expand Up @@ -260,6 +269,15 @@ def __init__(self):
value=["alt", "f1"],
settings=[{'settingType': 'keyCombo'}]
)
self.hkToggleFFRFavorHorizontal = BaseModCfgSetting(
key='toggleFFRFavorHorizontal',
name='Toggle FFR favor Horizontal',
category=self.hotkeys.category,
parent=self.hotkeys.key,
desc="Toggle if you want to prefer horizontal or vertical resolution",
value=["alt", "f2"],
settings=[{'settingType': 'keyCombo'}]
)

# --
# Debug mode
Expand Down
26 changes: 23 additions & 3 deletions data/vrperfkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,50 @@ Included mods:
* AMD FidelityFX Super Resolution
* NVIDIA Image Scaling
* AMD Contrast Adaptive Sharpening
* Fixed foveated rendering (render center of image at full resolution, but drop resolution towards edges)
* Variable Rate Shading (only for NVIDIA RTX / GTX 16xx cards)

Planned mods:

* "Fixed foveated" rendering (render fewer pixels at the edges of the screen)
* Variable Rate Shading (only for NVIDIA RTX / GTX 16xx cards)
* Radial Density Masking (all GPUs, but works only with a handful of games)
* Force hidden area mask: don't render pixels at the edges that are not visible in the headset.
Many games already use this mask, but not all. This mod will allow you to force its usage.

Supported VR runtimes:

* Oculus (in alpha)
* Oculus
* OpenVR

Supported graphics APIs:

* Direct3D 11

## Installation

Extract `dxgi.dll` and `vrperfkit.yml` next to the game's main executable.
For Unreal Engine games, this is typically `<Game>Game\Binaries\Win64\<Game>Game-Win64-Shipping.exe`.

Edit the `vrperfkit.yml` config file to your heart's content. The available options are
documented inside the config file; you'll have to experiment with them and try which options
work for your particular game.

## Build instructions

Clone the repository and init all submodules.

```
git clone https://github.com/fholger/vrperfkit.git
cd vrperfkit
git submodule init
git submodule update --recursive
```

Download the [Oculus SDK](https://developer.oculus.com/downloads/package/oculus-sdk-for-windows)
and extract `LibOVR` from the downloaded archive to the `ThirdParty` folder.

Run cmake to generate Visual Studio solution files. Build with Visual Studio.
Download [NVAPI](https://developer.nvidia.com/nvapi) (requires NVIDIA developer account) and extract
the contents of the `Rxxx-developer` folder to `ThirdParty\nvapi`.

Run cmake to generate Visual Studio solution files. Build with Visual Studio. Note: Ninja does not work,
due to the included shaders that need to be compiled. This is only supported with VS solutions.
Binary file modified data/vrperfkit/dxgi.dll
Binary file not shown.
19 changes: 16 additions & 3 deletions data/vrperfkit/vrperfkit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ upscaling:
# - fsr (AMD FidelityFX Super Resolution)
# - nis (NVIDIA Image Scaling)
# - cas (AMD FidelityFX Contrast Adaptive Sharpening)
method: fsr
method: cas
# control how much the render resolution is lowered. The renderScale factor is
# applied to both width and height. So if renderScale is set to 0.5 and you
# have a resolution of 2000x2000 configured in SteamVR, the resulting render
# resolution is 1000x1000.
# NOTE: this is different from how render scale works in SteamVR! A SteamVR
# render scale of 0.5 would be equivalent to renderScale 0.707 in this mod!
renderScale: 0.77
renderScale: 0.9
# configure how much the image is sharpened during upscaling.
# This parameter works differently for each of the upscaling methods, so you
# will have to tweak it after you have chosen your preferred upscaling method.
Expand Down Expand Up @@ -48,7 +48,7 @@ upscaling:
# available on NVIDIA RTX and GTX 16xx cards.
fixedFoveated:
# enable (true) or disable (false) fixed foveated rendering
enabled: false
enabled: true
# configure the end of the inner circle, which is the area that will be rendered at full resolution
innerRadius: 0.6
# configure the end of the second ring, which will be rendered at half resolution
Expand All @@ -57,6 +57,17 @@ fixedFoveated:
outerRadius: 1.0
# the remainder of the image will be rendered at 1/16th resolution

# when reducing resolution, prefer to keep horizontal (true) or vertical (false) resolution?
favorHorizontal: true

# when applying fixed foveated rendering, vrperfkit will do its best to guess when the game
# is rendering which eye to apply a proper foveation mask.
# However, for some games the default guess may be wrong. In such instances, you can uncomment
# and use the following option to change the order of rendering.
# Use letters L (left), R (right) or S (skip) to mark the order in which the game renders to the
# left or right eye, or skip a render target entirely.
#overrideSingleEyeOrder: LRLRLR

# Enabling debugMode will visualize the radius to which upscaling is applied (see above).
# It will also output additional log messages and regularly report how much GPU frame time
# the post-processing costs.
Expand Down Expand Up @@ -89,3 +100,5 @@ hotkeys:
captureOutput: ["ctrl", "f8"]
# toggle fixed foveated rendering
toggleFixedFoveated: ["alt", "f1"]
# toggle if you want to prefer horizontal or vertical resolution
toggleFFRFavorHorizontal: ["alt", "f2"]
Binary file modified data/vrperfkit/x86/dxgi.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion openvr_fsr_app_win64_setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "OpenVR-FSR-App"
#define MyAppVersion "0.9.5"
#define MyAppVersion "0.9.7"
#define MyAppPublisher "Stefan Tapper"
#define MyAppURL "https://ilikeviecher.com"
#define MyAppDistDirName "openvr_fsr_app"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vr_mod_app",
"version": "0.9.5",
"version": "0.9.7",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down

0 comments on commit 63abc71

Please sign in to comment.