SlideShare a Scribd company logo
1 of 27
GenerativeArt—MadewithUnity
XR Graphics in Unity
Maximizing your AR/VR experience’s potential
Dan Miller
Unity Technologies, XR Evangelist
@DanMillerDev
Agenda
3
Virtual Reality
- Stereo Rendering Considerations
- Custom Shader Modifications
- RenderScale and RenderViewportScale
- Scriptable Render pipelines for VR
Augmented Reality
- Occlusions
- Shadows
- Platforms Specific Rendering
- Demo
Rendering For Each Eye 👀
4
Stereo Rendering
Stereo Rendering
5
Single-pass instancingSingle-passMulti-pass
Two textures are packed into one
large texture (referred to as a
double-wide texture).
Only goes through the scene graph
once, so it’s much faster on the
CPU. However requires a lot of
extra GPU state changes to
accomplish this
Uses a single texture array
containing two textures storing
the rendering for each eye.
Involves the same amount of
GPU work, but fewer draw calls
and work for the CPU, so it’s
significantly more performant.
Requires going through the scene
graph multiple times, once for each
view you need
Custom Shader Changes 🔮
6
Vertex Shader Changes
struct appdata
{
float3 pos;
UNITY_VERTEX_INPUT_INSTANCE_ID; // uint instancedID : SV_InstanceID;
};
struct v2f
{
float4 vertex : SV_POSITION;
UNITY_VERTEX_OUTPUT_STEREO; // uint stereoEyeIndex : SV_RenderTargetIndex;
};
v2f vert (appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v); // unity_StereoEyeIndex = v.instanceID & 0x01;
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); // o.stereoEyeIndex = unity_stereoEyeIndex
o.vertex = UnityObjectToClipPos(v.vertex);
return o;
}
7
struct appdata
{
float3 pos;
UNITY_VERTEX_INPUT_INSTANCE_ID; // uint instancedID : SV_InstanceID;
};
struct v2f
{
float4 vertex : SV_POSITION;
UNITY_VERTEX_OUTPUT_STEREO; // uint stereoEyeIndex : SV_RenderTargetIndex;
};
v2f vert (appdata v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
return o;
}
struct appdata
{
float3 pos;
UNITY_VERTEX_INPUT_INSTANCE_ID; // uint instancedID : SV_InstanceID;
};
struct v2f
{
float4 vertex : SV_POSITION;
};
v2f vert (appdata v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
return o;
}
struct appdata
{
float3 pos;
};
struct v2f
{
float4 vertex : SV_POSITION;
};
v2f vert (appdata v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
return o;
}
Vertex Shader Changes
8
RenderScale vs RenderViewportScale
RenderScale vs RenderViewportScale
9
RenderViewportScaleRenderScale
Controls the actual size of eye textures as a
multiplier of the device's default resolution.
● value of 1.0 will use the default eye texture
resolution specified by the XR device.
● less than 1.0 will use lower resolution eye
textures
● greater than 1.0 will yield higher resolutions
Controls how much of the allocated eye
texture should be used for rendering.
Valid range is 0.0 to 1.0. This value can
be changed at runtime without
reallocating eye textures. Therefore it is
useful for dynamically adjusting eye
render resolution.
EyeTextureResolutionScale
Current Support and Features 😳 🛋🛋
10
HDRP for Virtual Reality
HDRP for VR
11
Supported in 2019.1+
Some HDRP features are not compatible
with VR. When you enable VR in your
Project, HDRP automatically disables the
features that it does not support
2019.1 — Single Pass Stereo
2019.2 — Single pass instanced
Not supported
● Multi-pass rendering
● Single-pass instancing
● Tile lighting
● Deferred rendering
● Volumetrics
● Render and viewport scale
● VFX Graph
HDRP for VR
12
In 2019.1 Supported
● Multi-pass rendering
● Single-pass instancing
● Tile lighting
● Deferred rendering
● Volumetrics
● Render and viewport scale
● VFX Graph
In 2019.2+
Supported In 2019.3+
Universal Render Pipeline for VR 😎
13
URP for Virtual Reality
Universal RP for VR
14
Supported in 2019.1+
● Better performance than legacy in most lighting setups
~25% increase on mobile hardware
● 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
Universal Render Pipeline
15
Current Limitations
● There are currently some issues with MSAA and PostProcessing in VR.
● We added single pass double wide as the fallback to SRP in 2019.1
Challenges and Solutions 🌅
16
Post-Processing Stack
Post processing in XR
17
Always consider what if any post-processing effect you need.
● Most temporal effects add blurriness and latency
● Simulating depth of field, a property of physical cameras, in a headset, which is simulating the
human eye, will most likely cause nausea.
● If you’re running into issues, try the different stereo rendering modes.
● For mobile Augmented Reality, effects will be processed on the entire camera feed, not just
digital objects.
Rendering techniques ✨ 👀
18
Augmented Reality
Things to keep in mind
● Digital and augmented objects are rendering on top of
the camera feed
● Occlusion and Shadows are not enabled by default and
require special shaders and consideration
● Your users will be using this in a variety of different
conditions and environments
● Universal Render Pipeline support is continuing to be
updated and improved
○ Only available in AR Foundation
Augmented Reality Rendering — Mobile
19
Things to keep in mind
● Additive displays — Blacks = Transparent
● Physically based rendering and self shadowing can create dark areas
● Consider leveraging unique platform features like eye tracking
● Universal Render Pipeline only supported in single pass and single pass instanced stereo rendering.
Augmented Reality Rendering — Head Mounted
20
Occlusion
21
http://bit.ly/MobileOcclusionShader
● Special shader
● Can be applied to planes or world mesh
● Used with feature points for quicker occlusion
● Built in support on specific platforms
Human Segmentation enabled in ARKit 3.0 with AR Foundation
Shadows
22
http://bit.ly/MobileARShadow
● Casting shadows on transparent geometry
● Consider size and scale - rescale size of rendered
content
● For static objects use blob shadows
Platform Specific Features — Mobile
23
Environmental Probes — ARKit
● Generate environment textures during an AR session
using camera imagery
● Plug that cubemap texturing into a reflection probe in
Unity to provide realistic image-based lighting for virtual
objects in AR
Environmental HDR — ARCore
● Directional light rotations to help with placing shadows in
the right direction
● Ambient Spherical Harmonics: helps model ambient
illumination from all directions
● HDR Cubemap: provides specular highlights and reflections
Tips and Tricks ✨
24
Demo
Demo Breakdown
25
Colored Materials Specular, Normal
Occlusion maps
Environmental
Probes
Light estimation Post Processing -
Color Grading
Want to learn more?
Project:
VR in Unity: A Beginner's Guide
Tutorial:
Configuring Unity for AR Development
Subscribe now for a 3-month free trial at unity.com/learn-
premium with code: UNITECPH19
*Learn Premium is included in Unity Plus and Pro licenses. Just sign in with your Unity ID.
Thank you.
Dan Miller — XR Evangelist
DanielMi@unity3d.com
@DanMillerDev

