Skip to content

[HDRP] Fixed taa jitter for after post process materials #6320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 26, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ -44,6 +44,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed Nans happening due to volumetric clouds when the pixel color is perfectly black (case 1379185).
- Fixed for screen space overlay rendered by camera when HDR is disabled.
- Fixed dirtiness handling in path tracing, when using multiple cameras at once (case 1376940).
- Fixed taa jitter for after post process materials (case 1380967).

### Changed
- Optimizations for the physically based depth of field.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -953,13 +953,27 @@ TextureHandle RenderAfterPostProcessObjects(RenderGraph renderGraph, HDCamera hd
builder.SetRenderFunc(
(AfterPostProcessPassData data, RenderGraphContext ctx) =>
{
// Disable camera jitter. See coment in RestoreNonjitteredMatrices
if (data.hdCamera.RequiresCameraJitter())
{
data.hdCamera.UpdateAllViewConstants(false);
data.hdCamera.UpdateShaderVariablesGlobalCB(ref data.globalCB);
}

UpdateOffscreenRenderingConstants(ref data.globalCB, true, 1.0f);
ConstantBuffer.PushGlobal(ctx.cmd, data.globalCB, HDShaderIDs._ShaderVariablesGlobal);

DrawOpaqueRendererList(ctx.renderContext, ctx.cmd, data.hdCamera.frameSettings, data.opaqueAfterPostprocessRL);
// Setup off-screen transparency here
DrawTransparentRendererList(ctx.renderContext, ctx.cmd, data.hdCamera.frameSettings, data.transparentAfterPostprocessRL);

// Reenable camera jitter for CustomPostProcessBeforeTAA injection point
if (data.hdCamera.RequiresCameraJitter())
{
data.hdCamera.UpdateAllViewConstants(true);
data.hdCamera.UpdateShaderVariablesGlobalCB(ref data.globalCB);
}

UpdateOffscreenRenderingConstants(ref data.globalCB, false, 1.0f);
ConstantBuffer.PushGlobal(ctx.cmd, data.globalCB, HDShaderIDs._ShaderVariablesGlobal);
});
Expand Down