Git Product home page Git Product logo

render-timing-for-unity's Introduction

RenderTiming plugin for Unity

This plugin employs the OpenGL timer query extension (GL_EXT_disjoint_timer_query) to provide accurate GPU time measurements in real-time to apps made with the Unity game engine. Notably this works on mobile devices and has virtually no overhead.

Typical use cases include:

  • adding GPU frame time to an app's real-time debug overlay
  • getting instant, in-app feedback on coding changes which affect rendering, as well as visibility into performance regressions and problematic views
  • automated performance testing

Caveats

  • only Android is supported (adding other GL platforms is straightforward)
  • quality varies among mobile implementations of GL_EXT_disjoint_timer_query. Notably, some GPU's (e.g. Mali) don't provide a useful measurement at all.
  • only GLES3 graphics API is supported, not GLES2 or Vulkan (adding GLES2 support is straightforward)
  • plugin does not verify GL_EXT_disjoint_timer_query existence yet

Unity versions tested: 5.4 and 5.6

GPU's tested: Snapdragon 821 (Adreno 530), Snapdragon 835 (Adreno 540)

Quick start

  1. download the latest RenderTiming Unity package and import it into your Unity project
  2. add the RenderTiming component to a suitable singleton object in your scene
  3. reference RenderTiming.instance.deltaTime from your in-app debug overlay, etc.

By default it will log GPU time to console once per second. Disable via component's "Log Timing" field in the inspector.

It will measure GPU time from the end of Update until the end of frame rendering. (I.e. encompassing both eyes for VR stereo case.) See RenderTiming.cs source for additional caveats.

Directory

Disclaimer

This project is not an official Google project. It is not supported by Google and Google specifically disclaims all warranties as to its quality, merchantability, or fitness for a particular purpose.

render-timing-for-unity's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.