More Related Content

What's hot

Physically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbitePhysically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbiteElectronic Arts / DICE
 
Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)Tiago Sousa
 
Moving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based RenderingMoving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based RenderingElectronic Arts / DICE
 
Lighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow FallLighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow FallGuerrilla
 
Rendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb RaiderRendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb RaiderEidos-Montréal
 
Taking Killzone Shadow Fall Image Quality Into The Next Generation
Taking Killzone Shadow Fall Image Quality Into The Next GenerationTaking Killzone Shadow Fall Image Quality Into The Next Generation
Taking Killzone Shadow Fall Image Quality Into The Next GenerationGuerrilla
 
Past, Present and Future Challenges of Global Illumination in Games
Past, Present and Future Challenges of Global Illumination in GamesPast, Present and Future Challenges of Global Illumination in Games
Past, Present and Future Challenges of Global Illumination in GamesColin Barré-Brisebois
 
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonAMD Developer Central
 
The Rendering Technology of Killzone 2
The Rendering Technology of Killzone 2The Rendering Technology of Killzone 2
The Rendering Technology of Killzone 2Guerrilla
 
Custom fabric shader for unreal engine 4
Custom fabric shader for unreal engine 4Custom fabric shader for unreal engine 4
Custom fabric shader for unreal engine 4동석 김
 
Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)Tiago Sousa
 
Physically Based Lighting in Unreal Engine 4
Physically Based Lighting in Unreal Engine 4Physically Based Lighting in Unreal Engine 4
Physically Based Lighting in Unreal Engine 4Lukas Lang
 
Hable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr LightingHable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr Lightingozlael ozlael
 
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14AMD Developer Central
 
Shadow mapping 정리
Shadow mapping 정리Shadow mapping 정리
Shadow mapping 정리changehee lee
 
