Accelerating Your VR Games with VRWorks Manuel Kraemer Talk - - PowerPoint PPT Presentation

accelerating your vr games with vrworks
SMART_READER_LITE
LIVE PREVIEW

Accelerating Your VR Games with VRWorks Manuel Kraemer Talk - - PowerPoint PPT Presentation

Accelerating Your VR Games with VRWorks Manuel Kraemer Talk Overview NVIDIA Pascal Overview VRWorks Graphics Features Multi-Res Shading, Lens Matched Shading o Single Pass Stereo, VRSLI o SMP Assist (new) Vulkan


slide-1
SLIDE 1

Manuel Kraemer

Accelerating Your VR Games with VRWorks

slide-2
SLIDE 2

2

Talk Overview

▪ NVIDIA Pascal Overview ▪ VRWorks Graphics Features

  • Multi-Res Shading, Lens Matched Shading
  • Single Pass Stereo, VRSLI

▪ SMP Assist (new) ▪ Vulkan extensions (new) ▪ VR Tools – Nsight, FCAT VR

slide-3
SLIDE 3

3

NVIDIA In VR

slide-4
SLIDE 4

4 NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.

SDKs & Tools Applications Hardware

NVIDIA VR

Powerful Hardware & Tools to Enhance Your VR Experiences

VRWorks PhysX NSIGHT & FCAT VR

slide-5
SLIDE 5

5 5

NVIDIA Pascal GPU Architecture

16NM FF G5X SIMULTANEOUS MULTI- PROJECTION & PRE-EMPTION CRAFTSMANSHIP

10 GHz

slide-6
SLIDE 6

6

NVIDIA PASCAL

▪ Pixel Level Preemption Improves Responsiveness For VR

TRIANGLES COMMAND PUSHBUFFER PIXELS PREEMPT

slide-7
SLIDE 7

7

NVIDIA PASCAL

▪ Simultaneous Multi-Projection Engine

Input Assembler Vertex Shader Tesselation Shader Geometry Shader Pixel Shader Setup Raster Simultaneous Multi-Projection

slide-8
SLIDE 8

8

VR GRAPHICS CHALLENGES

slide-9
SLIDE 9

9

VR Demands Serious Performance

Frame Rate Resolution Latency

90FPS / 11 ms 800M Pixels/Sec <20ms

4032 2240

slide-10
SLIDE 10

10

3D Game System

Game Simulation HDMI, Sync Monitor Renderer Assets Raster Geometry Textures Lights Shaders Shadow Maps AO Shade Post FX*

* Includes depth of field, reflections, fog, color grading, motion blur, antialiasing

User Input Input Devices

slide-11
SLIDE 11

11

VR Game System

Game Simulation HDMI, Sync HMD Renderer Assets Rasterization Geometry Textures Lights Shaders Shadow Maps User Input Input Devices Time Warp Post Lens Dist

slide-12
SLIDE 12

12 12

VR LATENCY WITHOUT TIMEWARP

CPU GPU

Flip Flash backlight

Scan-out

Sample head pose Submit to GPU Latency

slide-13
SLIDE 13

13 13

Timewarp based on latest head pose

CPU GPU

Latency

Scan-out

Flip Flash backlight Sample head pose

VR LATENCY WITH TIMEWARP

Submit to GPU

slide-14
SLIDE 14

14 14

Rendered Frames Scan Out Runtime Time Warp

Frame 1 Frame 2 Frame 3 Warp 1 Warp 2 Warp 3 Warp 4

Frame 1 + Warp 1

11ms 11ms 11ms 11ms 11ms

Frame 1 + Warp 2 Frame 2 + Warp 3 Frame 3 + Warp 4

DROPPED FRAME

slide-15
SLIDE 15

15

User’s view Image Displayed Optics

Lens Distortion

slide-16
SLIDE 16

16

VRWorks

slide-17
SLIDE 17

17

GRAPHICS HEADSET AUDIO TOUCH & PHYSICS PROFESSIONAL VIDEO

Bringing Reality to VR

NVIDIA VRWORKS

slide-18
SLIDE 18

18

GRAPHICS HEADSET AUDIO TOUCH & PHYSICS PROFESSIONAL VIDEO

Bringing Reality to VR

NVIDIA VRWORKS

slide-19
SLIDE 19

19

Multi-Resolution Shading (MRS) Single Pass Stereo (SPS)

RENDER LESS PIXELS

Lens Matched Shading (LMS)

HANDLE LARGER SCENES

VRSLI

