Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed CustomPassUtils scaling issues when used with RTHandles allocated from a RenderTexture.
- Fixed ResourceReloader that was not call anymore at pipeline construction
- Fixed undo of some properties on light editor.
- Fix SSR Accumulation with Offset with Viewport Rect Offset on Camera

### Changed
- Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,10 @@ void ScreenSpaceReflectionsAccumulate(uint3 dispatchThreadId : SV_DispatchThread
DecodeFromNormalBuffer(hitSS, hitNormalData);
float3 hitN = hitNormalData.normalWS;

float2 prevHistoryScale = _RTHandleScaleHistory.zw / _RTHandleScaleHistory.xy;

float4 original = _SSRAccumTexture[COORD_TEXTURE2D_X(positionSS)];
float4 previous = _SsrAccumPrev[COORD_TEXTURE2D_X(positionSS * _RTHandleScaleHistory.zw / _RTHandleScaleHistory.xy)];
float4 previous = _SsrAccumPrev[COORD_TEXTURE2D_X(positionSS * prevHistoryScale + 0.5f / prevHistoryScale)];

float2 motionVectorNDC;
DecodeMotionVector(SAMPLE_TEXTURE2D_X_LOD(_CameraMotionVectorsTexture, s_linear_clamp_sampler, min(hitPositionNDC.xy, 1.0f - 0.5f * _ScreenSize.zw) * _RTHandleScale.xy, 0), motionVectorNDC);
Expand All @@ -698,7 +700,7 @@ void ScreenSpaceReflectionsAccumulate(uint3 dispatchThreadId : SV_DispatchThread
float2 positionNDC = positionSS * _ScreenSize.zw + (0.5 * _ScreenSize.zw);
DecodeMotionVector(SAMPLE_TEXTURE2D_X_LOD(_CameraMotionVectorsTexture, s_linear_clamp_sampler, min(positionNDC, 1.0f - 0.5f * _ScreenSize.zw) * _RTHandleScale.xy, 0), motionVectorCenterNDC);
float speedSrc = length(motionVectorCenterNDC);
float speed = saturate((speedDst + speedDst) * 128.0f); // 128 is arbitrary
float speed = saturate((speedDst + speedSrc) * 128.0f); // 128 is arbitrary

float coefExpAvg = lerp(_SsrAccumulationAmount, 1.0f, speed);

Expand Down