accelerating your vr games with vrworks
play

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


  1. Accelerating Your VR Games with VRWorks Manuel Kraemer

  2. Talk Overview NVIDIA Pascal Overview ▪ VRWorks Graphics Features ▪ Multi-Res Shading, Lens Matched Shading o Single Pass Stereo, VRSLI o ▪ SMP Assist (new) ▪ Vulkan extensions (new) ▪ VR Tools – Nsight, FCAT VR 2

  3. NVIDIA In VR 3

  4. NVIDIA VR Powerful Hardware & Tools to Enhance Your VR Experiences Hardware SDKs & Tools Applications VRWorks PhysX NSIGHT & FCAT VR NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE. 4

  5. NVIDIA Pascal GPU Architecture 10 GHz 16NM FF G5X CRAFTSMANSHIP SIMULTANEOUS MULTI- PROJECTION & PRE-EMPTION 5 5

  6. NVIDIA PASCAL Pixel Level Preemption Improves Responsiveness For VR ▪ PREEMPT COMMAND TRIANGLES PIXELS PUSHBUFFER 6

  7. NVIDIA PASCAL ▪ Simultaneous Multi-Projection Engine Input Assembler Vertex Shader Tesselation Shader Geometry Shader Simultaneous Multi-Projection Setup Raster Pixel Shader 7

  8. VR GRAPHICS CHALLENGES 8

  9. VR Demands Serious Performance Frame Rate Resolution Latency 90FPS / 11 ms 800M Pixels/Sec <20ms 2240 4032 9

  10. 3D Game System Assets Renderer Monitor Geometry HDMI, Shadow Textures Game Raster Shade AO Post FX* Sync Maps Lights Simulation Shaders User Input Input Devices * Includes depth of field, reflections, fog, color grading, motion blur, antialiasing 10

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

  12. VR LATENCY WITHOUT TIMEWARP CPU Sample head pose Submit to GPU GPU Flip Scan-out Flash backlight Latency 12 12

  13. VR LATENCY WITH TIMEWARP CPU Sample head pose Timewarp based on latest head pose Submit to GPU GPU Flip Scan-out Flash backlight Latency 13 13

  14. DROPPED FRAME Rendered Frame 1 Frame 2 Frame 3 Frames Runtime Warp Warp Warp Warp Time Warp 1 2 3 4 Scan Frame 1 + Warp 1 Frame 1 + Warp 2 Frame 2 + Warp 3 Frame 3 + Warp 4 Out 11ms 11ms 11ms 11ms 11ms 14 14

  15. Lens Distortion Image Displayed Optics User’s view 15

  16. VRWorks 16

  17. NVIDIA VRWORKS Bringing Reality to VR GRAPHICS TOUCH & PHYSICS HEADSET AUDIO PROFESSIONAL VIDEO 17

  18. NVIDIA VRWORKS Bringing Reality to VR GRAPHICS TOUCH & PHYSICS HEADSET AUDIO PROFESSIONAL VIDEO 18

  19. VRWORKS GRAPHICS RENDER LESS PIXELS HANDLE LARGER SCENES Multi-Resolution Shading (MRS) Single Pass Stereo (SPS) Lens Matched Shading (LMS) VRSLI 19

  20. Render Less Pixels 20

  21. VR OPTICS LCD display Optics User’s view 21

  22. VR RENDERING Rendered Image Warped Image 22 22

  23. VR RENDERING GPU renders many pixels that never make it to screen Rendered Image Warped Image 23 23

  24. VRWORKS MULTI-RES SHADING 24

  25. Multi-resolution shading Fast viewport broadcast on NVIDIA Maxwell and beyond GPUs Viewport 1 Viewport 2 Geometry Pipeline ... Viewport N 25

  26. VRWORKS LENS MATCHED SHADING Renders to a lens corrected surface 26 26

  27. LENS MATCHED SHADING Renders to a lens corrected surface 27 27

  28. LENS MATCHED SHADING Breakdown 28

  29. LENS MATCHED SHADING Breakdown 29

  30. LENS MATCHED SHADING Breakdown 30

  31. LENS MATCHED SHADING Breakdown 31

  32. LENS MATCHED SHADING Breakdown 32

  33. Conservative Aggressive Quality LMS vs. MRS (no worse than baseline) (3/4 Reso. of conservative) (no undersampling) LMS 1.17 MPix / eye 0.87 MPix / eye 1.57 MPix / eye Baseline MRS (no warp) 2.54 MPix / eye 1.58 MPix / eye 2.03 MPix / eye 1.40 MPix / eye 33

  34. LMS / MRS Challenges Require unwarping ▪ Minor speed and quality degradation o ▪ Require application changes for Setting / creating new “fast” geometry shaders o Set viewport / scissor state o Modifying shaders o Introducing SMP Assist to help with some of this o 35

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

  36. Introducing SMP Assist Interface ID3DNvSMPAssist Helping with app complexity { void Enable(IUnknown *pDevContext, Application ▪ EyeIndex) Creates ID3DNvSMPAssist interface o void Disable(IUnknown *pDevContext); Sets up projections o void GetConstants(...); Calls Enable/Disable around render passes/draw calls o void SetupProjections(IUnknown *pDevice,); Use GetConstants results in shaders o void UpdateInstancedStereoData(IUnknown Driver ▪ *pDevice,...); }; Creates & binds Fast Geometry Shaders for culling & o projecting Sets scissor and viewport rectangles o Returns constant buffer data needed o 37

  37. SMP Assist levels of support NV_SMP_ASSIST_LEVEL_FULL ▪ App selects a pre-baked MRS/LMS config (HMD type, quality level). o Driver handles correct setting of viewport, scissors and FastGS. o Driver provides constant buffer data for remapping. o NV_SMP_ASSIST_LEVEL_PARTIAL ▪ App provides a custom MRS/LMS config. o Driver handles correct setting of viewport, scissors and FastGS. o Driver provides constant buffer data for remapping. o NV_SMP_ASSIST_LEVEL_MINIMAL ▪ App provides viewports and scissors. o App sets FastGS as required. o App sets LMS params as required (NvAPI_D3D_SetModifiedWMode). o Driver handles correct setting of viewports and scissors. o Driver provides constant buffer for remapping. o 38

  38. 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. 39

  39. Handle Larger Scenes 40

  40. TRADITIONAL STEREO RENDERING Requires 2 geometry passes 41 41

  41. NVIDIA PASCAL Simultaneous Multi-Projection Engine ▪ Input Assembler Vertex Shader Tesselation Shader Geometry Shader Simultaneous Multi-Projection Setup Raster Pixel Shader 42

  42. VRWORKS SINGLE PASS STEREO Renders left & right eye in one geometry pass Left Eye Right Eye 43 43

  43. VRWORKS VR SLI Scales performance across multiple GPUs ▪ Left eye rendering Frame 1 (Left eye) Warped Shadow maps, Frame GPU physics, etc. Right eye rendering 44

  44. “ Normal ” SLI GPUs render alternate frames CPU N N+1 GPU 0 N GPU 1 N+1 Display N N+1 Latency 45

  45. VR SLI Each GPU renders one eye — lower latency CPU N N+1 GPU 0 N L N+1 L GPU 1 N R N+1 R Display N N+1 Latency 46

  46. VRWORKS SPEEDUPS Without VRWorks With VRWorks 2.0 1.6 Relative Performance 1.2 0.8 0.4 0.0 Funhouse Everest Raw Data SportsBar VR Trials of Tatooine *Performance measured on GeForce GTX 1080 using VRWorks MRS, LMS, or VR SLI 47

  47. Eco-system 48

  48. VRWorks Graphics Support Engines ▪ UnrealEngine 4 o Unity o ▪ APIs Direct3D (11 and 12) o OpenGL o Vulkan o 49

  49. VRWorks for Unreal Engine Unreal Engine integration Full VRWorks suite available ▪ VRSLI, Multi-resolution Shading, Single Pass Stereo, Lens Matched Shading ▪ https://github.com/NvPhysX/UnrealEngine/tree/VRWorks-Graphics-4.18 o Most post passes, instanced stereo supported o ▪ 4.19 coming soon 50

  50. VRWorks for Unity Available in Unity 2017.1 and higher 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 ▪ 51

  51. Vulkan extensions / VRWorks building blocks Multi-Resolution Shading (Maxwell+) ▪ VK_NV_viewport_array2 o VK_NV_geometry_shader_passthrough o ▪ Lens Matched Shading (Pascal+) VK_NV_clip_space_w_scaling o Single Pass Stereo (Pascal+) ▪ VK_NVX_multiview_per_view_attributes o 52

  52. Vulkan Multi-GPU for VR Vulkan 1.1 / VK_KHR_device_group_{creation} ▪ Explicit MGPU for AFR, SFR, VR o Command buffers & commands can be directed to subsets of devices o Viewport/scissor state can diverge between devices o Shader built-in gl_DeviceIndex o Select per eye view transform o See vr_sli_vk sample in VRWorks SDK ▪ See Jeff Bolz` MGPU talk: ▪ https://youtu.be/RkXa4RiERu8?t=1566 ▪ 53

  53. Measuring Performance 54

  54. PERFORMANCE TUNING NSIGHT • 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 55

  55. FCAT VR MEASURING THE QUALITY OF YOUR VR EXPERIENCE 56

  56. PERFORMANCE TUNING FCAT Create charts and analyze ▪ data for: Frametimes o Dropped frames o Runtime warp dropped frames o Asynchronous Space Warp o (ASW) Synthesized frames o 58

  57. NVIDIA VRWorks Access Latest SDKs at developer.nvidia.com/vr GRAPHICS TOUCH & PHYSICS HEADSET AUDIO PROFESSIONAL VIDEO 59

  58. Questions? cem@nvidia.com

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend