Learn how to use the Lightweight Render Pipeline to optimize for maximum performance on mobile platforms. After watching this, you will be ready to build an experience for standalone mobile VR headsets, like Oculus Go, and how to use 3-DOF controllers for interactions.
Speakers:
Dan Miller (Unity Technologies)
2. The current ecosystem
- New requirements, more portability
Getting started in Unity
- Lightweight Render pipeline on Mobile
- PPv2
Controller Integration and Input
Controller interaction and examples
Future considerations & Extra Tips
Overview
5. Getting started with LWRP for VR
2018.1 template via the Hub
Transform Hierarchy for generic VR
- Top level transform for moving
- Both hands setup
Things to note
- Post processing v2 is current disabled in LW RP (patch in flight)
- Hand transforms (Tracked Pose Driver) have no visual representation
- MSAA must be disabled in order to render properly
6. LWRP VR - Performance Benchmarks
Benchmarks against Built In renderer (legacy)
Nightmare scene
Built in LWRP LWRP + OVR
46 FPS 60FPS 72 FPS
Benefits
- Performance!
- Has a new batcher that reduces setup cost for each draw call
- Shades light in single pass decreasing the overdraw and amount of drawcalls
- Only performs a depth prepass when using Cascade shadows
7. LWRP Things to consider
Benefits
- Shader graph compatibility
- Rendering is open source, add or modify it to your will!
- Future proof
Limitations
- Post processing v2 is current disabled in LW RP (patch in flight)
- Limited number of lights, 4 point lights, 1 direction
- Only one shadow casting light (directional)
- No MSAA (currently)
- Old assets built in legacy render are ‘broken’
8. Post Processing Stack v2
Most up to date version on github https://github.com/Unity-Technologies/PostProcessing
Also available, on the asset store and via Package Manager ( 2018.1+ )
Current Support
Legacy Renderer:
- Multi-pass OK
- Single-pass OK
- Single-pass Instanced currently unsupported
LWRP:
- Currently unsupported (patch in flight)
HDRP:
- Does not support VR
9. Post Processing Stack v2
Works in VR
- Color Correction
- Bloom
- Vignette
- Auto Exposure
- Ambient occlusion
- Chromatic Aberration
Works in VR but Maybe not a great idea
- Depth of Field
- Grain
Doesn’t work
- Motion blur
- Screen space reflections
15. Oculus Utilities
● Gear VR and Oculus Go Controller Model
● OVR Lint Tool
● Controller Prefab and Camera Rig
● Example Scenes
● Editor Camera Emulation
16. Unity Integration - Google VR
https://github.com/googlevr/gvr-unity-sdk/releases
17. Google VR SDK
● Daydream Controller Model
● Example scenes
○ Keyboard
○ UI scrolling
○ Video
● Mobile optimized VR Shaders
● Laser Pointer
● Spatialized Audio System
19. OVR Input
● Wraps Unity’s built in input system
● Query Buttons with
○ Get()
○ GetDown()
○ GetUp()
● Built in swiping gesture utilities for touchpad
○ Up, Down, Left, Right
● Be weary of custom input axis and the positive escape button
21. Google VR Input - Daydream
Static reference to GvrControllerInput class
● Query Button states from static bools
○ GvrControllerInput.AppButton
○ GvrControllerInput.AppButtonDown
○ GvrControllerInput.AppButtonUp
● Can query Gyroscope and Accelerometer
○ GvrControllerInput.Accel
○ GvrControllerInput.Gyro