Skip to content

Minimal SteamVR scene application serving as a performance-friendly environment to use overlay applications in

License

MIT, BSD-3-Clause licenses found

Licenses found

MIT
LICENSE.txt
BSD-3-Clause
LICENSE-OpenVR.txt
Notifications You must be signed in to change notification settings

elvissteinjr/SteamVR-VoidScene

Repository files navigation

SteamVR-VoidScene

Minimal SteamVR scene application serving as a performance-friendly environment to use overlay applications in.

What it does

  • Run as the active VR game/scene application, submitting a static 1x1 pixel texture as the eye textures each frame
  • Make SteamVR perform better than when not running any scene application
  • Nothing else

Why

Even with Home disabled, the blank default space in SteamVR takes more GPU time than running a SteamVR scene application that does nothing but submit eye textures. This can have a noticeable performance impact when playing demanding flatscreen games via a desktop overlay for example.

SteamVR-VoidScene attempts to minimize the basic load in order to provide more headroom for everything else in these scenarios.

Usage

Execute SteamVR-VoidScene.exe. There is no visual indication of it running on the desktop, but it will appear as the active SteamVR application.

SteamVR-VoidScene will exit when quit via SteamVR, by starting another SteamVR scene application or when closing SteamVR itself.

Configuration

Settings are stored in the global SteamVR settings file (steamvr.vrsettings). The application will add an "elvissteinjr.void_scene" section with options that can then be adjusted.

It will look like this:

"elvissteinjr.void_scene" : {
  "BackgroundColor" : "#000000",
  "UseDebugCommand" : false
}

BackgroundColor:
Color of the submitted eye texture/background. RGB color in hex-notation (#RRGGBB).
UseDebugCommand:
Use SteamVR debug command to fully suspend rendering and minimize load even more. Either true or false.

Command-Line

Settings can also be changed by running SteamVR-VoidScene with extra command-line arguments. This allows them to be adjusted while SteamVR is running.

--set-background-color:
Set BackgroundColor setting on launch. Example: SteamVR-VoidScene --set-background-color #386386
--set-use-debug-command:
Set UseDebugCommand setting on launch. Example: SteamVR-VoidScene --set-use-debug-command true

These arguments change the settings permanently, meaning the changes persist when running it without any arguments afterwards.

About UseDebugCommand

This setting enables the use of the Latency Testing Toggle SteamVR debug command to fully suspend rendering while also avoiding the loading pop-up and view fade behavior that typically appears when scene applications stop rendering.
While fairly effective, keep in mind this option is a hack and may stop working at any time or not work at all with certain configurations or hardware.

Keep the background color at #000000 when using this setting to avoid visual artifacts. If you still need a different background color, consider using something like Desktop+ which allows setting a background color using overlays.
SteamVR will not update most frame stats while the command is active.

SteamVR-VoidScene needs to exit cleanly to reset the effects of the debug command. They don't persist over multiple SteamVR sessions, but if the application is killed, any other subsequently launched SteamVR scene application will not be able to render.
Normal application exits are fine, including launching a different VR scene application to replace it.

Building

Just compile main.cpp and link it with OpenVR, Direct3D 11, and DXGI.

For example: g++ -o SteamVR-VoidScene.exe main.cpp openvr_api.dll -ld3d11 -ldxgi
Or: cl main.cpp openvr_api.lib d3d11.lib dxgi.lib shlapi.lib user32.lib /link /out:SteamVR-VoidScene.exe

Build it in Docker

If you don't have the full toolchain setup, you can build it in Docker:

  1. Install and set up docker.
  2. Pull this repository: git clone git@github.com:elvissteinjr/SteamVR-VoidScene.git
  3. Pull the mingw docker tool chain image and run it mounting the SteamVR-Voidscene directory:docker run -it -v ./SteamVR-VoidScene:/SteamVR-VoidScene mstorsjo/llvm-mingw bash
  4. Inside the container, navigate to the SteamVR voidscene directory and build:
cd ../SteamVR-VoidScene

i686-w64-mingw32-g++ -o SteamVR-VoidScene.exe main.cpp openvr_api.dll  -ld3d11 -ldxgi -I/opt/llvm-mingw/generic-w64-mingw32/include -static-libgcc -static-libstdc++
  1. Your SteamVR-VoidScene directory (both on the host and in Docker) now contains the SteamVR-VoidScene.exe. Copy this exe and the openvr_api.dll to wherever you will be running the application from and you're good to go.

License

SteamVR-VoidScene is licensed under the MIT License, see LICENSE.txt for more information.

For the OpenVR API header and library, see LICENSE-OpenVR.txt.

About

Minimal SteamVR scene application serving as a performance-friendly environment to use overlay applications in

Resources

License

MIT, BSD-3-Clause licenses found

Licenses found

MIT
LICENSE.txt
BSD-3-Clause
LICENSE-OpenVR.txt

Stars

Watchers

Forks

Languages