VRWORKS GRAPHICS

slide-20
SLIDE 20

20

Render Less Pixels

slide-21
SLIDE 21

21

LCD display Optics User’s view

VR OPTICS

slide-22
SLIDE 22

22 22

Warped Image Rendered Image

VR RENDERING

slide-23
SLIDE 23

23 23

VR RENDERING

GPU renders many pixels that never make it to screen

Warped Image Rendered Image

slide-24
SLIDE 24

24

VRWORKS MULTI-RES SHADING

slide-25
SLIDE 25

25

Multi-resolution shading

Fast viewport broadcast on NVIDIA Maxwell and beyond GPUs Viewport 1 Viewport 2 Viewport N

...

Geometry Pipeline

slide-26
SLIDE 26

26 26

VRWORKS LENS MATCHED SHADING

Renders to a lens corrected surface

slide-27
SLIDE 27

27 27

LENS MATCHED SHADING

Renders to a lens corrected surface

slide-28
SLIDE 28

28

LENS MATCHED SHADING

Breakdown

slide-29
SLIDE 29

29

LENS MATCHED SHADING

Breakdown

slide-30
SLIDE 30

30

LENS MATCHED SHADING

Breakdown

slide-31
SLIDE 31

31

LENS MATCHED SHADING

Breakdown

slide-32
SLIDE 32

32

LENS MATCHED SHADING

Breakdown

slide-33
SLIDE 33

33

Baseline (no warp) 2.54 MPix / eye

MRS LMS

Conservative

(no worse than baseline)

Aggressive

(3/4 Reso. of conservative)

1.57 MPix / eye 1.17 MPix / eye 0.87 MPix / eye 2.03 MPix / eye 1.58 MPix / eye 1.40 MPix / eye Quality

(no undersampling)

LMS vs. MRS

slide-34
SLIDE 34

35

LMS / MRS Challenges

▪ Require unwarping

  • Minor speed and quality degradation

▪ Require application changes for

  • Setting / creating new “fast” geometry shaders
  • Set viewport / scissor state
  • Modifying shaders
  • Introducing SMP Assist to help with some of this
slide-35
SLIDE 35

36

Unwarping

▪ Oculus PC SDK 1.19 introduces native LMS support in the compositor! ▪ Avoids having to do it in-engine ▪ Improves quality and performance

slide-36
SLIDE 36

37

Introducing SMP Assist

▪ Application

  • Creates ID3DNvSMPAssist interface
  • Sets up projections
  • Calls Enable/Disable around render passes/draw calls
  • Use GetConstants results in shaders

▪ Driver

  • Creates & binds Fast Geometry Shaders for culling &

projecting

  • Sets scissor and viewport rectangles
  • Returns constant buffer data needed

Helping with app complexity

Interface ID3DNvSMPAssist { void Enable(IUnknown *pDevContext, EyeIndex) void Disable(IUnknown *pDevContext); void GetConstants(...); void SetupProjections(IUnknown *pDevice,); void UpdateInstancedStereoData(IUnknown *pDevice,...); };

slide-37
SLIDE 37

38

SMP Assist levels of support

▪ NV_SMP_ASSIST_LEVEL_FULL

  • App selects a pre-baked MRS/LMS config (HMD type, quality level).
  • Driver handles correct setting of viewport, scissors and FastGS.
  • Driver provides constant buffer data for remapping.

▪ NV_SMP_ASSIST_LEVEL_PARTIAL

  • App provides a custom MRS/LMS config.
  • Driver handles correct setting of viewport, scissors and FastGS.
  • Driver provides constant buffer data for remapping.

▪ NV_SMP_ASSIST_LEVEL_MINIMAL

  • App provides viewports and scissors.
  • App sets FastGS as required.
  • App sets LMS params as required (NvAPI_D3D_SetModifiedWMode).
  • Driver handles correct setting of viewports and scissors.
  • Driver provides constant buffer for remapping.
slide-38
SLIDE 38

39

Shader Modification Example

The input SVPos is in LMS space. So convert it to linear space, since CameraVector is used to calculate lighting with GBuffer data, which is also in linear space. InUV is LMS space. When fetching data from GBuffers, use LMS space coordinates directly : GBuffer is indexed in LMS space.

slide-39
SLIDE 39

40

Handle Larger Scenes

slide-40
SLIDE 40

41 41

TRADITIONAL STEREO RENDERING

Requires 2 geometry passes

slide-41
SLIDE 41

42

NVIDIA PASCAL

