Skip to content

Fix compile issue on PS4 for PlanarReflectionFiltering.compute #830

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down