Most of the times, high graphic quality is inversely proportional to performance in games. I have summarised 10 magics of boosting your VR games visual quality and performance.
Increase XRSettings.eyeTextureResolutionScale for better graphics. RenderScale controls the texel: pixel ratio before lens correction, meaning that we trade performance for sharpness.
You can create a following script named VRRenderScale.cs and attach it to your VR camera. The higher render scale value, the better visual effect you get. However, Remember: This will tradeoff the performance. Usually, I set it to 1.5 because it could dramatically increase the graphic quality.
Set your VR camera to Forward Rendering and Allow MSAA. Also, in Quality Setting, set 2x(or 4x) anti-aliasing for better visual quality.
Post Processing Stack. This is a must have for improving the visual of your game. Colour Correlation Curve and blah, blah is amazing. NOTE: VR does not support Motion Blur.
If you have any Text and you found it isn’t clear in VR, you can try either a). set a higher value(such as between 1.75f ~ 3f) of Dynamic Pixels Per Unit in Canvas Scaler or b). Use TextMesh Pro.
If your game involves switching to different scene, use SceneManager.LoadSceneAsync to avoid freezing tracking of the head when load the next scene. SceneManager.LoadSceneAsync loads the scene asynchronously in the background.
Extra Tip (Haven’t tried).
VR Graphic Booster asset NVIDIA® VRWorks. According to its description, it enables a new level of presence by bringing physically realistic visuals and simulated environments to virtual reality. I haven’t tried it yet but I will definitely check it out for my new VR project.
Using Unity Profiler to optimise your game, I always make sure profiler do not over 10ms.
In your Quality Setting, turn VSync(Vertical Synchronization) off. Wait, what is VSync? Why tick off? OK, here is some background information about VSync. First, you will need to know the differece between Frame rate and Refresh rate.The frame rate is determined by how powerful your CPU or GPU is. Refresh rate is determined by your moniter, ie, the number of times per second your monitor can redraw the screen.
Say, for your Oculus VR game, you run 90FPS, while if your refresh rate is lower than your frame rate, you will experience screen tearing. Vertical Synchronisation is helpful to prevent Screen Tearing because it forces your frame rate the same as the refresh rate.
The best practice is to turn VSync off and enable it only if you experience screen tearing. Because by ticking it off, your performance would dramatically change.
Occlusion Culling: Disable rendering of objects when they are not currently seen by the camera because they are occluded by other objects.
If your environment gameobjects are not going to change its position, set it to Static.
Static GameObject: Many optimisations need to know if an object can move during gameplay. Information about a Static (ie, non-moving) object can often be precomputed in the editor in the knowledge that it will not be invalidated by a change in the object’s position.
For GearVR games, Shaders: Choose Mobile > Unlit (It’s the fastest shader). Recommended readings
Bake your light-map! Try not to heavily use real time lighting if you pursue high performance.
Use Low Poly Asset if you can! Google Poly is a great place to find low poly 3D objects for your projects.