Skip to content

Commit b5962c9

Browse files
Fix Jittered Project Matrix Infinite Far Clip Plane (#4638)
* Reconstruct jittered projection matrix far plane (for Infinite ) * Changelog Co-authored-by: sebastienlagarde <[email protected]>
1 parent c09379f commit b5962c9

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
207207
- Fixed AxF debug output in certain configurations (case 1333780).
208208
- Fixed white flash when camera is reset and SSR Accumulation mode is on.
209209
- Fixed distortion when resizing the window in player builds with the Graphics Compositor enabled (case 1328968).
210+
- Fixed an issue with TAA causing objects not to render at extremely high far flip plane values.
210211

211212
### Changed
212213
- Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard

com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,6 +1675,11 @@ Matrix4x4 GetJitteredProjectionMatrix(Matrix4x4 origProj)
16751675
planes.top += planeJitter.y;
16761676
planes.bottom += planeJitter.y;
16771677

1678+
// Reconstruct the far plane for the jittered matrix.
1679+
// For extremely high far clip planes, the decomposed projection zFar evaluates to infinity.
1680+
if (float.IsInfinity(planes.zFar))
1681+
planes.zFar = frustum.planes[5].distance;
1682+
16781683
proj = Matrix4x4.Frustum(planes);
16791684
}
16801685

0 commit comments

Comments
 (0)