Reimplement Temporal AA with less ghosting and better quality

This commit is contained in:
Wojtek Figat
2021-07-19 14:02:46 +02:00
parent 36f6463028
commit fc31565f12
7 changed files with 153 additions and 32 deletions

View File

@@ -31,8 +31,15 @@ void RenderView::Prepare(RenderContext& renderContext)
taaJitter = Vector2(jitterX * 2.0f / width, jitterY * 2.0f / height);
// Modify projection matrix
Projection.Values[2][0] += taaJitter.X;
Projection.Values[2][1] += taaJitter.Y;
if (IsOrthographicProjection())
{
// TODO: jitter otho matrix in a proper way
}
else
{
Projection.Values[2][0] += taaJitter.X;
Projection.Values[2][1] += taaJitter.Y;
}
// Update matrices
Matrix::Invert(Projection, IP);