Best Practices for Shader Graph
Best Practices for Shader GraphBest Practices for Shader Graph
Best Practices for Shader GraphUnity Technologies
 
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Johan Andersson
 
Screen Space Reflections in The Surge
Screen Space Reflections in The SurgeScreen Space Reflections in The Surge
Screen Space Reflections in The SurgeMichele Giacalone
 

What's hot (20)

Physically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbitePhysically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in Frostbite
 
Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)
 
Moving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based RenderingMoving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based Rendering
 
UE4 Lightmass for Large Console Games (UE4 Lightmass Deep Dive)
UE4 Lightmass for Large Console Games  (UE4 Lightmass Deep Dive)UE4 Lightmass for Large Console Games  (UE4 Lightmass Deep Dive)
UE4 Lightmass for Large Console Games (UE4 Lightmass Deep Dive)
 
Lighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow FallLighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow Fall
 
Rendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb RaiderRendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb Raider
 
Taking Killzone Shadow Fall Image Quality Into The Next Generation
Taking Killzone Shadow Fall Image Quality Into The Next GenerationTaking Killzone Shadow Fall Image Quality Into The Next Generation
Taking Killzone Shadow Fall Image Quality Into The Next Generation
 
Past, Present and Future Challenges of Global Illumination in Games
Past, Present and Future Challenges of Global Illumination in GamesPast, Present and Future Challenges of Global Illumination in Games
Past, Present and Future Challenges of Global Illumination in Games
 
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
 
The Rendering Technology of Killzone 2
The Rendering Technology of Killzone 2The Rendering Technology of Killzone 2
The Rendering Technology of Killzone 2
 
Custom fabric shader for unreal engine 4
Custom fabric shader for unreal engine 4Custom fabric shader for unreal engine 4
Custom fabric shader for unreal engine 4
 
Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)
 
Physically Based Lighting in Unreal Engine 4
Physically Based Lighting in Unreal Engine 4Physically Based Lighting in Unreal Engine 4
Physically Based Lighting in Unreal Engine 4
 
Hable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr LightingHable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr Lighting
 
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
 
Building Paragon in UE4
Building Paragon in UE4Building Paragon in UE4
Building Paragon in UE4
 
Shadow mapping 정리
Shadow mapping 정리Shadow mapping 정리
Shadow mapping 정리
 
Best Practices for Shader Graph
Best Practices for Shader GraphBest Practices for Shader Graph
Best Practices for Shader Graph
 
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
 
Screen Space Reflections in The Surge
Screen Space Reflections in The SurgeScreen Space Reflections in The Surge
Screen Space Reflections in The Surge
 

Similar to XR graphics in Unity: delivering the best AR/VR experiences – Unite Copenhagen 2019

Making High Quality Interactive VR with Unreal Engine Luis Cataldi
Making High Quality Interactive VR with Unreal Engine Luis CataldiMaking High Quality Interactive VR with Unreal Engine Luis Cataldi
Making High Quality Interactive VR with Unreal Engine Luis CataldiUnreal Engine
 
Making High Quality Interactive VR with Unreal Engine Luis Cataldi
Making High Quality Interactive VR with Unreal Engine Luis CataldiMaking High Quality Interactive VR with Unreal Engine Luis Cataldi
Making High Quality Interactive VR with Unreal Engine Luis CataldiLuis Cataldi
 
Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...
Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...
Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...Unity Technologies
 
Alex_Vlachos_Advanced_VR_Rendering_Performance_GDC2016
Alex_Vlachos_Advanced_VR_Rendering_Performance_GDC2016Alex_Vlachos_Advanced_VR_Rendering_Performance_GDC2016
Alex_Vlachos_Advanced_VR_Rendering_Performance_GDC2016Alex Vlachos
 
Making VR with Unreal Engine Luis Cataldi
Making VR with Unreal Engine  Luis CataldiMaking VR with Unreal Engine  Luis Cataldi
Making VR with Unreal Engine Luis CataldiUnreal Engine
 
Luis cataldi-ue4-vr-best-practices2
Luis cataldi-ue4-vr-best-practices2Luis cataldi-ue4-vr-best-practices2
Luis cataldi-ue4-vr-best-practices2Luis Cataldi
 
Mobile VR, Programming, Rendering
Mobile VR, Programming, RenderingMobile VR, Programming, Rendering
Mobile VR, Programming, RenderingUnity Technologies
 
Crysis 2-key-rendering-features
Crysis 2-key-rendering-featuresCrysis 2-key-rendering-features
Crysis 2-key-rendering-featuresRaimundo Renato
 
