Fixing issues with SSIL artifacts #73859
Merged
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.
In SSIL and SSAO we slice our screen up into 4 layers, for this we half the size of the screen, 4 slices at half the resolution makes up our starting size.
If half size is on, we half this size again.
In both cases we round up if the screen resolution can't be nicely divided by 2 or 4.
When dispatching our compute shaders however, there are many places where we shift by 1 or 2 to half or quarter the size. This has the result that the resolution is rounded down.
This causes the pixels in the border of our textures to not be written to. When resizing the window the old buffers are freed and new buffers allocated, these buffers often take up the space of the previously freed buffers and we get whatever junk is in there.
This junk then potentially leads to computational errors which causes the artifacts we've seen at the side of the image.
This PR ensures we are using the actual buffer sizes when calling
compute_list_dispatch_threads
ensuring full coverage of the buffers.Fixes #56724