-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Fixes OpenXR #1911
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
Fixes OpenXR #1911
Conversation
…enerally the standard nowadays, rather than seated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR !
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Silk.NET.OpenXR" Version="2.15.0" /> | ||
<PackageReference Include="Silk.NET.OpenXR" Version="2.17.1" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should update all Silk.NET versions referenced in the solution together (see Stride.Graphics.csproj
) otherwise Perksey's gonna kill us again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
{ | ||
CopyOrScaleTexture(drawContext, VRSettings.VRDevice.MirrorTexture, drawContext.CommandList.RenderTarget); | ||
} | ||
else if (hasPostEffects) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand this is to fix the mirror issue you mentioned, why is this necessary exactly ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, is this fix influencing anything when running OpenVR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's necessary because OpenXR doesn't have MirrorTexture implemented, and the OpenVR implementation was broken anyway. The whole logic there was flawed to begin with, because it meant that if you enabled PostFx, it would magically enable the Mirror, even if you had disabled it.
Here's the results of all combinations for reference:
VRSettings.VRDevice.MirrorTexture:
OpenXR + PostFx: Error on Startup (MirrorTexture doesn't exist)
OpenXR + no PostFx: Error on Startup (MirrorTexture doesn't exist)
OpenVR + PostFX: Bad crop - shows only upper left of each eye on Mirror
OpenVR + no PostFx: Bad crop - shows only upper left of each eye on Mirror
vrFullSurface:
OpenXR + PostFx: Good
OpenXR + no PostFx: Good
OpenVR + PostFX: Good
OpenVR + no PostFx: Good
LGTM but @tebjan has far more experience with VR stuff, so just waiting on his approval. |
Ping @arturoc, would you have time to take a quick look at this? |
Yes, I've been busy these last few days but can take a look next week |
|
Thanks, and sorry for the delay @MaximilianEmel ! |
FYI, this pull broke the OpenGL code because Silk.NET had breaking changes from 2.15.0 to 2.17.1 |
PR Details
Description
Related Issue
#1909
Motivation and Context
It fixes OpenXR, and cleans things up.
Types of changes
Checklist