Turning Augmented/Virtual Reality hype Into Actual Reality
Turning Augmented/Virtual Reality hype Into Actual RealityTurning Augmented/Virtual Reality hype Into Actual Reality
Turning Augmented/Virtual Reality hype Into Actual RealityAmitabh Kumar
 
Technologies Used In Graphics Rendering
Technologies Used In Graphics RenderingTechnologies Used In Graphics Rendering
Technologies Used In Graphics RenderingBhupinder Singh
 
Clean architecture for shaders unite2019
Clean architecture for shaders unite2019Clean architecture for shaders unite2019
Clean architecture for shaders unite2019Abhilash Majumder
 
How the Universal Render Pipeline unlocks games for you - Unite Copenhagen 2019
How the Universal Render Pipeline unlocks games for you - Unite Copenhagen 2019How the Universal Render Pipeline unlocks games for you - Unite Copenhagen 2019
How the Universal Render Pipeline unlocks games for you - Unite Copenhagen 2019Unity Technologies
 
WebXR and Browsers
WebXR and BrowsersWebXR and Browsers
WebXR and BrowsersIgalia
 
Marker less augmentedd reality using computer vision
Marker less augmentedd reality using computer visionMarker less augmentedd reality using computer vision
Marker less augmentedd reality using computer visiongametester6
 
Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]ozlael ozlael
 
Use Variable Rate Shading (VRS) to Improve the User Experience in Real-Time G...
Use Variable Rate Shading (VRS) to Improve the User Experience in Real-Time G...Use Variable Rate Shading (VRS) to Improve the User Experience in Real-Time G...
Use Variable Rate Shading (VRS) to Improve the User Experience in Real-Time G...Intel® Software
 
Developing Virtual Reality Application using Google Cardboard
Developing Virtual Reality Application using Google CardboardDeveloping Virtual Reality Application using Google Cardboard
Developing Virtual Reality Application using Google Cardboardapurvmmmec
 
Virtual Reality Application Development on Android using Google Cardboard
Virtual Reality Application Development on Android using Google CardboardVirtual Reality Application Development on Android using Google Cardboard
Virtual Reality Application Development on Android using Google CardboardApurv Nigam
 

Similar to XR graphics in Unity: delivering the best AR/VR experiences – Unite Copenhagen 2019 (20)

Making High Quality Interactive VR with Unreal Engine Luis Cataldi
Making High Quality Interactive VR with Unreal Engine Luis CataldiMaking High Quality Interactive VR with Unreal Engine Luis Cataldi
Making High Quality Interactive VR with Unreal Engine Luis Cataldi
 
Making High Quality Interactive VR with Unreal Engine Luis Cataldi
Making High Quality Interactive VR with Unreal Engine Luis CataldiMaking High Quality Interactive VR with Unreal Engine Luis Cataldi
Making High Quality Interactive VR with Unreal Engine Luis Cataldi
 
Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...
Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...
Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...
 
Alex_Vlachos_Advanced_VR_Rendering_Performance_GDC2016
Alex_Vlachos_Advanced_VR_Rendering_Performance_GDC2016Alex_Vlachos_Advanced_VR_Rendering_Performance_GDC2016
Alex_Vlachos_Advanced_VR_Rendering_Performance_GDC2016
 
VR Optimization Techniques
VR Optimization Techniques VR Optimization Techniques
VR Optimization Techniques
 
Making VR with Unreal Engine Luis Cataldi
Making VR with Unreal Engine  Luis CataldiMaking VR with Unreal Engine  Luis Cataldi
Making VR with Unreal Engine Luis Cataldi
 
Luis cataldi-ue4-vr-best-practices2
Luis cataldi-ue4-vr-best-practices2Luis cataldi-ue4-vr-best-practices2
Luis cataldi-ue4-vr-best-practices2
 
Mobile VR, Programming, Rendering
Mobile VR, Programming, RenderingMobile VR, Programming, Rendering
Mobile VR, Programming, Rendering
 
Crysis 2-key-rendering-features
Crysis 2-key-rendering-featuresCrysis 2-key-rendering-features
Crysis 2-key-rendering-features
 
Turning Augmented/Virtual Reality hype Into Actual Reality
Turning Augmented/Virtual Reality hype Into Actual RealityTurning Augmented/Virtual Reality hype Into Actual Reality
Turning Augmented/Virtual Reality hype Into Actual Reality
 
