Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
138 stars 2 forks source link

Screen Space Reflections in VR Calculate Wrong Per Eye #1747

Open lxw404 opened 6 months ago

lxw404 commented 6 months ago

Describe the bug?

Currently screen space reflections are not computed correctly in VR. Specifically, it seems possible that at least part of the calculation is being done from the midpoint between eyes, rather than per-eye centers projecting into the scene.

To Reproduce

Turn on Screen Space Reflections in the new settings while in VR and spawn this reflective scene:

resrec:///U-LuxKitty/R-C480C8DCEB65FAF2CD2B36C6BA3C9D7E62F7B2A05F2320C94368EE41BB6A5B75

Tilt your head left and right while viewing the red ball.

Expected behavior

The reflections should be mostly consistent per eye. (Understandably SSR is not the best way to represent reflections and there are other issues especially in VR, however the way it is computed at the moment is jarringly offset)

Screenshots

https://github.com/Yellow-Dog-Man/Resonite-Issues/assets/52231149/432cd445-b0af-4225-b6c3-53a036cd4350

Notice that the reflection of the red target in the center of the screen goes up and down per eye, not matching up.

Resonite Version Number

Beta 2024.4.17.1420

What Platforms does this occur on?

Windows

What headset if any do you use?

Valve Index, Desktop

Log Files

SSR VR Offset Per Eye - 2024.4.17.1420 - 2024-04-17 20_53_33.log

Additional Context

This might actually just be a Unity-specific bug. In any case though, this issue is more to just point out that there can be issues with SSR implementations in VR.

Reporters

LuxKitty

Frooxius commented 6 months ago

I don't think this is something we'd address. The setting is experimental and it's not particularly designed for VR.

We can just block it from working at all in VR, but I figured people would like to play with it even though it's not perfect.

Geenz commented 6 months ago

Yeah- effort would be better spent on making it work in Sauce rather than diagnosing it in Unity for the time being.

Frooxius commented 6 months ago

The main question is - do we just leave this for people to play with in VR (it's already marked as experimental)? Or just block it completely while in VR?

It doesn't look super bad in VR all the time, so I'd be okay keeping the setting on.

lxw404 commented 6 months ago

I kind of figured it was a Unity specific rendering error. I don't mind at all not having this touched until Sauce, but just to throw my preference in here: it is actually very painful in VR at least for me, very small head tilts can cause massive discrepancies, and for the first time ever I got eye strain...

shiftyscales commented 6 months ago

Marking this as blocked by #1401.