Happy new year everyone!
Performance is important for VR games, and while Dement was playable, it could have been better. This update took a while to come out because I've been working on not just the performance boosts, but polishing some side areas a bit, making new ones, working on long side quest chains, and some enemies. Thank you for the patience and I hope you enjoy the new performance boosts to Dement! New areas and quests are getting close, but they're not quite ready yet.
Due to the nature of this update, it is possible some visual issues may arise. Text not appearing on signs, things rendering on top of fog, a particular square of ground not having consistent lighting - these are all things encountered during the beta process. Some of them may persist yet - please report them! :D
- Changed rendering from deferred multi pass to forward single pass
- Added 2x MSAA
- Upgraded post processing stack
- New gamma correction effect - more robust, less intrusive. It is actually adjusting the gamma now, not messing with color spaces and post exposure values to try to cover up the gamma issue.
- Dynamic Resolution option added and enabled by default. You can adjust the lower-limit value, or disable entirely if you wish.
- Removed old quality options, they didn't do much but make the game look worse.
- Heavily optimized forest walk scene, removed the ugly bush and put in some new pretty ones.
- Fixed the puzzle in Ch.4 that involves the posing mannequins
- Fixed the park gate key not unlocking the park gate
- Other minor bug fixes
Now that we have the tl;dr list out of the way, I thought maybe some of you might enjoy a peak behind the curtain. ;)
Previously, Dement was using two cameras - one that rendered most of the game, and one that rendered the hands / weapons, UI, and applied the post processing effects. The game was set to deferred rendering for some of the effects, and multi pass was necessary for the post processing to not force each eye to render that double-circle-both-eyes image... you know the one I'm talking about. In other words, single pass would break everything.
So, in order to increase performance, I upgraded the post processing stack to allow single pass (this will usually half the CPU requirements for rendering) and since deferred wasn't necessary any more, switched to forward rendering as well (which in some instances decreased draw calls by over 60%).
At this point, Dement's image quality was very nice, very clear. Supersampling to 150% produced a very crisp image that was running much faster than the previous build at 100% supersampling. Switching to forward rendering unlocked the use of MSAA, and at the lowest setting removed jaggies without introducing any blur, and only increased performance cost by something like half of a millisecond.
So at this point we're at a pretty good place, yeah? Well, some scenes are heavier than others. The forest walk scene in the prologue should come to mind...
As an aside, I went back and switched out that stringy awful looking bush for some new ones. I think the old bush had some rendering issues that increased draw calls a lot as well. New bushes are more efficient and look much nicer. I switched the trees from the desktop versions to the mobile versions. Overall, they look a bit more straight but you don't really get close enough to them to notice any change in quality. I made the LOD scaling on pieces of the terrain much more aggressive, but it isn't terribly noticeable. I changed the shadows a bit and they seem to be better now.
Back to the original point - some scenes are heavier than others. With such a taxing scene so early in the game with these optimizations still not necessarily cutting it, the last obvious option is to force lower resolution. So, an option for dynamic resolution was added that takes the average framerate of the last tenth of a second, compares it to your headset's refresh rate, and if the framerate isn't high enough will decrease resolution by 1%. I used a technique that doesn't blur the image, just makes it more pixelly... pixlier... (red squiggly line says these aren't words). ANYWAY, when your framerate gets better, it will do the opposite - increase resolution by 1%. Note that these values stack with your SteamVR supersampling value so I actually recommend turning that up to at least 120%. However, setting a dynamic resolution lower-limit-value of 80% will result in your lowest target resolution to still be 96%, so play with those numbers until you're satisfied with perfomance to visual quality.
Back to the aside, I actually had GPU frame timings of 8-11 ms in the forest walking scene with dynamic resolution set to 80% lower limit with 100% SteamVR supersample setting. Pretty good!
However, things were not all sunshine and rainbows. The previous ambient occlusion method did not play well with the dynamic resolution, and it rendered on top of fog now. After tinkering with it, the distance fade property fixed the fog issue, and it eventually rendered close to where it was supposed to be. Key word being close... it was jumping around a lot. It was also producing very noticeable full screen artifacts and would look pretty bad at lower resolution scales. Sad day.
With the new post processing stack upgrade, I added a new ambient occlusion method that still looks pretty good. Maybe not as good as the previous one did in some instances, but better in others - especially with dynamic resolution in play. The old ambient occlusion method would cost about 2-2.5 ms to render, the new one costs 1-1.5. It isn't effected by the dynamic resolution either. The choice was clear.
Remember when I said Dement was using two cameras to render things? Now, there was no need. The old ambient occlusion technique looked awful on hands and weapons, which meant it needed the second camera to render them to avoid having the effect applied on them. No longer the case, so the cameras were consolidated into one. I don't have the specifics for the performance increase on this, but it was noticeable.
Finally, after some testing, I found that lowering the texture resolutions was not doing much to increase performance - just potatoed the game. I removed the option to change those in game and have reset everyone's default to max.
Another fun fact - some headsets have higher gamma values than others, so that pesky ol' gamma correction option exists. Previously, I didn't have any control over the gamma. The gamma correction profile was just a mix of effects that darkened the game enough to make it look less washed out. Well, the new post processing stack has an actual gamma adjuster. Previously, I thought Dement looked noticeably worse in the Oculus Rift CV1 compared to the Vive. With the new gamma correction option though... I would probably rather play Dement in a Rift over the Vive these days. It looks fantastic.
Anyhow, thanks for the read, and thanks for supporting Dement. I hope everyone had a good holiday and is looking forward to new upcoming content in Dement!
Changed files in this update