Technologies Used In Graphics Rendering
Technologies Used In Graphics RenderingTechnologies Used In Graphics Rendering
Technologies Used In Graphics Rendering
 
Clean architecture for shaders unite2019
Clean architecture for shaders unite2019Clean architecture for shaders unite2019
Clean architecture for shaders unite2019
 
How the Universal Render Pipeline unlocks games for you - Unite Copenhagen 2019
How the Universal Render Pipeline unlocks games for you - Unite Copenhagen 2019How the Universal Render Pipeline unlocks games for you - Unite Copenhagen 2019
How the Universal Render Pipeline unlocks games for you - Unite Copenhagen 2019
 
WebXR and Browsers
WebXR and BrowsersWebXR and Browsers
WebXR and Browsers
 
Marker less augmentedd reality using computer vision
Marker less augmentedd reality using computer visionMarker less augmentedd reality using computer vision
Marker less augmentedd reality using computer vision
 
Alexey Savchenko, Unreal Engine
Alexey Savchenko, Unreal EngineAlexey Savchenko, Unreal Engine
Alexey Savchenko, Unreal Engine
 
Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]
 
Use Variable Rate Shading (VRS) to Improve the User Experience in Real-Time G...
Use Variable Rate Shading (VRS) to Improve the User Experience in Real-Time G...Use Variable Rate Shading (VRS) to Improve the User Experience in Real-Time G...
Use Variable Rate Shading (VRS) to Improve the User Experience in Real-Time G...
 
Developing Virtual Reality Application using Google Cardboard
Developing Virtual Reality Application using Google CardboardDeveloping Virtual Reality Application using Google Cardboard
Developing Virtual Reality Application using Google Cardboard
 
Virtual Reality Application Development on Android using Google Cardboard
Virtual Reality Application Development on Android using Google CardboardVirtual Reality Application Development on Android using Google Cardboard
Virtual Reality Application Development on Android using Google Cardboard
 

More from Unity Technologies

Build Immersive Worlds in Virtual Reality
Build Immersive Worlds  in Virtual RealityBuild Immersive Worlds  in Virtual Reality
Build Immersive Worlds in Virtual RealityUnity Technologies
 
Augmenting reality: Bring digital objects into the real world
Augmenting reality: Bring digital objects into the real worldAugmenting reality: Bring digital objects into the real world
Augmenting reality: Bring digital objects into the real worldUnity Technologies
 
Let’s get real: An introduction to AR, VR, MR, XR and more
Let’s get real: An introduction to AR, VR, MR, XR and moreLet’s get real: An introduction to AR, VR, MR, XR and more
Let’s get real: An introduction to AR, VR, MR, XR and moreUnity Technologies
 
Using synthetic data for computer vision model training
Using synthetic data for computer vision model trainingUsing synthetic data for computer vision model training
Using synthetic data for computer vision model trainingUnity Technologies
 
The Tipping Point: How Virtual Experiences Are Transforming Global Industries
The Tipping Point: How Virtual Experiences Are Transforming Global IndustriesThe Tipping Point: How Virtual Experiences Are Transforming Global Industries
The Tipping Point: How Virtual Experiences Are Transforming Global IndustriesUnity Technologies
 
Unity Roadmap 2020: Live games
Unity Roadmap 2020: Live games Unity Roadmap 2020: Live games
Unity Roadmap 2020: Live games Unity Technologies
 
Unity Roadmap 2020: Core Engine & Creator Tools
Unity Roadmap 2020: Core Engine & Creator ToolsUnity Roadmap 2020: Core Engine & Creator Tools
Unity Roadmap 2020: Core Engine & Creator ToolsUnity Technologies
 
How ABB shapes the future of industry with Microsoft HoloLens and Unity - Uni...
How ABB shapes the future of industry with Microsoft HoloLens and Unity - Uni...How ABB shapes the future of industry with Microsoft HoloLens and Unity - Uni...
How ABB shapes the future of industry with Microsoft HoloLens and Unity - Uni...Unity Technologies
 
Unity XR platform has a new architecture – Unite Copenhagen 2019
Unity XR platform has a new architecture – Unite Copenhagen 2019Unity XR platform has a new architecture – Unite Copenhagen 2019
Unity XR platform has a new architecture – Unite Copenhagen 2019Unity Technologies
 
Turn Revit Models into real-time 3D experiences
Turn Revit Models into real-time 3D experiencesTurn Revit Models into real-time 3D experiences
Turn Revit Models into real-time 3D experiencesUnity Technologies
 
