Guides

Frames Per Second Viewer

Overview

Provides a frames per second text element to the HMD view. To use the prefab it must be placed into the scene then the headset camera needs attaching to the canvas:

Prefab Usage:

  • Place the VRTK/Prefabs/FramesPerSecondCanvas/FramesPerSecondCanvas prefab in the scene hierarchy.

This script is largely based on the script at: http://talesfromtherift.com/vr-fps-counter/ So all credit to Peter Koch for his work. Twitter: @peterept

Inspector Parameters

  • Display FPS: Toggles whether the FPS text is visible.
  • Target FPS: The frames per second deemed acceptable that is used as the benchmark to change the FPS text colour.
  • Font Size: The size of the font the FPS is displayed in.
  • Position: The position of the FPS text within the headset view.
  • Good Color: The colour of the FPS text when the frames per second are within reasonable limits of the Target FPS.
  • Warn Color: The colour of the FPS text when the frames per second are falling short of reasonable limits of the Target FPS.
  • Bad Color: The colour of the FPS text when the frames per second are at an unreasonable level of the Target FPS.

Example

VRTK/Examples/018_CameraRig_FramesPerSecondCounter displays the frames per second in the centre of the headset view. Pressing the trigger generates a new sphere and pressing the touchpad generates ten new spheres. Eventually when lots of spheres are present the FPS will drop and demonstrate the prefab.