Skip to content

Commit 0a739c2

Browse files
[Hdrp] Merge Hd/bugfix #6954
1 parent 21fc486 commit 0a739c2

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1616
- Fixed issue that placed an OnDemand shadow in the atlas before it was ever rendered.
1717
- Fixed issue at edge of screen on some platforms when SSAO is on.
1818
- Fixed vertex color mode Add name whicgh was misleading, renamed to AddSubstract.
19+
- Fixed screen space shadow when multiple lights cast shadows.
20+
- Fixed issue with dynamic resolution and low res transparency sampling garbage outside of the render target.
1921

2022
## [10.8.0] - 2021-09-20
2123

com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ScreenSpaceShadows.shader

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Shader "Hidden/HDRP/ScreenSpaceShadows"
6565
float3 normalWS = normalData.normalWS;
6666

6767
// Note: we use shading normal here and not GetNormalForShadowBias() as it is not available
68-
return GetDirectionalShadowAttenuation(context.shadowContext, posInput.positionSS.xy, posInput.positionWS, normalWS, _DirectionalShadowIndex, L);
68+
return GetDirectionalShadowAttenuation(context.shadowContext, posInput.positionSS.xy, posInput.positionWS, normalWS, light.shadowIndex, L);
6969
}
7070
ENDHLSL
7171

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2988,7 +2988,7 @@ void Callback(CommandBuffer c, HDCamera cam)
29882988
PushFullScreenDebugTexture(hdCamera, cmd, m_CameraColorBuffer, FullScreenDebugMode.NanTracker);
29892989
PushFullScreenLightingDebugTexture(hdCamera, cmd, m_CameraColorBuffer);
29902990

2991-
if (m_SubFrameManager.isRecording && m_SubFrameManager.subFrameCount > 1)
2991+
if (m_SubFrameManager.isRecording && m_SubFrameManager.subFrameCount > 1 && && !m_PathTracing.enable.value)
29922992
{
29932993
RenderAccumulation(hdCamera, m_CameraColorBuffer, m_CameraColorBuffer, false, cmd);
29942994
}
@@ -4807,7 +4807,7 @@ RenderSSRParameters PrepareSSRParameters(HDCamera hdCamera, in HDUtils.PackedMip
48074807
cb._ColorPyramidUvScaleAndLimitPrevFrame = HDUtils.ComputeViewportScaleAndLimit(hdCamera.historyRTHandleProperties.previousViewportSize, hdCamera.historyRTHandleProperties.previousRenderTargetSize);
48084808
cb._SsrColorPyramidMaxMip = hdCamera.colorPyramidHistoryMipCount - 1;
48094809
cb._SsrDepthPyramidMaxMip = depthPyramid.mipLevelCount - 1;
4810-
if (hdCamera.isFirstFrame || hdCamera.cameraFrameCount <= 2)
4810+
if (hdCamera.isFirstFrame || hdCamera.cameraFrameCount <= 3)
48114811
cb._SsrAccumulationAmount = 1.0f;
48124812
else
48134813
cb._SsrAccumulationAmount = Mathf.Pow(2, Mathf.Lerp(0.0f, -7.0f, volumeSettings.accumulationFactor.value));

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ Shader "Hidden/HDRP/UpsampleTransparent"
9595
#if DEBUG_EDGE
9696
return float4(0.0, 10.0, 0.0, 1.0);
9797
#else
98-
return SAMPLE_TEXTURE2D_X_LOD(_LowResTransparent, s_point_clamp_sampler, ClampAndScaleUVForPoint(nearestUV), 0);
98+
// Important note! The reason we need to do ClampAndScaleUVForBilinear is because the candidate for nearestUV are going to be the ones
99+
// 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.
100+
return SAMPLE_TEXTURE2D_X_LOD(_LowResTransparent, s_point_clamp_sampler, ClampAndScaleUVForBilinear(nearestUV), 0);
99101
#endif
100102
}
101103
#else // BILINEAR

0 commit comments

Comments
 (0)