WaveVR_FoveatedRendering

Contents

Manual

Introduction

Foveated Rendering can help reduce the power usage and slightly increase performance by sacrificing the quality of peripheral region. It keeps the resolution of foveated region, which means the central of the field of view. And it reduces the resolution of peripheral region, which is surround the foveated region. See the sample image below.

_images/foveatedrendering_resolution_demo.jpg

This demo image use a extreme FOV setting to show you an obvious resoult. Settings are FOV25° & PeripheralQuality Low.

The foveated region size can be set by LeftClearVisionFOV and RightClearVisionFOV. The FOV value means the angle of field of view. We will guarantee the clear vision FOV region will be full resoluion.

The quality of peripheral region can be set by by LeftPeripheralQuality and RightPeripheralQuality. Outside the clear vision FOV, the resoluion will be downgrade if possible. However where to downgrade, and how the resolution downgrade, depend on platform design. We can only guarantee the central is clear.

_images/foveatedrendering_inspector_and_prefabs.jpg

WaveVR_FoveatedRendering inspector

Fixed Foveated Rendering

The fixed foveated rendering keeps the focal point in front of head (the centerCamera in WaveVR_Render). Since the eye tracking data is not available, the focal point can’t move. Therefore set it to a fix position. The field Static Focal Point can set the focal point positon. It will generate a tracked object, which follows centerCamera‘s GameObject, to simulate the eye tracking data. When you move or rotate your head, your focal point always be in front of you.

Random Foveated Rendering

You can set your own tracked object and the focal point will follow your object. Or directly set the screen space position in NDC by API to move the focal point.

MSAA

Using MSAA can make the image quality better. However the effect to the foveated rendering is unpredictable. Because the sampling method, some foveated rendering effet may look worse or better under MSAA 2x and 4x.

singlepass and RenderMask

The singlepass, RenderMask and foveated rendering can be enabled at the same time. The effect will be different due to different scene, enable the singlepass, RenderMask and foveated rendering at the same time may make the effect worse. Please consider that whether to enable the singlepass, RenderMask and foveated rendering at the same time.

Prefab

In WaveVR prefab the FoveatedRendering is default included. But not default enabled.

If you use the FoveatedRendering prefab, it is default enabled.

Class WaveVR_FoveatedRendering

Public Member Functions

void Apply()

Apply the settings in this script now. Override the settings of SetFoveatedRenderingParameter.

   void Validate()

Check the data is correct.  Will throw exception if invalid.
void Set(WVR_Eye eye, float clearVisionFOV, WVR_PeripheralQuality quality)

Set individual values for each eye. Will throw exception if invalid.

void Set(float clearVisionFOV, WVR_PeripheralQuality quality)

Set both eye with the same values. Will throw exception if invalid.

Static Public Member Functions

static Vector2 WorldToNDC_GL(Camera camera, Vector3 worldPoint)

Transform the world position to NDC position according the Camera’s FOV.

static void SetFoveatedRenderingParameter (WVR_Eye eye, float ndcFocalPointX, float ndcFocalPointY, float clearVisionFOV, WVR_PeripheralQuality quality)

The eye must be the left or right eye, and The clearVisionFOV must in range [0, 179]. Will throw exception if invalid. The ndcFocalPointX and ndcFocalPointY is the focal point in NDC space. See the demo image below.

The peripheral is the region around the eye’s clear vision FOV. Its quality has three kind of level. We only privide the levels. The implementation how to lower the resolution still depended on platform.

Use this function all the setttings in WaveVR_FoveatedRendering will be ignored. Until you invoke Apply(), the WaveVR_FoveatedRendering feature restore.

_images/foveatedrendering_setparameter_ndc_position.jpg
   static void SetFoveatedRenderingParameter (WVR_Eye eye, Vector2 ndcSpace, float clearVisionFOV, WVR_PeripheralQuality quality)

The **eye** must be the left or right eye, and The clearVisionFOV must in range [0, 179].  Will throw exception if invalid.  The ndcFocalPointX and ndcFocalPointY is the focal point in NDC space.  See `SetFoveatedRenderingParameter`_.

The peripheral is the region around the eye's clear vision FOV.  Its quality has three kind of level.  We only privide the levels.  The implementation how to lower the resolution still depended on platform.

Use this function all the setttings in WaveVR_FoveatedRendering will be ignored.  Until you invoke ``Apply()``, the WaveVR_FoveatedRendering feature restore.

Static Public Attributes

static string StaticTrackedObjectName = "StaticFoveatedTrackedObject"

Name of the static tracked object which put under the centerCamera.

Properties

static WaveVR_FoveatedRendering Instance [get]

Get the singleton of WaveVR_FoveatedRendering component. Only one WaveVR_FoveatedRendering can really work. Don’t put more than one component in a scene.

float LeftClearVisionFOV [get, set]

RightClearVisionFOV is the size of the central region, which is around left eye’s focal point. We guarantee the resolution here will be 100%. The FOV value is diameter.

float RightClearVisionFOV [get, set]

RightClearVisionFOV is the size of the central region, which is around right eye’s focal point. We guarantee the resolution here will be 100%. The FOV value is diameter.

WVR_PeripheralQuality LeftPeripheralQuality [get, set]

The peripheral is the region around the eye’s clear vision FOV. Its resolution will depend on this quality setting.

WVR_PeripheralQuality RightPeripheralQuality [get, set]

The peripheral is the region around the eye’s clear vision FOV. Its resolution will depend on this quality setting.

Vector3 StaticFocalPoint [get, set]

A Focal Point for static foveated rendering. Without eye tracking data, the focal point will not move. Let both eye focus on this point. By this setting, the both lines linked from focal point to two eyes will not be parallel. We will calculate the focal point value in screen space (NDC) for you. See LeftNDCSpace and RightNDCSpace.

The static focal point will generate a default tracked object in front of the eye center. if you assign a custom tracked object will ignore this setting.

GameObject TrackedObject [get, set]

The focal point will always focus on the tracked object. No matter what kind of pose of your head.

Vector2 LeftNDCSpace [get]

Get the left eye’s NDC point of screen space.

Vector2 RightNDCSpace [get]

Get the right eye’s NDC point of screen space.