How Daimler uses mobile mixed realities for training and sales - Unite Copenh...
How Daimler uses mobile mixed realities for training and sales - Unite Copenh...How Daimler uses mobile mixed realities for training and sales - Unite Copenh...
How Daimler uses mobile mixed realities for training and sales - Unite Copenh...Unity Technologies
 
How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...
How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...
How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...Unity Technologies
 
QA your code: The new Unity Test Framework – Unite Copenhagen 2019
QA your code: The new Unity Test Framework – Unite Copenhagen 2019QA your code: The new Unity Test Framework – Unite Copenhagen 2019
QA your code: The new Unity Test Framework – Unite Copenhagen 2019Unity Technologies
 
Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...
Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...
Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...Unity Technologies
 
Supplying scalable VR training applications with Innoactive - Unite Copenhage...
Supplying scalable VR training applications with Innoactive - Unite Copenhage...Supplying scalable VR training applications with Innoactive - Unite Copenhage...
Supplying scalable VR training applications with Innoactive - Unite Copenhage...Unity Technologies
 
XR and real-time 3D in automotive digital marketing strategies | Visionaries ...
XR and real-time 3D in automotive digital marketing strategies | Visionaries ...XR and real-time 3D in automotive digital marketing strategies | Visionaries ...
XR and real-time 3D in automotive digital marketing strategies | Visionaries ...Unity Technologies
 
Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...
Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...
Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...Unity Technologies
 
What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019
What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019
What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019Unity Technologies
 
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019Unity Technologies
 
Digital twins: the power of a virtual visual copy - Unite Copenhagen 2019
Digital twins: the power of a virtual visual copy - Unite Copenhagen 2019Digital twins: the power of a virtual visual copy - Unite Copenhagen 2019
Digital twins: the power of a virtual visual copy - Unite Copenhagen 2019Unity Technologies
 

More from Unity Technologies (20)

Build Immersive Worlds in Virtual Reality
Build Immersive Worlds  in Virtual RealityBuild Immersive Worlds  in Virtual Reality
Build Immersive Worlds in Virtual Reality
 
Augmenting reality: Bring digital objects into the real world
Augmenting reality: Bring digital objects into the real worldAugmenting reality: Bring digital objects into the real world
Augmenting reality: Bring digital objects into the real world
 
Let’s get real: An introduction to AR, VR, MR, XR and more
Let’s get real: An introduction to AR, VR, MR, XR and moreLet’s get real: An introduction to AR, VR, MR, XR and more
Let’s get real: An introduction to AR, VR, MR, XR and more
 
Using synthetic data for computer vision model training
Using synthetic data for computer vision model trainingUsing synthetic data for computer vision model training
Using synthetic data for computer vision model training
 
The Tipping Point: How Virtual Experiences Are Transforming Global Industries
The Tipping Point: How Virtual Experiences Are Transforming Global IndustriesThe Tipping Point: How Virtual Experiences Are Transforming Global Industries
The Tipping Point: How Virtual Experiences Are Transforming Global Industries
 
Unity Roadmap 2020: Live games
Unity Roadmap 2020: Live games Unity Roadmap 2020: Live games
Unity Roadmap 2020: Live games
 
Unity Roadmap 2020: Core Engine & Creator Tools
Unity Roadmap 2020: Core Engine & Creator ToolsUnity Roadmap 2020: Core Engine & Creator Tools
Unity Roadmap 2020: Core Engine & Creator Tools
 
How ABB shapes the future of industry with Microsoft HoloLens and Unity - Uni...
How ABB shapes the future of industry with Microsoft HoloLens and Unity - Uni...How ABB shapes the future of industry with Microsoft HoloLens and Unity - Uni...
How ABB shapes the future of industry with Microsoft HoloLens and Unity - Uni...
 
Unity XR platform has a new architecture – Unite Copenhagen 2019
Unity XR platform has a new architecture – Unite Copenhagen 2019Unity XR platform has a new architecture – Unite Copenhagen 2019
Unity XR platform has a new architecture – Unite Copenhagen 2019
 
Turn Revit Models into real-time 3D experiences
Turn Revit Models into real-time 3D experiencesTurn Revit Models into real-time 3D experiences
Turn Revit Models into real-time 3D experiences
 
How Daimler uses mobile mixed realities for training and sales - Unite Copenh...
How Daimler uses mobile mixed realities for training and sales - Unite Copenh...How Daimler uses mobile mixed realities for training and sales - Unite Copenh...
How Daimler uses mobile mixed realities for training and sales - Unite Copenh...
 
