VR in HDRP

Fabien Houlmann edited this page Jan 3, 2019 · 8 revisions

VR Support in HDRP

This page describes how to set up your HDRP project for VR and calls out currently unsupported features.

Configure HDRP for VR

Most of the following settings can be configured in the HDRenderPipeline Asset. Some settings may need to be set up under Default Frame Settings, in addition to where they would be set under Render Pipeline Settings or Player Settings.

Required:

  • Camera relative rendering off (see below)
  • Enable VR under Player Settings

Recommended:

  • Enable MSAA

Automatic:

  • Forward rendering is enabled when VR is active (in FrameSettings.cs)

In order to turn off camera-relative rendering, modify ShaderConfig.cs to change CameraRelativeRendering from 1 to 0.

You also need to regenerate shader includes (Edit > Render Pipeline > Generate Shader Includes) after making this change. If the previous does not work, you have to manually edit the following files (set SHADEROPTIONS_CAMERA_RELATIVE_RENDERING to 0):

  • com.unity.render-pipelines.high-definition\Runtime\ShaderLibrary\ShaderConfig.cs.hlsl
  • com.unity.shadergraph\ShaderGraphLibrary\ShaderConfig.cs.hlsl

MSAA is the recommended anti-aliasing solution for VR because it is hardware-accelerated and anti-aliases scenes without blurring away too much detail. However, in scenes with many high-frequency details (like leaves or grass), the aggressive smoothing from PostProcessing's TAA may be preferred despite the hit to performance.

Currently Unsupported

The following features are not currently supported in HDRP for VR.

HDRP Features:

  • Deferred lighting
  • Camera Relative rendering
  • Compute light evaluation
  • Reflections (SSR)
  • Volumetrics
  • Debug display (partial)

VR Features:

  • Viewport scale
  • Render scale
  • Multi-pass rendering
  • Single-pass instanced rendering

Troubleshooting

Game view shows unexpected or indecipherable view of scene

Deselect the Main Camera in your scene.

Contents

Home

SRP Core
High Definition Render Pipeline
Lightweight Render Pipeline
Shader Graph
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.