Shaders mod for better VR performance (experimental) - ED Forums
 


Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 07-08-2018, 10:14 PM   #1
Kegetys
Member
 
Kegetys's Avatar
 
Join Date: Mar 2010
Location: Kuopio, Finland
Posts: 102
Default Shaders mod for better VR performance (experimental)

I was slightly frustrated with poor performance when playing in VR with the new deferred rendering engine, so I had a look what would be possible to remove/simplify from the shaders to improve the framerate without too huge sacrifices in image quality. Focusing on anything that has a potentially high memory bandwidth cost (which is usually a big problem with deferred renderers + high resolutions) I was able to do some seemingly decent "optimizations".

The mod nowdays also does visual improvements. Full list of changes/options:

Performance optimizations:
- Simplified canopy glass shader
- "Emulation" for the OpenVR hidden area mesh
- Simplified histogram calculation
- Disabled bloom & color grading
- Simplified grass rendering
- Reduced shadow PCF maximum sample count from 16 to 10
- Simple transparent objects rendering, ie. propellers and smoke
- Disabled atmosphere for things close to camera
- Removed one GBuffer entirely for bandwidth savings
- Removed water refractions shader as it doesn't work with the above

Visual improvements:
- Albedo texture supersampling, for sharpening object textures. Visible especially with cockpit text labels.
- Multi-sampled shadow sampling in terrain with MSAA enabled (less aliased shadows)
- Alpha-to-coverage support for trees and tree flat shadows with MSAA enabled (less aliased trees)
- Improved night vision goggles, useable in VR with smaller, properly positioned scope and new noise effect.
- Optional NVG scope raise/lower feature with gain control (fixed gain)
- Added dithering to HDR tonemap to smooth out banding, visible especially at the sky
- The 3D mouse cursor is less bright at night time
- Slight mip bias adjustment for text rendering (sharper text)

Many of these can be toggled/configured from the config file.

Info about albedo texture supersampling here: http://www.kegetys.fi/dcs-shaders-perf-mod-update/
AToC & Multisampled shadow sampling comparison here: http://junk.kegetys.fi/atoc.jpg
Dithering comparison here: http://junk.kegetys.fi/dit.png ('off' is a bit worse in the shot than it is in-game)

Example scenes:
Stock shaders in Hornet, 65fps: http://junk.kegetys.fi/xzy/carrierlanding_orig_ssaa.jpg
With the mod, 98fps: http://junk.kegetys.fi/xzy/carrierlanding_opt_ssaa.jpg
Stock shaders in Harrier, 61fps: http://junk.kegetys.fi/xzy/readyramp_orig_ssaa.jpg
With the mod, 94fps: http://junk.kegetys.fi/xzy/readyramp_opt_ssaa.jpg
(These are taken in non-vr mode with some SSAA to get accurate FPS numbers)

Download for DCS World 2.5.6.50321: http://junk.kegetys.fi/DCS%20VR%20Sh....5.6.50321.zip (latest)

Download for DCS World 2.5.6.49314: http://junk.kegetys.fi/DCS%20VR%20Sh....5.6.49314.zip (old version)
Download for DCS World 2.5.6.47224: http://junk.kegetys.fi/DCS%20VR%20Sh....5.6.47224.zip (old version)
Download for DCS World 2.5.6.45915: http://junk.kegetys.fi/DCS%20VR%20Sh....5.6.45915.zip (old version)
Download for DCS World 2.5.6.43503: http://junk.kegetys.fi/DCS%20VR%20Sh....5.6.43503.zip (old version)
Download for DCS World 2.5.5.41371: http://junk.kegetys.fi/DCS%20VR%20Sh....5.5.41371.zip (old version)
Download for DCS World 2.5.5.34644: http://junk.kegetys.fi/DCS%20VR%20Sh....5.5.34644.zip (old version)
Download for DCS World 2.5.5.33184: http://junk.kegetys.fi/DCS%20VR%20Sh....5.5.33184.zip (old version)
Download for DCS World 2.5.4.25729: http://junk.kegetys.fi/DCS%20VR%20Sh....5.4.25729.zip (old version)
Download for DCS World 2.5.3.21107: http://junk.kegetys.fi/DCS%20VR%20Sh....5.3.21107.zip (old version)
Download for DCS World 2.5.2.19273.411: http://junk.kegetys.fi/DCS%20VR%20Sh...273.411(b).zip (old version)

