From 9806beb31b62a2988cccfcf7b336bd2d58e12c05 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Wed, 10 Jun 2020 19:51:28 +0200 Subject: [PATCH 1/2] Fix compile issue for PS4. --- .../Runtime/Lighting/PlanarReflectionFiltering.compute | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/PlanarReflectionFiltering.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/PlanarReflectionFiltering.compute index 426c8273d03..3674229e748 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/PlanarReflectionFiltering.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/PlanarReflectionFiltering.compute @@ -77,7 +77,8 @@ void FilterPlanarReflection(uint3 dispatchThreadId : SV_DispatchThreadID, uint2 float centerDepthValue = SAMPLE_TEXTURE2D_LOD(_DepthTextureMipChain, s_trilinear_clamp_sampler, sampleCoords, _SourceMipIndex).x; // Compute the world position of the tapped pixel - PositionInputs centralPosInput = GetPositionInput(currentCoord, _CaptureCurrentScreenSize.zw, centerDepthValue, _CaptureCameraIVP_NO, 0, 0); + // Note: the view matrix here is not really used, but a valid matrix needs to be passed to this function. + PositionInputs centralPosInput = GetPositionInput(currentCoord, _CaptureCurrentScreenSize.zw, centerDepthValue, _CaptureCameraIVP_NO, UNITY_MATRIX_V); // Compute the direction to the reflection pixel const float3 rayDirection = normalize(centralPosInput.positionWS - _CaptureCameraPositon); @@ -180,7 +181,8 @@ void DepthConversion(uint3 dispatchThreadId : SV_DispatchThreadID, uint2 groupTh float centerDepthValue = LOAD_TEXTURE2D_LOD(_DepthTextureOblique, currentCoord, 0).x; // Compute the world position of the tapped pixel - PositionInputs centralPosInput = GetPositionInput(currentCoord, _CaptureCurrentScreenSize.zw, centerDepthValue, _CaptureCameraIVP, 0, 0); + // Note: the view matrix here is not really used, but a valid matrix needs to be passed to this function. + PositionInputs centralPosInput = GetPositionInput(currentCoord, _CaptureCurrentScreenSize.zw, centerDepthValue, _CaptureCameraIVP, UNITY_MATRIX_V); // For some reason, with oblique matrices, when the point is on the background the reconstructed position ends up behind the camera and at the wrong position float3 rayDirection = normalize(_CaptureCameraPositon - centralPosInput.positionWS); From 3398dacb23b686a71af53a73dc37296ad01acf33 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Wed, 10 Jun 2020 19:55:19 +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 f3184d09782..894091efe36 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -655,6 +655,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix issue with fast memory and rendergraph. - Fixed transparent motion vector framesetting not sanitized. - Fixed wrong order of post process frame settings. +- Fixed compile error in PS4 for planar reflection filtering. ### Changed - Improve MIP selection for decals on Transparents