Fix wobble-like (or tearing-like) SSAO issues when temporal reprojection is enabled.#4895
Merged
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for https://fogbugz.unity3d.com/f/cases/1341704/
The issue was due to the fact that history was loaded, so we might have got some discontinuities at the threshold between a texel and another being sampled (e.g. 10.49 and 10.51), because this was delicate it would end up looking as moving moving lines.
Depending the motion characteristic, that ends up looking a bit like a wobble effect (as the motion settles down).
To solve the issue I had to change the format used for the history texture (from UINT 32 to RGBA8_UNorm, so same size and bw cost) and change how history data is packed. Once this is done, it is possible to use a linear sampler to get the data and get rid of straight lines and the wobble.
There was also a bug with AOBufferSize being half a texel wrong if the source resolution was odd, leading to various visual imprecisions. This PR fixes that too.
Before
wobblyAO.mp4
After
noWobble.mp4