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


Notices

Reply
 
Thread Tools Display Modes
Old 07-08-2018, 10:14 PM   #1
Kegetys
Member
 
Kegetys's Avatar
 
Join Date: Mar 2010
Location: Kuopio, Finland
Posts: 103
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 changes done include:
- Simplified canopy glass shader*
- "Emulation" for the OpenVR hidden area mesh (not rendering area which you cannot see)**
- MSAA is applied only on the middle area of view in VR***
- Disabled histogram calculation
- Disabled bloom
- Simple tonemapping (doesn't do much of anything, you may need to adjust gamma more often)
- Disabled blur compute shaders
- Removed resolveDepth shaders
- Removed some refractions shader (not sure what it did)
- Simplified grass rendering
- Disabled atmosphere for things close to camera
- Removed one GBuffer entirely for bandwidth savings (AO and emissivity are packed in same channel, cannot exist together)
- Slight mip bias adjustment for text rendering (sharper text)
- Reduced shadow PCF maximum sample count from 32 to 10
- Disabled color grading
- Sun flare hidden (it no longer worked right, possibly due to removal of resolveDepth)

* This optimization does not work with planes which do not use the glass shader for the canopy glass. For example the A10C, Hawk and Viggen. It works at least with the Hornet and Harrier.
** If you see an area around your peripheral vision rendered incorrectly open Bazar\shaders\deferred\_HMD.hlsl and increase the MASKSIZE value. The default is optimized for HTC Vive.
*** You can also adjust MSAA_MASKSIZE value from above file, which is the size of the area onto which MSAA is applied when it is enabled. Default is a very small area in the middle of the view.

Some of these are quite visible changes like removal of tonemapping & bloom, simplification of the canopy shader and shadows, and likely many features like DOF or SSAO no longer work. I would expect there to be other broken features too, I haven't played with it that much yet.

The performance gain however is pretty good, it can be up to 50% or more in conditions where the GPU is the limiting factor.

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.2.19273.411: http://junk.kegetys.fi/DCS%20VR%20Sh...273.411(b).zip

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.

Settings I use: http://junk.kegetys.fi/xzy/vr_settings.jpg
__________________
As a cyborg, you will serve SHODAN well
http://www.kegetys.fi

Last edited by Kegetys; 07-13-2018 at 03:36 PM. Reason: quick update to fix DIFFUSE_UV error
Kegetys is offline   Reply With Quote
Old 07-08-2018, 10:28 PM   #2
Brixmis
Senior Member
 
Join Date: Dec 2014
Location: On An Island
Posts: 1,663
Default

Thanks for sharing this - will be interesting to see what effect it has on my rig.
__________________
Pictorial Guides
Brixmis is offline   Reply With Quote
Old 07-08-2018, 11:47 PM   #3
zionid
Member
 
Join Date: Sep 2013
Posts: 677
Default

Interesting! Will test!
zionid is offline   Reply With Quote
Old 07-09-2018, 03:47 AM   #4
Zeroskills
Junior Member
 
Join Date: Feb 2014
Posts: 45
Default

I gave this a shot. Resolution seemed better and the frame rate seemed the same, but I definatly have the weird artifacts around the edge of my vision now. It kind of felt like I was getting eye strain after 10 minutes or so. Any suggestions for the MASKSIZE value for an Oculus Rift?


Edit: I used 0.575 for the MASKSIZE and it got rid of the artifacts at the edge of my vision and FPS seemed unaffected. A lower value might work, but trying it out will have to wait until I have more time.

Last edited by Zeroskills; 07-09-2018 at 04:15 AM.
Zeroskills is offline   Reply With Quote
Old 07-09-2018, 03:55 AM   #5
Nero.ger
Member
 
Join Date: Feb 2016
Posts: 554
Default

this looks VERY interresting. Does it work in MP or does the Integrity Check freak out?
__________________
'controlling' the Ka50 feels like a discussion with the Autopilot and trim system about the flight direction.
Nero.ger is offline   Reply With Quote
Old 07-09-2018, 05:49 AM   #6
Highwayman-Ed
Senior Member
 
Highwayman-Ed's Avatar
 
Join Date: Nov 2005
Location: Melbourne, Australia
Posts: 1,250
Send a message via AIM to Highwayman-Ed
Default

Quote:
Originally Posted by Zeroskills View Post
definatly have the weird artifacts around the edge of my vision now.
Same, although I still just had them at .575...


Quote:
Originally Posted by Nero.ger View Post
this looks VERY interresting. Does it work in MP or does the Integrity Check freak out?
It will kill the integrity check as it is making changes to core game files, but it does look very promising.
__________________

Intel i7-7700k @4.8GHz
MSI Z270 Gaming Carbon Pro
32GB G.Skill Trident DDR3200 RAM
MSI 11GB GTX1080ti Founders Edition
40" Panasonic TH-40DX600U @ 4K
Oculus Rift CV1
Gametrix JetSeat with SimShaker
Windows 10 64 Bit Home Edition



Last edited by Highwayman-Ed; 07-09-2018 at 07:16 AM.
Highwayman-Ed is offline   Reply With Quote
Old 07-09-2018, 08:00 AM   #7
Roller25
Junior Member
 
Join Date: Apr 2010
Location: Australia
Posts: 58
Default

Definitely made a difference on my machine.. VR with Oculus and runs much smoother..
Roller25 is offline   Reply With Quote
Old 07-09-2018, 08:43 AM   #8
Nero.ger
Member
 
Join Date: Feb 2016
Posts: 554
Default

Quote:
Originally Posted by Highwayman-Ed View Post
It will kill the integrity check as it is making changes to core game files.
not that there was any doubt, just to confirm i tested it and its triggering IC problems
__________________
'controlling' the Ka50 feels like a discussion with the Autopilot and trim system about the flight direction.
Nero.ger is offline   Reply With Quote
Old 07-09-2018, 09:02 AM   #9
Cibit
Veteran
 
Cibit's Avatar
 
Join Date: Jan 2009
Location: Northumberland. UK
Posts: 4,243
Default

Can this be used via OvGME? Do the visuals suffer much
@ Highwayman-ED be nice to hook up with some hornet flying with you mate Hope all is well with you down under
__________________
i5 8600k@5.2Ghz, Asus Prime A Z370, 16Gb DDR4 3000, GTX1080 SC, Oculus Rift CV1, Modded TM Warthog Modded X52 Collective, Jetseat, W10 Pro 64

Cibit is offline   Reply With Quote
Old 07-09-2018, 09:11 AM   #10
Highwayman-Ed
Senior Member
 
Highwayman-Ed's Avatar
 
Join Date: Nov 2005
Location: Melbourne, Australia
Posts: 1,250
Send a message via AIM to Highwayman-Ed
Default

Quote:
Originally Posted by Cibit View Post
Can this be used via OvGME? Do the visuals suffer much
Yes, it can and no they don't. The only thing that I've noticed any real degradation with is the grass, and right now, I'm not seeing a lot of that in my Hornet (Notice I said in my Hornet, I'm seeing plenty of it at the end of my silk let downs )

I've found setting the mask size to 0.600f works great for me with a CV1 and I will congratulate Kegetys for making my text easier to read in my MFD's!
__________________

Intel i7-7700k @4.8GHz
MSI Z270 Gaming Carbon Pro
32GB G.Skill Trident DDR3200 RAM
MSI 11GB GTX1080ti Founders Edition
40" Panasonic TH-40DX600U @ 4K
Oculus Rift CV1
Gametrix JetSeat with SimShaker
Windows 10 64 Bit Home Edition



Last edited by Highwayman-Ed; 07-09-2018 at 09:16 AM.
Highwayman-Ed is offline   Reply With Quote
Reply

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 10:59 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.