See the readme for install instructions. Its very likely it will break with future DCS versions that change the shaders...

It works in non-VR mode too, but likely the performance gain is not that huge unless you play in very high resolution.

FAQ
Does the mod work in multiplayer?
Only on servers with disabled integrity check.

My game freezes at startup with the mod?
It just takes a long time to compile the shaders at first run, be patient. If you want, you can monitor the progress with SysInternals DebugView.

Game freezes when starting a particular mission?
Likely you have loaded a new terrain for the first time after installing the mod and metashaders for the terrain are getting recompiled. Just wait as above and it should be fast the next time.

Plane cockpit is missing/transparent?
This seems to happen randomly when the shaders for the cockpit were just compiled. Re-entering the plane/restarting the mission or DCS should fix it and it should not happen any more when the shaders are already compiled.

Changelog
2.5.6.50321:
- Compatibility with DCS World version 2.5.6.50321 (6.6.2020)
- Fixed tree AToC in TGP
2.5.6.49314:
- Renamed the mod to 'DCS World VR shaders mod'
- Compatibility with DCS World version 2.5.6.49314 (23.5.2020)
- Removed MSAA_MASKSIZE setting as ED "cloned" it to DCS itself
- Added multi-sampled terrain shadow sampling (less aliased shadows with MSAA)
- Added alpha-to-coverage support for trees and tree flat shadows (less aliased trees with MSAA)
- Fixed ship wakes being permanently "burned in" with high water detail
- Simple transparent objects rendering setting (off by default - not well tested)
- Fixed some issues with NVG especially with NVG_GAIN_ADJUSTS_POSITION enabled
2.5.6.47224:
- Compatibility with DCS World version 2.5.6.47224 (19.4.2020)
- Fixed some potential issues with GBuffer decoding
- Fixed simple glass albedo color
- Added ENABLE_NO_BLOOM setting to keep bloom enabled (appears to perform better nowdays)
- Changed HMD mask outside area to write black rather than discard to be compatible with bloom
- Added albedo texture supersampling (ENABLE_DIFFUSE_SS setting)
2.5.6.45915:
- Compatibility with DCS World version 2.5.6.45915 (3.4.2020)
2.5.6.43503:
- Compatibility with DCS World version 2.5.6.43503 (16.2.2020)
- Restored original sun flare
- Added simplified version of histogram calculation (previously it was removed completely)
- Above can be turned off with ENABLE_SIMPLE_HG setting
- Removed the sRGB fix as the game seems to have some other workaround for it now
- ENABLE_SIMPLE_SHADOWS now limits the sample count to 10 instead of 16
v2.5.5.41371:
- Compatibility with DCS World version 2.5.5.41371 (4.1.2020)
v2.5.5.34644:
- Compatibility with DCS World version 2.5.5.34644 (14.8.2019)
v2.5.4.28615:
- Restored resolveDepth as it was causing problems with haze and NVG depth effect
- Fixed fog not being visible near the camera
- NVG effect improved for VR goggles (smaller scope, correct positioning, new noise)
- NVG gain now does something proper rather than just brightens up the sky
- NVG parameters configurable from _HMD.hlsl
- Included the sRGB gamma fix in the mod (fix elevated black levels, visible esp. at night)
- Added simple dithering to HDR tonemap to smooth out banding, visible especially at the sky
- Made the 3D mouse cursor less bright at night time
- Some optimizations can now be turned off from _HMD.hlsl (simple shadows, grass, canopy)
v2.5.4.25729:
- Compatibility with DCS World version 2.5.4.25729 (20.12.201
v2.5.3.21107:
- Compatibility with DCS World version 2.5.3.21107 (31.8.201
- Fixed moonlight illuminating cockpit glass too much
v2.5.2.19273.411(b):
- Fixed compile error with DIFFUSE_UV
v2.5.2.19273.411:
- Fist version
__________________
As a cyborg, you will serve SHODAN well
http://www.kegetys.fi

Last edited by Kegetys; 06-06-2020 at 10:45 AM. Reason: update for 2.5.6.50321
Kegetys is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 07:35 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.