diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index cd128d0d41e..4b5dd515fd4 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [11.0.0] - 2020-10-21 +### Fixed +- Fixed XR shadows culling + Version Updated The version number for this package has increased due to a version update of a related graphics package. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 28089dec92b..33f4f0122aa 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -3295,6 +3295,10 @@ out ScriptableCullingParameters cullingParams if (hdCamera.xr.enabled) { cullingParams = hdCamera.xr.cullingParams; + + // Sync the FOV on the camera to match the projection from the XR device in order to cull shadows accurately + if (!camera.usePhysicalProperties) + camera.fieldOfView = Mathf.Rad2Deg * Mathf.Atan(1.0f / cullingParams.stereoProjectionMatrix.m11) * 2.0f; } else {