Skip to content

Commit 3d43731

Browse files
Fix for sampling garbage outside of screen with low res transparent upsample and dynamic resolution (#6957)
* Fix * changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
1 parent b3f772b commit 3d43731

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
103103
- Fixed vertex color mode Add name whicgh was misleading, renamed to AddSubstract.
104104
- Fixed screen space shadow when multiple lights cast shadows.
105105
- Fixed issue with accumulation motion blur and depth of field when path tracing is enabled.
106+
- Fixed issue with dynamic resolution and low res transparency sampling garbage outside of the render target.
106107

107108
## [14.0.0] - 2021-11-17
108109

com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/UpsampleTransparent.shader

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ Shader "Hidden/HDRP/UpsampleTransparent"
9797
#if DEBUG_EDGE
9898
return float4(0.0, 10.0, 0.0, 1.0);
9999
#else
100-
return SAMPLE_TEXTURE2D_X_LOD(_LowResTransparent, s_point_clamp_sampler, ClampAndScaleUVForPoint(nearestUV), 0);
100+
// Important note! The reason we need to do ClampAndScaleUVForBilinear is because the candidate for nearestUV are going to be the ones
101+
// used for bilinear. We are using the same UVs used for bilinear -hence the uv clamp for bilinear- it is just the filtering that is different.
102+
return SAMPLE_TEXTURE2D_X_LOD(_LowResTransparent, s_point_clamp_sampler, ClampAndScaleUVForBilinear(nearestUV), 0);
101103
#endif
102104
}
103105
#else // BILINEAR

0 commit comments

Comments
 (0)