Skip to content

Commit 419850b

Browse files
Fix motion blur compute dispatch size (#4737)
Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
1 parent 97a953e commit 419850b

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
234234
- Fixed reflection probes being injected into the ray tracing light cluster even if not baked (case 1329083).
235235
- Fixed the double sided option moving when toggling it in the material UI (case 1328877).
236236
- Fixed volumetric fog in planar reflections.
237+
- Fixed error with motion blur and small render targets.
237238

238239
### Changed
239240
- Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2953,8 +2953,8 @@ void PrepareMotionBlurPassData(RenderGraph renderGraph, in RenderGraphBuilder bu
29532953
tileSize = 16;
29542954
}
29552955

2956-
int tileTexWidth = Mathf.CeilToInt(postProcessViewportSize.x / tileSize);
2957-
int tileTexHeight = Mathf.CeilToInt(postProcessViewportSize.y / tileSize);
2956+
int tileTexWidth = Mathf.CeilToInt(postProcessViewportSize.x / (float)tileSize);
2957+
int tileTexHeight = Mathf.CeilToInt(postProcessViewportSize.y / (float)tileSize);
29582958
data.tileTargetSize = new Vector4(tileTexWidth, tileTexHeight, 1.0f / tileTexWidth, 1.0f / tileTexHeight);
29592959

29602960
float screenMagnitude = (new Vector2(postProcessViewportSize.x, postProcessViewportSize.y).magnitude);

0 commit comments

Comments
 (0)