Skip to content
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

fix(VR): fix eye mismatch for screenspacegi #666

Merged
merged 5 commits into from
Nov 12, 2024
Merged

Conversation

alandtse
Copy link
Collaborator

@alandtse alandtse commented Oct 17, 2024

partially closes #667

@alandtse alandtse marked this pull request as draft October 18, 2024 08:46
@alandtse alandtse changed the title fix(VR): use world position for eye swap over fix(VR): fix eye mismatch for screenspacegi Oct 18, 2024
@alandtse alandtse force-pushed the dev branch 4 times, most recently from 044bea4 to 2dfd24d Compare October 24, 2024 07:59
@alandtse
Copy link
Collaborator Author

Ok, since I'm going to take a break for a while, this probably does need to get merged in since it does fix the common VR functions and also makes SSGI partially usable in VR. Without, the eyes are completely mismatched. @FlayaN mind getting this in or finishing up?

The one remaining bug is tied when the blending algorithm stops blending colors because one eye has become occluded. In that case, it reverts to the original color which is a different color then the blended color resulting in brighter areas near foreground objects delineated with sharp edge. The width of the artifact can be further reduced by looking at the depth of the transformed UV and making sure they're at least close to each other. This avoid trying to blend when one eye has a significantly different distance due to the occlusion.

The current blending is actually a stop gap, a more robust fix would be to fix it during the radiance or gi CS passes so that the eyes are the same before ambient or . The blending technique can be useful when dealing with masks so the functions are good to keep. It also fixes a potential bug in determining the eye index because it needs to happen before dynamic resolution adjustment.

Fix a bug where the function would convert in viewspace which would
not be synced between the eyes. Now the conversion goes to world space
before converting to the other eye.
This requires hardcoding a shift based on a q3. This may not be the
scalable solution.
@alandtse alandtse requested a review from FlayaN October 26, 2024 06:35
@alandtse alandtse marked this pull request as ready for review October 26, 2024 06:35
@alandtse
Copy link
Collaborator Author

I still recommend VR default SSGI off until a full solution is available both for performance and correctness reasons.

One last thing, because VR is much more jittery than flat, the motion threshold is really too low and must be increased if using the temporal denoiser. Otherwise the accumulated vectors end up always have bad data resulting in grid or mosaic like black patterns.

@doodlum
Copy link
Owner

doodlum commented Oct 26, 2024

I still recommend VR default SSGI off until a full solution is available both for performance and correctness reasons.

One last thing, because VR is much more jittery than flat, the motion threshold is really too low and must be increased if using the temporal denoiser. Otherwise the accumulated vectors end up always have bad data resulting in grid or mosaic like black patterns.

I'm not sure that we exactly have a system to disable a feature by default only on VR. I guess when creating a new JSON, on VR we could set the disabled on boot option.

@doodlum doodlum merged commit 955fba3 into doodlum:dev Nov 12, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VR - SSGI eye mismatch
2 participants