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

feat(VR): enable SSR #502

Merged
merged 48 commits into from
Sep 26, 2024
Merged

feat(VR): enable SSR #502

merged 48 commits into from
Sep 26, 2024

Conversation

alandtse
Copy link
Collaborator

@alandtse alandtse commented Sep 6, 2024

This is a work in progress and for documentation only.

Issues with VR SSR:

  • Black banding which results in line like artifacts in the reflection that are very obvious when moving. See kSSR_RAW below. - Significantly reduced by 0b80c08 combined with updating iterations to 64 for VR (may not be worth the costs). This is actually masking for SSR so should be ignored in water shader to avoid the banding.
    image
    image
  • Fog/effect shader effects appear lagged - This appears to be caused by the effects shader running later to update the clouds so we're using kMain_Only_Alpha from the prior frame. In VR you can shake you head much faster than the mouse so while flat also has a disparity, the difference is much smaller and less noticeable. 634a624 (#502)
  • Jagged edges - High iterations helps reduce significantly. Set vr to 48 vs 16 flat. 3bd4181 (#502)
  • Artifacts if hands block water - Won't fix, this is in vanilla
  • Artifacts if too close to water's surface - Using mask for ssr and not using the data should resolve.
  • Water shader should ignore SSR mask and pull reflection data from elsewhere. 6ab66af (#502)
  • Upscaler/dynamic res support - e7312b2 (#502)
  • Fog - Looks like vanilla bug where fog is not rendered in time for SSR. Not related to alpha map. Issue is Fog is applied but requires SSR input. This can't be fixed without another fog application pass.
  • Minor eye inconsistencies on edges - f356dbc (#502)

Cleanup tasks:

  • Currently does a postpostload manually to enable the hidden setting in VR early enough. Should probably add a general feature for postpostload. - c55e583 (#502)
  • Revert commit to make reflections more obvious. 80acf0f - 1e8c2ed (#502)

@alandtse alandtse changed the title WIP(VR): enable SSR feat(VR): enable SSR Sep 7, 2024
@alandtse alandtse force-pushed the water_ssr_vr branch 2 times, most recently from 1f38d6f to af72977 Compare September 10, 2024 08:25
@alandtse alandtse marked this pull request as ready for review September 10, 2024 08:26
@alandtse alandtse marked this pull request as draft September 11, 2024 02:00
@alandtse alandtse force-pushed the water_ssr_vr branch 5 times, most recently from 70f2479 to 54d14f8 Compare September 16, 2024 03:56
@alandtse alandtse marked this pull request as ready for review September 17, 2024 08:34
@alandtse
Copy link
Collaborator Author

This is ready, but should probably handle some of its predecessor PRs first. I also have some second stage prs that should go in too before this.

@alandtse alandtse force-pushed the water_ssr_vr branch 8 times, most recently from b0f78b0 to 02e53a9 Compare September 23, 2024 07:08
GetEyeIndexPS relies on VR buffers being present which may not occur for
image shaders.
This commit will be rearchitected once finalized. This includes some
artifacts like black banding.
This is for testing only as it removes any averaging of color with
reflectioncolor. This is meant solely to make it easy to see the
SSR effect. This will be reverted in a future commit.
Because alpha is based on the prior frame, there will be a lag for
showing clouds. This is very obvious in VR. Hide clouds for now.
alandtse and others added 23 commits September 24, 2024 20:14
Allow clearing of all shaders linked to a specific hlsl file. This is
useful for DEFINE option passing for features.
Uses new VR function that allows conversion from the coordinates from
one eye to the other. This allows us to detect if one eye has calculated
a reflection and to use that data instead.
Fixes bug where the fog was being applied less when it was more foggy.
Fixes a bug where a prior saved diskcache shaders could not be cleared
by filename.
Fade calculation should be in monoUV so it's relative for both each eye.
This fixes an issue where eyes would have drastically different alpha
components.
Fixes blue colors near edges when nearly underwater due to incorrect
depth detection.
Because VR requires a hidden setting, once enabled on boot, it will
persist. Now, if SSR is disabled on boot, it will completely disable the
SSR path for maximum performance. However, a restart is necessary to
reenable.
Some HMDs appear to have bad transformations so would experience
duplication.
@alandtse alandtse merged commit 1808780 into doodlum:dev Sep 26, 2024
3 checks passed
@alandtse alandtse deleted the water_ssr_vr branch September 26, 2024 05:09
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.

2 participants