diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4052_TAA.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4052_TAA.unity index be528f3b965..a9175d91f8a 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4052_TAA.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4052_TAA.unity @@ -4387,7 +4387,7 @@ PrefabInstance: - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} propertyPath: waitFrames - value: 16 + value: 64 objectReference: {fileID: 0} - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} @@ -4397,8 +4397,8 @@ PrefabInstance: type: 2} - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} - propertyPath: xrCompatible - value: 0 + propertyPath: xrThresholdMultiplier + value: 1.5 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4053_TAA-FP16Alpha.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4053_TAA-FP16Alpha.unity index 9eba779d282..b41f87d978c 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4053_TAA-FP16Alpha.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4053_TAA-FP16Alpha.unity @@ -4384,11 +4384,6 @@ PrefabInstance: propertyPath: ImageComparisonSettings.TargetHeight value: 512 objectReference: {fileID: 0} - - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, - type: 3} - propertyPath: waitFrames - value: 16 - objectReference: {fileID: 0} - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} propertyPath: renderPipelineAsset @@ -4397,8 +4392,13 @@ PrefabInstance: type: 2} - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} - propertyPath: xrCompatible - value: 0 + propertyPath: waitFrames + value: 64 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: xrThresholdMultiplier + value: 1.2 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1710_Decals_Normal_Patch.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1710_Decals_Normal_Patch.png index 3160433f359..6b0d03c7ce5 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1710_Decals_Normal_Patch.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1710_Decals_Normal_Patch.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c70bf0b1d29454fd2ae35267909ea4aea9aed834361bf6e22b333743b49c88ce -size 64825 +oid sha256:f88a489c493599efbc5b5e496ea2c111268547fcb6e0328a2b6bf678e2c3b795 +size 64762 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2316_ShadowTint.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2316_ShadowTint.png index 719eab3a10a..3de6aa28c2a 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2316_ShadowTint.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2316_ShadowTint.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:556bc8905ef1f0f78382707adf52761e3d0a2a1b4e04185f255fdb8e7c72a7b4 -size 132133 +oid sha256:20eecf74d442bf8274e87a9bdf1b285a4bc300fbbba734ecfccb09dce972a029 +size 132210 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/4052_TAA.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/4052_TAA.png index b9cee295825..4534ab5eb74 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/4052_TAA.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/4052_TAA.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f90527963f85df4a36a98bf60cbbd6203cb3379d4885521eca541c3c67b8073e -size 187901 +oid sha256:1d43ff69730e73cf5f93d14ce3a093740ee5839a8a152c89dee4e9c1c06fafe7 +size 194711 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/4053_TAA-FP16Alpha.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/4053_TAA-FP16Alpha.png index 549ada13458..ea3c26da255 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/4053_TAA-FP16Alpha.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/4053_TAA-FP16Alpha.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:186bf2559b16eda39147aba174f30a9abe574e6b414712050f889d7beba7e3cb -size 194221 +oid sha256:5866c1b5d1defd13350f2a763578af5178acb60fee881fbb959f49c73e2d0631 +size 201221 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2316_ShadowTint.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2316_ShadowTint.png index 2f47f44b642..7b4f5b8d9e6 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2316_ShadowTint.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2316_ShadowTint.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb2e73e1a1634b312caf56bafdf6f4ca3aa1adf1a3bbae73e2a83bbb1a46327d -size 150635 +oid sha256:b95a631d6ffc2155cf258c1cc36b496ac5ebdd8ec068d48b1f4e885b86de5d3e +size 132553 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/4052_TAA.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/4052_TAA.png index 0523ea16346..4dbe4daad35 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/4052_TAA.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/4052_TAA.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f9d8deaa819bce83e40bd6c9d47e90baf6c1a4547b20f6ea1ef81fbd93c444c1 -size 206330 +oid sha256:c812051d824a98920aff0d715b1f64e2065948e4d2e0d164cb3f29183ec276c1 +size 195032 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/4053_TAA-FP16Alpha.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/4053_TAA-FP16Alpha.png index 0a3fc7064a4..ea3c26da255 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/4053_TAA-FP16Alpha.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/4053_TAA-FP16Alpha.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3082a5bf3b0789bebcc2f9900a75a089e50554b7772e989dd73dd28111af5501 -size 193535 +oid sha256:5866c1b5d1defd13350f2a763578af5178acb60fee881fbb959f49c73e2d0631 +size 201221 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1710_Decals_Normal_Patch.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1710_Decals_Normal_Patch.png index 73d9014de29..aed1136c294 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1710_Decals_Normal_Patch.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1710_Decals_Normal_Patch.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e898c5376c1bca56fb871744aeef8d5c98e7149f45b3dddc60d86c04c020f0fe -size 73641 +oid sha256:8829e682d4f00468d26f6305c3c9504b7012e95179db779639d233f82021c285 +size 65062 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/4052_TAA.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/4052_TAA.png index 3abeedbfd2a..1ca54cc671b 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/4052_TAA.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/4052_TAA.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5ef8e90ce7933d629afe0b7cfbc459975a9400c6879e86ace5576a6773c94d1e -size 188089 +oid sha256:1942a0f53464006202c6c4614fe489faf3755009674e480ea889233f8d70c50f +size 194699 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/4053_TAA-FP16Alpha.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/4053_TAA-FP16Alpha.png index 82a7c7221bd..8e234a593f3 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/4053_TAA-FP16Alpha.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/4053_TAA-FP16Alpha.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:190ee024891eed677baee1202026bb46be278f34b8d81cec519f93b516185b07 -size 193796 +oid sha256:56ec8f34c3b18eae5110a53c3f6fe887d8307768e9234abba7a816ce77515bca +size 201305 diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index cc03aa36e2c..f7351863a27 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -611,6 +611,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed error when undo a Reflection Probe removal in a prefab instance. (case 1244047) - Tentative fix for missing include in depth of field shaders. - Fixed the light overlap scene view draw mode (wasn't working at all). +- Fixed taaFrameIndex and XR tests 4052 and 4053 ### Changed - Improve MIP selection for decals on Transparents 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 9151820d743..d356d8242b1 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 @@ -489,6 +489,10 @@ internal void Update(FrameSettings currentFrameSettings, HDRenderPipeline hdrp, screenSize = new Vector4(screenWidth, screenHeight, 1.0f / screenWidth, 1.0f / screenHeight); screenParams = new Vector4(screenSize.x, screenSize.y, 1 + screenSize.z, 1 + screenSize.w); + const int kMaxSampleCount = 8; + if (++taaFrameIndex >= kMaxSampleCount) + taaFrameIndex = 0; + UpdateAllViewConstants(); isFirstFrame = false; cameraFrameCount++; @@ -912,6 +916,8 @@ void UpdateAllViewConstants() if (m_XRViewConstants == null || m_XRViewConstants.Length != viewCount) { m_XRViewConstants = new ViewConstants[viewCount]; + resetPostProcessingHistory = true; + isFirstFrame = true; } UpdateAllViewConstants(IsTAAEnabled(), true); @@ -1162,10 +1168,6 @@ Matrix4x4 GetJitteredProjectionMatrix(Matrix4x4 origProj) float jitterY = HaltonSequence.Get((taaFrameIndex & 1023) + 1, 3) - 0.5f; taaJitter = new Vector4(jitterX, jitterY, jitterX / actualWidth, jitterY / actualHeight); - const int kMaxSampleCount = 8; - if (++taaFrameIndex >= kMaxSampleCount) - taaFrameIndex = 0; - Matrix4x4 proj; if (camera.orthographic) diff --git a/com.unity.testing.hdrp/RP_Assets/HDRP_Test_Def.asset b/com.unity.testing.hdrp/RP_Assets/HDRP_Test_Def.asset index 4ea302e13f4..25f0889cfd4 100644 --- a/com.unity.testing.hdrp/RP_Assets/HDRP_Test_Def.asset +++ b/com.unity.testing.hdrp/RP_Assets/HDRP_Test_Def.asset @@ -317,7 +317,7 @@ MonoBehaviour: xrSettings: singlePass: 1 occlusionMesh: 1 - cameraJitter: 0 + cameraJitter: 1 postProcessQualitySettings: NearBlurSampleCount: 030000000500000008000000 NearBlurMaxRadius: diff --git a/com.unity.testing.hdrp/RP_Assets/HDRP_Test_Def_FP16_PPAlpha.asset b/com.unity.testing.hdrp/RP_Assets/HDRP_Test_Def_FP16_PPAlpha.asset index f3747f6fa00..c9c8224e226 100644 --- a/com.unity.testing.hdrp/RP_Assets/HDRP_Test_Def_FP16_PPAlpha.asset +++ b/com.unity.testing.hdrp/RP_Assets/HDRP_Test_Def_FP16_PPAlpha.asset @@ -295,6 +295,7 @@ MonoBehaviour: xrSettings: singlePass: 1 occlusionMesh: 1 + cameraJitter: 1 postProcessQualitySettings: NearBlurSampleCount: 030000000500000008000000 NearBlurMaxRadius: diff --git a/com.unity.testing.hdrp/TestRunner/HDRP_GraphicTestRunner.cs b/com.unity.testing.hdrp/TestRunner/HDRP_GraphicTestRunner.cs index 0b0113342ac..e6e73a3fe40 100644 --- a/com.unity.testing.hdrp/TestRunner/HDRP_GraphicTestRunner.cs +++ b/com.unity.testing.hdrp/TestRunner/HDRP_GraphicTestRunner.cs @@ -58,6 +58,9 @@ public IEnumerator Run(GraphicsTestCase testCase) yield return null; } + // Reset temporal effects on hdCamera + HDCamera.GetOrCreate(camera).Reset(); + for (int i=0 ; i