▪ Simultaneous Multi-Projection Engine

Input Assembler Vertex Shader Tesselation Shader Geometry Shader Pixel Shader Setup Raster Simultaneous Multi-Projection

slide-42
SLIDE 42

43 43

VRWORKS SINGLE PASS STEREO

Renders left & right eye in one geometry pass

Left Eye Right Eye

slide-43
SLIDE 43

44

VRWORKS VR SLI

Scales performance across multiple GPUs

Frame 1 (Left eye) Warped Frame

Left eye rendering Right eye rendering

Shadow maps, GPU physics, etc.

slide-44
SLIDE 44

45

“Normal” SLI

N N+1 N N+1 N N+1 CPU GPU 0 GPU 1 Display Latency

GPUs render alternate frames

slide-45
SLIDE 45

46

VR SLI

NL N+1R N N+1 NR N+1L N N+1 CPU GPU 0 GPU 1 Display Latency

Each GPU renders one eye—lower latency

slide-46
SLIDE 46

47

VRWORKS SPEEDUPS

0.0 0.4 0.8 1.2 1.6 2.0 Funhouse Everest Raw Data SportsBar VR Trials of Tatooine Without VRWorks With VRWorks

*Performance measured on GeForce GTX 1080 using VRWorks MRS, LMS, or VR SLI

Relative Performance

slide-47
SLIDE 47

48

Eco-system

slide-48
SLIDE 48

49

VRWorks Graphics Support

▪ Engines

  • UnrealEngine 4
  • Unity

▪ APIs

  • Direct3D (11 and 12)
  • OpenGL
  • Vulkan
slide-49
SLIDE 49

50

VRWorks for Unreal Engine

▪ Full VRWorks suite available ▪ VRSLI, Multi-resolution Shading, Single Pass Stereo, Lens Matched Shading

  • https://github.com/NvPhysX/UnrealEngine/tree/VRWorks-Graphics-4.18
  • Most post passes, instanced stereo supported

▪ 4.19 coming soon

Unreal Engine integration

slide-50
SLIDE 50

51

VRWorks for Unity

▪ Implemented as a native Unity plugin ▪ Supports MRS, SPS, LMS, and VRSLI ▪ DX11 only, supports basic post processing, forward rendering ▪ developer.nvidia.com/nvidia-vrworks-and-unity

Available in Unity 2017.1 and higher

slide-51
SLIDE 51

52

Vulkan extensions / VRWorks building blocks

▪ Multi-Resolution Shading (Maxwell+)

  • VK_NV_viewport_array2
  • VK_NV_geometry_shader_passthrough

▪ Lens Matched Shading (Pascal+)

  • VK_NV_clip_space_w_scaling

▪ Single Pass Stereo (Pascal+)

  • VK_NVX_multiview_per_view_attributes
slide-52
SLIDE 52

53

Vulkan Multi-GPU for VR

▪ Vulkan 1.1 / VK_KHR_device_group_{creation}

  • Explicit MGPU for AFR, SFR, VR
  • Command buffers & commands can be directed to subsets of devices
  • Viewport/scissor state can diverge between devices
  • Shader built-in gl_DeviceIndex
  • Select per eye view transform

▪ See vr_sli_vk sample in VRWorks SDK ▪ See Jeff Bolz` MGPU talk: ▪ https://youtu.be/RkXa4RiERu8?t=1566

slide-53
SLIDE 53

54

Measuring Performance

slide-54
SLIDE 54

55

  • Understand CPU/GPU interaction
  • Debug your frame as it is rendered
  • Profile your frame to understand

bottlenecks

  • Save your frame for targeted

analysis

  • Leverage the Microsoft Visual

Studio platform

  • Also available in the newly

released tool, Nsight Graphics

PERFORMANCE TUNING

NSIGHT

slide-55
SLIDE 55

56

FCAT VR

MEASURING THE QUALITY OF YOUR VR EXPERIENCE

slide-56
SLIDE 56

58

PERFORMANCE TUNING

FCAT

▪ Create charts and analyze data for:

  • Frametimes
  • Dropped frames
  • Runtime warp dropped frames
  • Asynchronous Space Warp

(ASW)

  • Synthesized frames
slide-57
SLIDE 57

59

GRAPHICS HEADSET AUDIO TOUCH & PHYSICS PROFESSIONAL VIDEO

Access Latest SDKs at developer.nvidia.com/vr

NVIDIA VRWorks

slide-58
SLIDE 58

Questions?

cem@nvidia.com