WaveVR_FoveatedRendering

Contents

Manual

Introduction

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

_images/foveatedrendering_resolution_demo.jpg

This demo image uses an extreme FOV setting to show you an obvious result. The settings are FOV25° & PeripheralQuality Low.

The foveated region size can be set by LeftClearVisionFOV and RightClearVisionFOV. The FOV value means the field of view angle. We ensure in the “clear vision FOV” region will be in full resolution.

The quality of the peripheral region can be set by by LeftPeripheralQuality and RightPeripheralQuality. Outside the clear vision FOV, the resolution will be downgraded if possible. However where to downgrade, and how the resolution is downgraded, depends on the platform design. We can only ensure the center 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 he head (the centerCamera in WaveVR_Render). Since the eye tracking data is not available, the focal point can not move. Therefore set it to a fixed position. The field Static Focal Point can set the focal point position. It will generate a tracked object, which follows the 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 should help make the image quality better.

singlepass and RenderMask

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

Prefab

In WaveVR prefab the FoveatedRendering component is included and default enabled (The value of Foveation Mode is Default).

If you use the FoveatedRendering prefab, it is default enabled (The value of Foveation Mode is Default).

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. An exception will be thrown if valuse are invalid.

void Set(WVR_Eye eye, float clearVisionFOV, WVR_PeripheralQuality quality)

Set individual values for each eye. An exception will be thrown if valuse are invalid.

void Set(float clearVisionFOV, WVR_PeripheralQuality quality)

Set both eye with the same values. An exception will be thrown if valuse are 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]. An exception will be thrown if valuse are invalid. The ndcFocalPointX and ndcFocalPointY is the focal point in the NDC space. See the demo image below.

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

Before you invoke Apply(), all the settings in WaveVR_FoveatedRendering will be ignored.

_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"

The name of the static tracked object which put under the centerCamera.

Properties

static WaveVR_FoveatedRendering Instance [get]

Get the singleton of the WaveVR_FoveatedRendering component. Only one WaveVR_FoveatedRendering can really work. Do not put more than one component in a scene.

float LeftClearVisionFOV [get, set]

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

float RightClearVisionFOV [get, set]

RightClearVisionFOV is the size of the central region, which is around the right eye’s focal point. The resolution here will be 100%. The FOV value is the 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]

This is a focal point for static foveated rendering. Without eye tracking data, the focal point will not move. Let both eyes focus on this point. By this setting, both of the lines linked from focal point to the 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’s center. If you assign a custom tracked object, this setting will be ignored.

GameObject TrackedObject [get, set]

The focal point will always focus on the tracked object, no matter what kind of pose of your head is doing.

Vector2 LeftNDCSpace [get]

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

Vector2 RightNDCSpace [get]

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