Summary
I hope you're as excited as I am with what we accomplished here! We built a truly practical Cardboard VR app to view a gallery of regular photos and 360-degree photospheres. The project uses the RenderBox
library, as discussed in Chapter 5, RenderBox Engine.
To begin with, we illustrated how photospheres work and viewed one on Cardboard using the RenderBox
library without any custom changes. Then, to view a regular photo, we created a Plane
component to be used as a virtual projection screen. We wrote new materials and shaders to render images with a frame border.
Next, we defined a new Image
class and loaded images from the phone's camera folder into a list, and wrote a method to show the image on the screen Plane
, correcting its orientation and aspect ratio. Then, we built a user interface that shows a grid of thumbnail images and lets you select one by gazing at it and clicking on the Cardboard trigger to display the image. The grid is scrollable, which required us to add threading...