Copy depth texture to avoid texture feedback loops #1814
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.
Depends on #1813.
Implement a code path for sampling
u_DepthMap
in shaders from a separate copy of the depth texture, instead of the same one that is attached to the rendering FBO. By default, this will be enabled if the driver does not implementTextureBarrier
, in order to prevent texture feedback loops. Behavior is controlled byr_copyDepthBuffer
. This is meant to fix #1783. Seems to work on my Mac system.Also I keep having some issues with SSAO + bindless textures on a Mesa + AMD setup. In a game with map
survival-pit
I got the SSAO artifacts as shown below. (Same ones I used to get with dummygame. I still got those even after #1731 which I though would fix them but didn't, but they may have gone away after a Mesa update.) I can't reproduce the artifacts in a local game but if I play a demo recorded from an online game, I get the artifacts the whole time. Anywayset r_copyDepthBuffer 2
from this PR fixes those artifacts for me.Things to do:
r_depthShaders
(incompatible debug cvar) is disabled