From d2745cd845fb500f742f45944116497a8d288aaf Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Thu, 11 Jun 2020 18:11:45 +0200 Subject: [PATCH 1/2] test manual fov computation --- .../Runtime/RenderPipeline/Camera/HDCamera.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs index e75b23d663c..e7fb67e6ed7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs @@ -1275,6 +1275,10 @@ Matrix4x4 ComputePixelCoordToWorldSpaceViewDirectionMatrix(ViewConstants viewCon } float verticalFoV = camera.GetGateFittedFieldOfView() * Mathf.Deg2Rad; + if (!camera.usePhysicalProperties) + { + verticalFoV = Mathf.Atan(-1.0f / viewConstants.projMatrix[1, 1]) * 2; + } Vector2 lensShift = camera.GetGateFittedLensShift(); return HDUtils.ComputePixelCoordToWorldSpaceViewDirectionMatrix(verticalFoV, lensShift, resolution, viewConstants.viewMatrix, false, aspect); From 652c67f6c8c905e0b1b72208fbd61d27dd7a056e Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Thu, 11 Jun 2020 18:41:15 +0200 Subject: [PATCH 2/2] Changelog --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 101179d5f4d..71288644c4c 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -671,6 +671,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue where decals were duplicated in prefab isolation mode. - Fixed an issue where rendering preview with MSAA might generate render graph errors. - Fixed compile error in PS4 for planar reflection filtering. +- Fix issue that caused sky to incorrectly render when using a custom projection matrix. ### Changed - Improve MIP selection for decals on Transparents