Skip to content
This repository has been archived by the owner on Nov 8, 2019. It is now read-only.

Commit

Permalink
Version 0.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
smdol committed Oct 12, 2015
1 parent 91bdb1c commit e94bb10
Show file tree
Hide file tree
Showing 47 changed files with 5,379 additions and 1,457 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,32 @@ v0.5.1 (7/22/2015):
- Removed the INTERNET permission from AndroidManifest.xml.
- Split the demos into a separate unitypackage.
- Ignore gyro drift setting on iOS (it doesn't need it).

v0.5.2 (10/12/2015):
- General performance improvements and CPU load reduction to reduce thermal throttling.
- New gyro drift correction method for better stability across more phones.
- Onboarding and Setup dialogs now support localized language strings. For Android this
is automatic. For iOS, enable Localizations in the Xcode project.
- Default distortion correction method is now done entirely in Unity to avoid
GL.IssuePluginEvent() overhead. The old native C++ version still available if issues arise.
- The GL.IssuePluginEvent() call uses a unique ID in order to be compatible with other native
plugins. (This only matters if you use the old Native distortion method.)
- A new CardboardCamera prefab manages both full screen clear and distortion
correction. It is included in CardboardMain, or created automatically if needed.
- Distortion correction is now done during the Camera rendering phase, which means
that uGUI Screen Space Overlays (and OnGUI) will appear onscreen now.
- The new distortion correction method is compatible with Metal (iOS) and multi-
threaded rendering (Android).
- The offscreen rendertexture used for distortion correction takes properties from
project settings (e.g. antialiasing, pixel format). Depth now defaults to 24 bits.
- The offscreen rendertexture resolution is padded to account for the barrel distortion,
in order to reduce relative fuzziness in pixels near the center.
- The Cardboard object has a simple slider to adjust the scale of the rendertexture
resolution globally. Dial down to increase performance.
- There is now an onscreen Back Button that functions like the normal Android back
button (which is hidden in immersive mode). You can turn it on or off, and choose
how to respond.
- Recent versions of Unity (5.1.x and 5.2.x) have changed the way they report DPI, which
is affecting the SDKs calculation of screen size. This has been worked around.
- A bug in the StereoController.AddStereoRig() function which cached the eyes array before
filling it in has been fixed.
Loading

5 comments on commit e94bb10

@rpavlik
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate on the Unity "GL.IssuePluginEvent() overhead" you observed?

@smdol
Copy link
Contributor Author

@smdol smdol commented on e94bb10 Oct 13, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our native code clobbers a lot of GL state (and for whatever reason, GL.InvalidateState() did not work for us), so for quite some time we've had code in the native plugin to save and restore bits of GL state during the distortion correction pass. It cropped up as a performance hit, more than we liked, mostly stalling the CPU. So we moved that functionality up into Unity (see CardboardPostRender.cs) in order to not have to do all that state preservation. Maybe the way to say it is that by using GL.IssuePluginEvent we were in a situation where we didn't know the exact state of the pipeline, so it introduced an "ignorance overhead".

@MiCkSoftware
Copy link

@MiCkSoftware MiCkSoftware commented on e94bb10 Oct 13, 2015 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smdol
Copy link
Contributor Author

@smdol smdol commented on e94bb10 Oct 13, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, good. This is one of those changes where you may not see much of a difference, if this path is not your bottleneck. It was for at least one of our apps.

Can you see if your CPU utilization has changed?

@MiCkSoftware
Copy link

@MiCkSoftware MiCkSoftware commented on e94bb10 Oct 14, 2015 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.