diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index ed81781bab2..ab419bdbb78 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -40,6 +40,7 @@ The version number for this package has increased due to a version update of a r - Fixing exceptions in the console when putting the SSGI in low quality mode (render graph). - Fixed NullRef Exception when decals are in the scene, no asset is set and HDRP wizard is run. - Fixed nan when a decal affects normals. +- Fixed issue with TAA causing bleeding of a view into another when multiple views are visible. ### Changed - Combined occlusion meshes into one to reduce draw calls and state changes with XR single-pass. diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/TemporalAntialiasing.hlsl b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/TemporalAntialiasing.hlsl index 3af4237d52c..eaff2540d4d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/TemporalAntialiasing.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/TemporalAntialiasing.hlsl @@ -18,22 +18,30 @@ #define COMPARE_DEPTH(a, b) step(a, b) #endif +float2 ClampAndScaleForBilinearWithCustomScale(float2 uv, float2 scale) +{ + float2 maxCoord = 1.0f - _ScreenSize.zw; + return min(uv, maxCoord) * scale; +} float3 Fetch(TEXTURE2D_X(tex), float2 coords, float2 offset, float2 scale) { - float2 uv = (coords + offset * _ScreenSize.zw) * scale; + float2 uv = (coords + offset * _ScreenSize.zw); + uv = ClampAndScaleForBilinearWithCustomScale(uv, scale); return SAMPLE_TEXTURE2D_X_LOD(tex, s_linear_clamp_sampler, uv, 0).xyz; } float4 Fetch4(TEXTURE2D_X(tex), float2 coords, float2 offset, float2 scale) { - float2 uv = (coords + offset * _ScreenSize.zw) * scale; + float2 uv = (coords + offset * _ScreenSize.zw); + uv = ClampAndScaleForBilinearWithCustomScale(uv, scale); return SAMPLE_TEXTURE2D_X_LOD(tex, s_linear_clamp_sampler, uv, 0); } float4 Fetch4Array(Texture2DArray tex, uint slot, float2 coords, float2 offset, float2 scale) { - float2 uv = (coords + offset * _ScreenSize.zw) * scale; + float2 uv = (coords + offset * _ScreenSize.zw); + uv = ClampAndScaleForBilinearWithCustomScale(uv, scale); return SAMPLE_TEXTURE2D_ARRAY_LOD(tex, s_linear_clamp_sampler, uv, slot, 0); }