How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...
How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...
How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...
 
QA your code: The new Unity Test Framework – Unite Copenhagen 2019
QA your code: The new Unity Test Framework – Unite Copenhagen 2019QA your code: The new Unity Test Framework – Unite Copenhagen 2019
QA your code: The new Unity Test Framework – Unite Copenhagen 2019
 
Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...
Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...
Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...
 
Supplying scalable VR training applications with Innoactive - Unite Copenhage...
Supplying scalable VR training applications with Innoactive - Unite Copenhage...Supplying scalable VR training applications with Innoactive - Unite Copenhage...
Supplying scalable VR training applications with Innoactive - Unite Copenhage...
 
XR and real-time 3D in automotive digital marketing strategies | Visionaries ...
XR and real-time 3D in automotive digital marketing strategies | Visionaries ...XR and real-time 3D in automotive digital marketing strategies | Visionaries ...
XR and real-time 3D in automotive digital marketing strategies | Visionaries ...
 
Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...
Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...
Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...
 
What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019
What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019
What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019
 
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
 
Digital twins: the power of a virtual visual copy - Unite Copenhagen 2019
Digital twins: the power of a virtual visual copy - Unite Copenhagen 2019Digital twins: the power of a virtual visual copy - Unite Copenhagen 2019
Digital twins: the power of a virtual visual copy - Unite Copenhagen 2019
 

