updates on professional vr
play

UPDATES ON PROFESSIONAL VR & TURING VRWORKS Ingo Esser, Robert - PowerPoint PPT Presentation

UPDATES ON PROFESSIONAL VR & TURING VRWORKS Ingo Esser, Robert Menzel, 3/20/2019 Motivation VR SLI Multi-GPU Rendering AGENDA Multi-View Rendering (new in Turing) Variable Rate Shading (new in Turing) 2 MOTIVATION 3 GRAPHICS PIPELINE


  1. VR SLI Vulkan - subsetAllocation Vulkan provides VR SLI through the VK_KHR_device_group extension Similar per-GPU functionality Left view data Uploads Geometry Render commands Materials GPU-GPU transfers Right view data 38

  2. VR SLI Vulkan - subsetAllocation Vulkan provides VR SLI through the VK_KHR_device_group extension Similar per-GPU functionality Uploads Geometries 0 Materials 0 Render commands GPU-GPU transfers Geometries 1 Materials 1 Upcoming support: Per-GPU memory allocations 39

  3. VR SLI Recap Application VR SLI covers a wide variety of workloads Almost perfect load balancing between left/right eye and two GPUs Driver Copy overhead and view independent VR SLI workloads limit scaling Geometric Pipeline NVLink can help improve scaling OpenGL: GL_NV_gpu_multicast / GL_NVX_gpu_multicast2 Rasterization Fragment Shader Vulkan: VK_KHR_device_group (core in VK 1.1) DX11: NVAPI 40

  4. MULTI-VIEW RENDERING 41

  5. TWO PASS STEREO RENDERING 2 Full Geometry Passes Left Eye (Pass 1) Right Eye (Pass 2) 42

  6. TWO PASS RENDERING Mono to Stereo Workload in all steps of the pipeline double. 2x Application Getting CPU bound fast, especially in CAD! 2x Driver Geometric 2x Pipeline Rasterization 2x Fragment Shader 43

  7. SINGLE-PASS-STEREO 1 Pass on Pascal Left Eye Right Eye 44

  8. SINGLE-PASS-STEREO Mono to Stereo Cut CPU time in half 1x Application Cut VTG processing (nearly) in half 1x Driver No change in raster & shading Geometric ~1x DX: NVAPI Pipeline Vulkan: VK_KHR_Multiview (core in VK 1.1) & Rasterization VK_NVX_multiview_per_view_attributes 2x Fragment Shader OpenGL: GL_NV_stereo_view_rendering 45

  9. SINGLE-PASS-STEREO Limitations Two views only 1x Application ✓  Display 2 Displays per eye 1x Driver Geometric ~1x Pipeline Rasterization 2x Fragment Shader 46

  10. SINGLE-PASS-STEREO Limitations Two views only 1x Application Only change X-coordinate Canted displays (wide FoV) 1x Driver  ✓ Display Display Geometric ~1x Pipeline Rasterization 2x Fragment Shader 47

  11. MULTI-VIEW RENDERING Next Generation Single-Pass-Stereo Left Eye Right Eye 48

  12. MULTI-VIEW RENDERING Turing Up to 4 arbitrary views in hardware. 1x Application Up to 32 arbitrary views in software. 1x Driver Geometric 1x Pipeline Rasterization 2x Fragment Shader 49

  13. MULTI-VIEW RENDERING Pre-Turing Up to 32 arbitrary views in software. 1x Application Still significant reduction in CPU overhead. >1x Driver Reduces number of code paths. Geometric 2x Pipeline Rasterization 2x Fragment Shader 50

  14. MULTI-VIEW RENDERING APIs 1x Application >1x Driver Geometric 2x DX11: NVAPI Pipeline DX12: via View Instancing Rasterization 2x Vulkan: VK_KHR_Multiview (core in VK 1.1) Fragment Shader OpenGL: GL_OVR_multiview & GL_OVR_multiview2 51

  15. MULTI-VIEW RENDERING Non-VR Use-cases Multiple Shadow Maps in one pass (multiple light sources, cascaded shadow maps etc.) 52

  16. MULTI-VIEW RENDERING Example: OpenGL Render to multiple layers (just like Single-Pass-Stereo) Provide data for all views to Vertex Shader Handle view dependent operations via new built-in gl_ViewID_OVR Minimize number of varyings dependent on gl_ViewID_OVR ! 53

  17. MULTI-VIEW RENDERING Example: OpenGL mat4 modelViewProjection = viewProjMatrix[gl_ViewID_OVR] * model; gl_Position = modelViewProjection * vertexPos; 54

  18. MULTI-VIEW RENDERING Example: OpenGL mat4 modelViewProjection = viewProjMatrix[0] * model; gl_Position = modelViewProjection * vertexPos; if (gl_ViewID_OVR == 1) { mat4 modelViewProjection2 = viewProjMatrix[1] * model; vec4 pos = modelViewProjection2 * vertexPos; gl_Position.x = pos.x; // hint that only X depends on the viewID to mimic SPS } 55

  19. MULTI-VIEW RENDERING Turing Mesh Shaders Mesh Shaders can be used with Multi-View Rendering! But: not implicitly like Vertex/Tessellation/Geometry Shaders but explicitly in the Mesh Shader max 4 views 56

  20. MULTI-VIEW RENDERING Turing Mesh Shaders Mesh Shader: Mesh Shader with explicit Multi-View Rendering out gl_MeshPerVertexNV { out gl_MeshPerVertexNV { vec4 gl_Position; perviewNV vec4 gl_PositionPerViewNV[]; } gl_MeshVerticesNV[]; } gl_MeshVerticesNV[]; … … gl_MeshVerticesNV[i].gl_Position = gl_MeshVerticesNV[i].gl_PositionPerViewNV[ v ] = MVP * vertex; MVP[ v ] * vertex; 57

  21. MULTI-VIEW RENDERING Limitations Application Only apply to OpenGL! (Limitations come from GL_OVR_multiview/2) MVR Driver No multisampling No Geometry Shader Geometric Pipeline No Tessellation Shader Rasterization Fragment Shader We‘re working on it! 58

  22. MULTI-VIEW RENDERING Recap Application Reduces geometric load and CPU overhead More flexible than SPS MVR Driver Software fallback for pre-Turing GPUs Performance boost depends on number of Geometric view dependent attributes Pipeline DX11: NVAPI | DX12: via View Instancing Rasterization Vulkan: VK_KHR_Multiview (core in VK 1.1) Fragment Shader OpenGL: GL_OVR_multiview & GL_OVR_multiview2 59

  23. VARIABLE RATE SHADING 60

  24. VARIABLE RATE SHADING Motivation Due to the lens distortion the image is warped before sending it to the HMD. Good opportunity to save unnecessary rendering work. High Resolution Medium Resolution Low Resolution 61

  25. RECAP: MAXWELL Multi-Resolution Shading 9 Viewports 9 areas in which the resolution is constant High Resolution Low Resolution 62

  26. RECAP: PASCAL Lens Matched Shading 4 Viewports 4 areas in which the resolution gets reduced towards the corners High Resolution Low Resolution 63

  27. NEW: TURING Variable Rate Shading 1 Viewport Many small areas in which the shading rate is constant High Resolution Medium Resolution Low Resolution 64

  28. COMPARING MRS, LMS, VRS From our DX11 VRWorks Samples 65

  29. COMPARING MRS, LMS, VRS From our DX11 VRWorks Samples MRS LMS VRS MRS Density: 0.25 Coefficient: 2.0 Shading Rate: 4x4 LMS VRS 66

  30. VARIABLE RATE SHADING Rasterization Pixel 67

  31. VARIABLE RATE SHADING Rasterization Pixel Sampling position 68

  32. VARIABLE RATE SHADING Rasterization Pixel Sampling position Pixels: 40 Samples covered: 40 F .Shader invocations*: 40 * (not counting helper threads) 69

  33. VARIABLE RATE SHADING Multi Sampling Rasterization Pixel Sampling position Pixels: 44 Samples covered: 69 F .Shader invocations: 44 70

  34. VARIABLE RATE SHADING Multi Sampling Rasterization Shading result stored for one sampling position Shading result stored for two sampling position Pixels: 44 Samples covered: 69 F .Shader invocations: 44 71

  35. VARIABLE RATE SHADING Pixel Sampling position Fragment Shader Invocation 72

  36. VARIABLE RATE SHADING 73

  37. VARIABLE RATE SHADING Shading result stored for one pixel Shading result stored for two pixels Shading result stored for four pixels 74

  38. VARIABLE RATE SHADING Pixels: 40 Samples covered: 40 F .Shader invocations: 14 75

  39. VARIABLE RATE SHADING 1x1 Shading Rate Pixels: 477 Samples covered: 477 F .Shader invocations: 477 76

  40. VARIABLE RATE SHADING 2x2 Shading Rate Pixels: 477 Samples covered: 477 F .Shader invocations: 128 77

  41. VARIABLE RATE SHADING 4x4 Shading Rate Pixels: 477 Samples covered: 477 F .Shader invocations: 42 78

  42. VARIABLE RATE SHADING 79

  43. VARIABLE RATE SHADING 2x2 1x1 4x4 Shading Rate Shading Rate Shading Rate 1x1 2x2 2x2 Shading Rate Shading Rate Shading Rate 80

  44. VARIABLE RATE SHADING Shading Rate Lookup 2x2 1x1 4x4 Shading Rate Shading Rate Shading Rate 1x1 2x2 2x2 Shading Rate Shading Rate Shading Rate 81

  45. VARIABLE RATE SHADING Shading Rate Lookup 0 1x1 Shading Rate 0 1 2 1 4x4 Shading Rate 2 2x2 Shading Rate 0 2 2 3 2x4 Shading Rate Framebuffer Shading Rate Image Palette 82

  46. VARIABLE RATE SHADING Shading Rate Lookup 0 1x1 Shading Rate 0 1 2 1 4x4 Shading Rate 2 2x2 Shading Rate 0 2 2 3 2x4 Shading Rate Framebuffer Shading Rate Image Palette (8 bit integer) (16 entries) 83

  47. VARIABLE RATE SHADING Shading Rate Lookup 1x1 0 1x1 Shading Rate 1x1 Shading Rate Shading Rate 4x4 1 4x4 Shading Rate 4x4 Shading Rate Shading Rate 2x2 2 2x2 Shading Rate 2x2 Shading Rate Shading Rate 2x4 3 2x4 Shading Rate 2x4 Shading Rate Shading Rate Shading Rate Image Array Per Viewport Palette Layered Framebuffer (8 bit integer) (16 entries) 84

  48. VARIABLE RATE SHADING Shading Modes: GL_SHADING_RATE_ NO_INVOCATIONS_NV 1_INVOCATION_PER_PIXEL_NV 1_INVOCATION_PER_1X2_PIXELS_NV 1_INVOCATION_PER_2X1_PIXELS_NV 1_INVOCATION_PER_2X2_PIXELS_NV 1_INVOCATION_PER_2X4_PIXELS_NV 1_INVOCATION_PER_4X2_PIXELS_NV 1_INVOCATION_PER_4X4_PIXELS_NV 85

  49. VARIABLE RATE SHADING Foveated Rendering 86

  50. VARIABLE RATE SHADING Foveated Rendering Foveation pattern in Shading Rate Image For layered rendering (e.g. Multi-View Rendering): Use texture array for SRI 87

  51. VARIABLE RATE SHADING Foveated Rendering Lens Matched With Eye Tracking 88

  52. VARIABLE RATE SHADING Content Adaptive Shading Rate 89

  53. VARIABLE RATE SHADING Content Adaptive Shading Rate Two Viewports: Both span full framebuffer Each has own Shading Rate Palette Select matching viewport in VTG Shader 90

  54. VARIABLE RATE SHADING Content Adaptive Shading Rate Legend: Cold → Finer Shading Hot → Coarse Shading Content-adaptive Super Sampling for Text 91

  55. VARIABLE RATE SHADING Increased Shading Rate So far: reduced shading rate Also possible: increase shading rate (where needed) 92

  56. VARIABLE RATE SHADING Shading Modes: Multi-Sample Framebuffers GL_SHADING_RATE_ 2_INVOCATIONS_PER_PIXEL_NV 4_INVOCATIONS_PER_PIXEL_NV 8_INVOCATIONS_PER_PIXEL_NV 93

  57. VARIABLE RATE SHADING Increased Shading Rate Idea: Render to a MSAA buffer 1x shading for most of the scene (regular MSAA) GL_SHADING_RATE_ X _INVOCATIONS_PER_PIXEL_NV for important objects or materials ( X : 2,4,8 ) (OpenGL) Sample from VRWorks 94

  58. VARIABLE RATE SHADING Increased Shading Rate: Animated Material MSAA VRS 95

  59. VARIABLE RATE SHADING Increased Shading Rate: Procedural Material (OpenGL) Sample from VRWorks 96

  60. VARIABLE RATE SHADING Increased Shading Rate: Procedural Material VRS MSAA 97

  61. VARIABLE RATE SHADING Increased Shading Rate Edge quality: MSAA Shading quality: MSAA OR like Super-Sampling (depending on requirement) Performance: Adjustable between MSAA and Super-Sampling 98

  62. VARIABLE RATE SHADING Varying Extrapolation 99

  63. VARIABLE RATE SHADING Varying Extrapolation 100

  64. VARIABLE RATE SHADING Varying Extrapolation 101

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