diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 96657574758..456559da011 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -669,6 +669,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed issue with depth pyramid generation and dynamic resolution. - 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. ### Changed - Improve MIP selection for decals on Transparents 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);