Recently uploaded

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Recently uploaded (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

XR graphics in Unity: delivering the best AR/VR experiences – Unite Copenhagen 2019

  • 1.
  • 2. GenerativeArt—MadewithUnity XR Graphics in Unity Maximizing your AR/VR experience’s potential Dan Miller Unity Technologies, XR Evangelist @DanMillerDev
  • 3. Agenda 3 Virtual Reality - Stereo Rendering Considerations - Custom Shader Modifications - RenderScale and RenderViewportScale - Scriptable Render pipelines for VR Augmented Reality - Occlusions - Shadows - Platforms Specific Rendering - Demo
  • 4. Rendering For Each Eye 👀 4 Stereo Rendering
  • 5. Stereo Rendering 5 Single-pass instancingSingle-passMulti-pass Two textures are packed into one large texture (referred to as a double-wide texture). Only goes through the scene graph once, so it’s much faster on the CPU. However requires a lot of extra GPU state changes to accomplish this Uses a single texture array containing two textures storing the rendering for each eye. Involves the same amount of GPU work, but fewer draw calls and work for the CPU, so it’s significantly more performant. Requires going through the scene graph multiple times, once for each view you need
  • 6. Custom Shader Changes 🔮 6 Vertex Shader Changes
  • 7. struct appdata { float3 pos; UNITY_VERTEX_INPUT_INSTANCE_ID; // uint instancedID : SV_InstanceID; }; struct v2f { float4 vertex : SV_POSITION; UNITY_VERTEX_OUTPUT_STEREO; // uint stereoEyeIndex : SV_RenderTargetIndex; }; v2f vert (appdata v) { v2f o; UNITY_SETUP_INSTANCE_ID(v); // unity_StereoEyeIndex = v.instanceID & 0x01; UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); // o.stereoEyeIndex = unity_stereoEyeIndex o.vertex = UnityObjectToClipPos(v.vertex); return o; } 7 struct appdata { float3 pos; UNITY_VERTEX_INPUT_INSTANCE_ID; // uint instancedID : SV_InstanceID; }; struct v2f { float4 vertex : SV_POSITION; UNITY_VERTEX_OUTPUT_STEREO; // uint stereoEyeIndex : SV_RenderTargetIndex; }; v2f vert (appdata v) { v2f o; o.vertex = UnityObjectToClipPos(v.vertex); return o; } struct appdata { float3 pos; UNITY_VERTEX_INPUT_INSTANCE_ID; // uint instancedID : SV_InstanceID; }; struct v2f { float4 vertex : SV_POSITION; }; v2f vert (appdata v) { v2f o; o.vertex = UnityObjectToClipPos(v.vertex); return o; } struct appdata { float3 pos; }; struct v2f { float4 vertex : SV_POSITION; }; v2f vert (appdata v) { v2f o; o.vertex = UnityObjectToClipPos(v.vertex); return o; } Vertex Shader Changes
  • 9. RenderScale vs RenderViewportScale 9 RenderViewportScaleRenderScale Controls the actual size of eye textures as a multiplier of the device's default resolution. ● value of 1.0 will use the default eye texture resolution specified by the XR device. ● less than 1.0 will use lower resolution eye textures ● greater than 1.0 will yield higher resolutions Controls how much of the allocated eye texture should be used for rendering. Valid range is 0.0 to 1.0. This value can be changed at runtime without reallocating eye textures. Therefore it is useful for dynamically adjusting eye render resolution. EyeTextureResolutionScale
  • 10. Current Support and Features 😳 🛋🛋 10 HDRP for Virtual Reality
  • 11. HDRP for VR 11 Supported in 2019.1+ Some HDRP features are not compatible with VR. When you enable VR in your Project, HDRP automatically disables the features that it does not support 2019.1 — Single Pass Stereo 2019.2 — Single pass instanced
  • 12. Not supported ● Multi-pass rendering ● Single-pass instancing ● Tile lighting ● Deferred rendering ● Volumetrics ● Render and viewport scale ● VFX Graph HDRP for VR 12 In 2019.1 Supported ● Multi-pass rendering ● Single-pass instancing ● Tile lighting ● Deferred rendering ● Volumetrics ● Render and viewport scale ● VFX Graph In 2019.2+ Supported In 2019.3+
  • 13. Universal Render Pipeline for VR 😎 13 URP for Virtual Reality
  • 14. Universal RP for VR 14 Supported in 2019.1+ ● Better performance than legacy in most lighting setups ~25% increase on mobile hardware ● 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
  • 15. Universal Render Pipeline 15 Current Limitations ● There are currently some issues with MSAA and PostProcessing in VR. ● We added single pass double wide as the fallback to SRP in 2019.1
  • 16. Challenges and Solutions 🌅 16 Post-Processing Stack
  • 17. Post processing in XR 17 Always consider what if any post-processing effect you need. ● Most temporal effects add blurriness and latency ● Simulating depth of field, a property of physical cameras, in a headset, which is simulating the human eye, will most likely cause nausea. ● If you’re running into issues, try the different stereo rendering modes. ● For mobile Augmented Reality, effects will be processed on the entire camera feed, not just digital objects.
  • 18. Rendering techniques ✨ 👀 18 Augmented Reality
  • 19. Things to keep in mind ● Digital and augmented objects are rendering on top of the camera feed ● Occlusion and Shadows are not enabled by default and require special shaders and consideration ● Your users will be using this in a variety of different conditions and environments ● Universal Render Pipeline support is continuing to be updated and improved ○ Only available in AR Foundation Augmented Reality Rendering — Mobile 19
  • 20. Things to keep in mind ● Additive displays — Blacks = Transparent ● Physically based rendering and self shadowing can create dark areas ● Consider leveraging unique platform features like eye tracking ● Universal Render Pipeline only supported in single pass and single pass instanced stereo rendering. Augmented Reality Rendering — Head Mounted 20
  • 21. Occlusion 21 http://bit.ly/MobileOcclusionShader ● Special shader ● Can be applied to planes or world mesh ● Used with feature points for quicker occlusion ● Built in support on specific platforms Human Segmentation enabled in ARKit 3.0 with AR Foundation
  • 22. Shadows 22 http://bit.ly/MobileARShadow ● Casting shadows on transparent geometry ● Consider size and scale - rescale size of rendered content ● For static objects use blob shadows
  • 23. Platform Specific Features — Mobile 23 Environmental Probes — ARKit ● Generate environment textures during an AR session using camera imagery ● Plug that cubemap texturing into a reflection probe in Unity to provide realistic image-based lighting for virtual objects in AR Environmental HDR — ARCore ● Directional light rotations to help with placing shadows in the right direction ● Ambient Spherical Harmonics: helps model ambient illumination from all directions ● HDR Cubemap: provides specular highlights and reflections
  • 24. Tips and Tricks ✨ 24 Demo
  • 25. Demo Breakdown 25 Colored Materials Specular, Normal Occlusion maps Environmental Probes Light estimation Post Processing - Color Grading
  • 26. Want to learn more? Project: VR in Unity: A Beginner's Guide Tutorial: Configuring Unity for AR Development Subscribe now for a 3-month free trial at unity.com/learn- premium with code: UNITECPH19 *Learn Premium is included in Unity Plus and Pro licenses. Just sign in with your Unity ID.
  • 27. Thank you. Dan Miller — XR Evangelist DanielMi@unity3d.com @DanMillerDev