In general, we all like to destroy down to one of the quality levels to make sure we’re targeting the experience we want to achieve. We’ve set MSAA to about 4x because we feel there’s a noticeable difference between 2x and 4x, but not much use beyond that. While MSAA is almost “free”, there are still performance costs, as if we rarely go to 8x. Remember that this might change if headsets reach a higher resolution. 8X and more can become the norm over time.
Set the stereo rendering method to Single Pass.
Images in a VR headset are displayed from two different perspectives, one for each eye. In recent years of VR development, this has meant integrating two virtual cameras into a Unity project and rendering the scene twice. In addition, the power costs of image effects would be multiplied by a factor of 2 because they have to be applied to the image of each eye.
Unity has implemented a brilliant solution to this problem called single-pass stereo rendering. It combines the two images into a single rendering pass instead of rendering each one separately and then splits the image accordingly for each lens in the VR headset. Rendering in one pass can be enabled in the player settings.
The only drawback is that not all image effects and shaders support single-pass stereo rendering. Unity supports this immediately, but if you buy assets from the Unity Asset Store, it’s worth contacting the developer in the forums or via email to see if a single pass is supported or not.
Art Direct for performance.
Develop games with performance in mind, rather than end up trying to optimize them.
So create a forward rendered game with MSAA 4x and Single Pass Stereo. These are, in our opinion, solid prerequisites for modern VR development.
We would like to play a VR game in which we drive in a jeep through a lush rain forest in pouring rain and are followed by a T-Rex. We want to see every leaf on every tree, every raindrop and every size on the dinosaur, all simulated in real time. The problem is that this idea would be impossible with today’s technology. Even the “offline rendering” used for Hollywood movies is struggling to achieve this.
Instead, it’s much better to think about all their ideas and try to find those that are feasible and can be rendered and simulated in real time at 90fps. Some ideas must therefore be abandoned if they are unrealistic or do not support the performance goals. Another way to formulate the problem, however, is to view it as a creative art form.
- Which ideas fit in view of the restrictions that may not be imposed on them in other media or in non-VR games?
- Would a stylized look render faster and still fit the idea?
- Is it possible to develop an idea that has only a few detailed elements on the screen at once, rather than a huge scene with many detailed elements?
There are no simple answers here, but only hard decisions and a lot of thinking. But thinking is cheap and performance optimization is not really difficult. It is better to develop an idea at the beginning that works well than to try to force a complicated idea into a performance box during the crisis.
Share your performance tips.